Scaling & Distributed Databases Quiz

Q1. In a Dynamo-style system with N = 3 replicas, which R/W quorum pair guarantees that every read sees the latest successful write?




Q2. An application is deployed across multiple data centers and must continue accepting writes even if network connectivity between sites is lost. Which replication strategy is most appropriate for this scenario?




Q3. In a primary-secondary database setup using asynchronous replication, what is a notable drawback compared to synchronous replication?




Q4. You need to shard a time-series database by timestamp. Which sharding approach makes range queries (by time) efficient but risks hotspots if the data is unevenly distributed?




Q5. What is the main benefit of using consistent hashing to distribute keys across nodes?




Q6. If the primary node of a database cluster fails, which mechanism helps the remaining nodes agree on electing a new primary leader?




Q7. In a microservices distributed transaction, what is an advantage of using the Saga pattern over two-phase commit (2PC)?




Q8. Google Spanner can perform distributed transactions across data centers with strong consistency. What technology does Spanner use to achieve externally-consistent timestamps globally?




Q9. In Amazon’s Dynamo system, vector clocks are used to:




Q10. Which statement about Conflict-Free Replicated Data Types (CRDTs) is correct?




Q11. According to the CAP theorem, an “AP” distributed database (Available and Partition-tolerant) will sacrifice which property during a network partition?




Q12. In the two-phase commit (2PC) protocol, if the coordinator crashes after sending the “prepare to commit” messages (and all participants replied ready) but before sending a commit/abort, what happens to the participant nodes?




Q13. One database shard has become a hotspot because a single key is receiving an extremely high volume of traffic. Which strategy helps mitigate this hot-key issue?




Q14. Which guarantee is provided by an eventually consistent database system?




Q15. In a distributed database cluster, a “split-brain” scenario refers to:




system-design