All Questions
Api Design easy

An API returns 10,000 products. Returning all in one response is impractical. Which pagination approach is simple and stateless?

  1. A Offset-based: GET /products?limit=20&offset=40
  2. B Server stores the user's 'page state' in a session.
  3. C Return all 10,000 products and let the client paginate.
  4. D Use WebSockets to stream products one at a time.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions