All Questions
Api Design medium

A mobile app fetches user profile AND settings in two separate calls on every screen load. How can the API reduce latency?

  1. A Design a composite endpoint such as GET /users/123/profile-with-settings that aggregates multiple resource representations into a single response body.
  2. B Enable HTTP/1.1 Keep-Alive and request pipelining to allow the client to send multiple requests over a single connection without waiting for responses.
  3. C Advise the client application to implement a local SQLite database for aggressive caching, reducing the need for network calls during repetitive screen loads.
  4. D Upgrade the server's compute resources and network interface bandwidth to minimize the individual processing time for each separate API request.

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

Get the app

Related questions