CS FundamentalsHardProduct-company system-design interview

A single-page app makes 30 sequential API calls to render a dashboard, each taking about 40 ms of network round trip. The team cannot speed up the server. Which change cuts load time the most?

  1. A. Compress each response
  2. B. Add more server instances
  3. C. Shorten log messages
  4. D. Batch the calls into one aggregate endpoint (or run independent calls in parallel), removing most of the 30 x 40 ms = 1.2 s of serial round-trip latency

Correct answer: D. Batch the calls into one aggregate endpoint (or run independent calls in parallel), removing most of the 30 x 40 ms = 1.2 s of serial round-trip latency

With sequential calls, latency adds up: 1.2 s in round trips alone. Batching or parallelising independent requests attacks that directly; compression and more servers don't reduce the round-trip count.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic