codejump

Database Scaling — Series 2

Preview — 3 of 10 questions

Uniform integer hashes use owners 0–3 via % 4. The cluster expands to owners 0–7 via % 8. What fraction changes owner, before considering migration overhead?

A50% of keys change owner.
B25% of keys change owner.
CNearly 100% of keys change owner.
D12.5% of keys change owner.

A single tenant overloads its shard. Its requests usually target one account, identified by account ID. Which change can split its load while retaining targeted reads?

AAdd virtual nodes while retaining the tenant ID as the only key.
BMove every other tenant away and assume the hot tenant now scales indefinitely.
CRoute by tenant ID plus a stable account bucket.
DReplicate only the shard's metadata to more application servers.

Orders and products live on different owners. A historical report needs product names as they were when each order was placed. What is a suitable approach?

AChoose a random product replica whenever a shard join fails.
BJoin each order with the latest product name and treat it as historical.
CCopy the entire live product database on every report request.
DStore the purchased product name/version in the order's historical record.

Sign up free to play

Answer all 10 questions (7 more), see explanations for every answer, and track your score.