codejump

Database Scaling

Preview — 3 of 10 questions

A database has one writable primary and asynchronous replicas. Which routing policy fits ordinary reads that tolerate brief staleness?

ASend writes to whichever replica has the fewest connections.
BSend all writes to every node independently in parallel.
CSend writes to the primary and eligible reads to replicas.
DSend writes to replicas and use the primary only for backups.

Two writable regions accept different shipping addresses for the same order during a partition. What must the system define?

AWrap each regional update in a local transaction without a cross-region policy.
BUse a read replica to choose whichever address it observes first.
CAdd a secondary index on address while keeping the same concurrent write semantics.
DA conflict policy and acceptable business consequences.

Users and billing data are moved into separate databases owned by their respective services. What is the main resulting trade-off?

AReplication of every user row into the billing database.
BElimination of every dependency between billing and users.
CAutomatic atomic commits across both independent databases.
DIndependent ownership with harder cross-domain transactions and joins.

Sign up free to play

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