All guide activities

CH-08 · CHAPTER REVIEW

Replication sharding and consistency

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

A profile update is accepted on a primary, then the user reads an old value from a replica. Explain the issue and propose two ways to provide read-your-writes behavior.

Reveal model answer

The replica can be behind the accepted update. Route an appropriate session read to the primary, or carry a version barrier and wait for a replica that has observed it. Define fallback and timeout behavior. The right choice depends on latency and failure requirements; replication alone does not promise immediate visibility.

Question 2

A dataset is split over 100 shards, but one user generates 20 percent of one million requests/s. Calculate that user's load and explain why adding ordinary shards may not help.

Reveal model answer

That user contributes 200,000 requests/s to its ownership key before other work on that shard. Adding shards does not automatically split one hot key. Consider suitable replication/caching or a finer-grained key, and explain the effect on aggregation, ordering and consistency.

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