All guide activities

CH-02 · CHAPTER REVIEW

Requests networking and APIs

Solve these two questions after studying the chapter. State your assumptions and explain your reasoning.

Read. Try. Defend.

Companion to the Buildfest System Design guides.

Chapter review: two questions

Attempt both questions before opening the model answers.

Question 1

An order-status page has 10,000 active viewers and polls every 10 seconds. Estimate the average polling request rate and give one reason to change the update method.

Reveal model answer

Assuming uniformly spaced polls, 10,000 / 10 gives about 1,000 requests per second. Synchronized polling can be burstier. A streaming method may help when updates are frequent or low-delay delivery is required, while a longer polling interval may be enough for infrequent updates.

Question 2

Design GET /my-orders with a page size of 50. Explain the ordering, cursor and ownership checks, including what happens if a cursor refers to another student.

Reveal model answer

Order by a stable pair such as created_at and id, restrict all records to the authenticated student and use the cursor only as a traversal position. A signed or opaque cursor is not permission. Reject invalid cursors or return only permitted results under a documented policy; never expose another student's records.

Answers stay in this tab. Download before leaving. This practice is not graded or saved to your account.