System Design Patterns: From Fundamentals to Real Systems
0% completed
Cursor-Based Pagination
1. The Pattern
Do not tell the API which page you want. Tell it where you left off. A cursor is an opaque bookmark ("everything after order 8412") instead of a page number ("items 101-120"). It is anchored to a row, not to a count. That protects it from the two failures that break offset pagination at scale.
This pattern is called cursor-based pagination. Pagination means returning a long list in pages. A cursor is a marker that saves a position in that list. Opaque means that the client must not read or build the marker, and anchored means that the position is tied to one row
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%