Paging a list of orders is a solved problem. Paging a ranked home feed is not, and I found that out the boring way: a tester scrolled to page three of my Instagram-style feed and saw a post she had already liked on page one.
Nothing was "broken". Every query returned correct data. The feed was simply being re-ranked between requests, so the ground moved under the offset. This post is about that one slice of the problem, the read path and its cursors, and the five mistakes I made before it behaved. The write side (who gets pushed, who gets pulled) is a different story.
Tech Skill Builder is $5/month for a very limited time only (normally $10). Grab it now before it goes back to $10. The complete, tested project behind this post ( instagram-home-feed-dotnet , Clean Architecture, 238 passing tests, plus a 118-page PDF) is inside.…