Partitioning and Replication for Scale · graine 1 · A4, économe en encre. Le corrigé s'imprime sur sa propre page, pour les adultes.
En anglais

Splitting data across machines

Informatique · Données et bases de données · de 21 à 22 ans
Nom ______________________   Date ____________
  1. What does synchronous replication promise a later reader?

    • The reader sees the write the copies confirmed
    • The reader may see older data while copies catch up
    • The writer never waits for copies
  2. What is a partition key?

    • The column every query must filter on
    • The backup copy of a table
    • The value that picks each row's node
  3. Asynchronous replication always shows every reader the newest value.

    En entourer un :   Vrai   Faux

  4. Likes are keyed by account, and one celebrity account gets a third of all likes. What will you see?

    • Every partition runs slightly warm
    • Reads get faster everywhere
    • One hot partition while others idle
  5. A messages table is keyed by chat room. Which query turns slow?

    • One room's messages
    • Every message sent in the last hour
    • One room's newest message
  6. A write returns, and a replica read one second later shows the old value. What explains it?

    • The partition key was chosen badly
    • The copies update asynchronously and lag behind
    • The write was rolled back after returning success
  7. A shop tolerates slightly stale reads but fears one slow node blocking every sale. Which pairing fits?

    • Key by a rare query with synchronous copies
    • Keep no copies at all for maximum speed
    • Key by buyer with asynchronous copies
  8. A team keys its orders table by order date yet mostly looks up single customers. What is the mistake?

    • The key serves rare reports while punishing daily lookups
    • Dates cannot be used as keys
    • Customer lookups need no key at all
LightMySky · lightmysky.comW1-mt_Xvzz5Hnuvu-s1

Corrigé

Pour les adultes. Replier cette page avant de passer le reste.

Splitting data across machines W1-mt_Xvzz5Hnuvu-s1

  1. The reader sees the write the copies confirmed · The write waited for its copies, so the new value is there.
  2. The value that picks each row's node · The key maps each row to its home partition.
  3. Faux · Async returns before copies catch up, so a fast read can be stale.
  4. One hot partition while others idle · Skew piles traffic on one node, which runs hot.
  5. Every message sent in the last hour · The last-hour query spans every room, so it must gather from all partitions.
  6. The copies update asynchronously and lag behind · Async copies lag, so a fast read sees the older value.
  7. Key by buyer with asynchronous copies · The buyer key speeds daily lookups and async writes never wait on a slow copy.
  8. The key serves rare reports while punishing daily lookups · The key should serve the most common query, not the rare one.