0
0
HLDsystem_design~5 mins

Database replication (master-slave) in HLD - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the main purpose of master-slave database replication?
To copy data from the master database to one or more slave databases to improve read performance and provide data redundancy.
Click to reveal answer
beginner
In master-slave replication, which database handles write operations?
The master database handles all write operations, while slaves handle read operations.
Click to reveal answer
intermediate
What is a common challenge in master-slave replication related to data consistency?
Slaves may lag behind the master, causing eventual consistency rather than immediate consistency.
Click to reveal answer
intermediate
How does asynchronous replication differ from synchronous replication in master-slave setups?
Asynchronous replication allows the master to continue without waiting for slaves to confirm data receipt, while synchronous waits for confirmation, ensuring stronger consistency but higher latency.
Click to reveal answer
intermediate
Name one advantage and one disadvantage of master-slave replication.
Advantage: Improves read scalability by distributing reads to slaves. Disadvantage: Single point of failure at the master and potential data lag on slaves.
Click to reveal answer
In master-slave replication, which database is responsible for processing write requests?
AMaster
BSlave
CBoth master and slave
DNeither
What is a common issue caused by asynchronous replication in master-slave setups?
AMaster cannot accept reads
BSlaves block writes
CSlaves may have outdated data temporarily
DSlaves overwrite master data
Which of the following is NOT a benefit of master-slave replication?
AAutomatic failover without configuration
BImproved read scalability
CData redundancy
DLoad distribution for reads
What happens if the master database fails in a typical master-slave setup without failover?
AReads and writes continue normally
BSlaves automatically become masters
CSlaves reject all queries
DWrites stop until master is restored
Which replication type waits for slaves to confirm data receipt before completing a write?
AMulti-master replication
BSynchronous replication
CMaster-slave replication
DAsynchronous replication
Explain how master-slave replication works and its main benefits and drawbacks.
Think about who writes and who reads, and what happens if the master fails.
You got /6 concepts.
    Describe the difference between synchronous and asynchronous replication in a master-slave database system.
    Consider how quickly the master waits for slaves before confirming writes.
    You got /5 concepts.