Paths Subjects Questions Quizzes Pricing Search
Intermediate Open Pro

Why Offset Pagination Breaks a Live Feed

A junior engineer implements feed pagination as GET /v1/feed?page=2&limit=20, which runs SELECT ... ORDER BY created_at DESC LIMIT 20 OFFSET 20 against the feed cache. Users report seeing the same post twice across pages, and occasionally missing posts entirely between page loads.

  1. Explain precisely why offset pagination produces both symptoms on a feed that is being written to concurrently.
  2. Design a cursor-based replacement: what does the cursor encode, and how does the query change?
  3. Does cursor-based pagination fully solve the "new posts appearing between page loads" problem for a chronological feed? What additional client-side handling, if any, is still needed?

Share this question

← Back to Design a News Feed (Twitter / Facebook-style Timeline) practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.