Challenge - 5 Problems
Master of Master-Slave Replication
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
What is the primary role of the master in a master-slave database replication setup?
In a master-slave replication system, what is the main responsibility of the master database?
Attempts:
2 left
💡 Hint
Think about which database handles data changes first.
✗ Incorrect
The master database is responsible for processing all write operations and then sending those changes to the slave databases to keep them updated.
❓ Architecture
intermediate1:30remaining
Which component ensures data consistency between master and slaves in replication?
In a master-slave replication architecture, which mechanism is primarily used to keep slave databases consistent with the master?
Attempts:
2 left
💡 Hint
Consider how changes are recorded and sent continuously.
✗ Incorrect
The master records all changes in a binary log and ships these logs to slaves, which replay them to stay consistent.
❓ scaling
advanced2:00remaining
How does master-slave replication improve read scalability?
In a system using master-slave replication, how is read scalability typically improved?
Attempts:
2 left
💡 Hint
Think about how slaves can help with read requests.
✗ Incorrect
Slaves can serve read requests, allowing the system to handle more reads by spreading the load across multiple servers.
❓ tradeoff
advanced2:00remaining
What is a common tradeoff when using asynchronous master-slave replication?
Choosing asynchronous replication between master and slaves often leads to which tradeoff?
Attempts:
2 left
💡 Hint
Consider what happens if the master crashes before slaves catch up.
✗ Incorrect
Asynchronous replication means slaves may lag behind the master, risking data loss if the master fails before changes reach slaves.
❓ estimation
expert2:30remaining
Estimate the maximum number of slaves supported given network bandwidth constraints
A master database generates 100 MB of binary log data per minute. Each slave requires a dedicated network connection with 10 MB/min bandwidth to receive replication data without lag. What is the maximum number of slaves that can be supported without replication delay?
Attempts:
2 left
💡 Hint
Divide total data generated by bandwidth per slave.
✗ Incorrect
The master produces 100 MB/min. Each slave needs 10 MB/min. So, 100 / 10 = 10 slaves can be supported without lag.