In a master-slave replication setup, what is the primary role of the slave database?
Think about which database handles writes and which handles reads in this setup.
In master-slave replication, the master handles write operations. The slave replicates data from the master and typically handles read operations to reduce load on the master.
Which replication strategy ensures that all replicas have the exact same data at the same time before any transaction is considered committed?
Consider which method waits for all replicas to confirm before completing a transaction.
Synchronous replication waits for all replicas to confirm the transaction before it is committed, ensuring strong consistency.
What is the most likely consequence of replication lag in an asynchronous replication system?
Think about what happens when replicas receive updates later than the master.
Replication lag means replicas receive updates after some delay, so read queries on replicas might return outdated data.
Which of the following is a key difference between multi-master and master-slave replication?
Consider which replication type allows multiple nodes to accept write operations.
Multi-master replication allows multiple nodes to accept writes and synchronize changes, while master-slave restricts writes to the master only.
You need a replication strategy that minimizes downtime and data loss during a master failure in a distributed database. Which strategy best fits this requirement?
Think about which strategy ensures data consistency and availability even if one master fails.
Synchronous multi-master replication allows multiple masters to be active and keeps data consistent, minimizing downtime and data loss if one master fails.