Practice replication lag vocabulary: replica delay from primary, lag spikes during backup windows, lag-triggered read-only mode, and async vs sync replication trade-offs.
0 / 15 completed
1 / 15
What does 'the replica is 30ms behind the primary' mean?
Replication lag of 30ms means writes acknowledged by the primary 30ms ago have not yet been applied to the replica. Reads from the replica may return data that is 30ms stale — a concern for applications requiring read-your-writes consistency.
2 / 15
Why does 'replication lag spike during the backup window'?
Backup jobs compete for disk I/O and CPU with the replication process. During a backup window, the primary may generate write-ahead log entries faster than the replica can apply them, causing lag to spike — and then recover after the backup completes.
3 / 15
A system is configured so that 'lag threshold triggers read-only mode.' What is the purpose of this safeguard?
Some high-consistency systems switch to read-only mode when replication lag exceeds a threshold. This prevents new writes that would widen the divergence between primary and replica, protecting against data loss if a failover occurs while lag is high.
4 / 15
What is the key trade-off between asynchronous and synchronous replication?
Asynchronous replication: the primary acknowledges the write immediately, then replicates in the background — fast but risks losing recent writes if the primary fails. Synchronous replication: the primary waits for at least one replica to confirm the write — no data loss but higher write latency.
5 / 15
An engineer says 'we're seeing 500ms of ___ lag on our read replica.' What word fits?
'Replication lag' is the standard term for the delay between when a write is committed on the primary and when it is applied on a replica. 500ms lag on a read replica means reads from that replica can be up to 500ms stale.
6 / 15
Reviewer: 'The replication lag is currently spiking. We're seeing almost 1 second delay between the primary and the read replica during peak usage times. This could be impacting our user experience – slow reads on non-critical features.'
Which of the following best describes the reviewer's concern regarding the replication lag?
The reviewer isn't simply stating a number; they're highlighting the *impact* of the lag – slow reads during peak usage. The key here is recognizing that replication lag, even if technically 'within limits' based on some arbitrary metric, can still negatively affect user experience and therefore warrants attention. Options A, C, and D all miss this crucial connection between lag and a real-world problem. Understanding the *why* behind the numbers is critical for effective troubleshooting.
7 / 15
Reviewer: 'The replication lag is currently spiking. We're seeing almost 1 second delay between the primary and the read replica during peak usage times. This could be impacting our user experience – slow reads on non-critical features.'
Which of the following best describes the reviewer's concern regarding the replication lag?
The reviewer isn't simply stating a number; they're highlighting the *impact* of the lag – slow reads during peak usage. The key here is recognizing that replication lag, even if technically 'within limits' based on some arbitrary metric, can still negatively affect user experience and therefore warrants attention. Options A, C, and D all miss this crucial connection between lag and a real-world problem. Understanding the *why* behind the numbers is critical for effective troubleshooting.
8 / 15
Reviewer: 'The replication lag is currently spiking. We're seeing almost 1 second delay between the primary and the read replica during peak usage times. This could be impacting our user experience – slow reads on non-critical features.'
Which of the following best describes the reviewer's concern regarding the replication lag?
The reviewer isn't simply stating a number; they're highlighting the *impact* of the lag – slow reads during peak usage. The key here is recognizing that replication lag, even if technically 'within limits' based on some arbitrary metric, can still negatively affect user experience and therefore warrants attention. Options A, C, and D all miss this crucial connection between lag and a real-world problem. Understanding the *why* behind the numbers is critical for effective troubleshooting.
9 / 15
Reviewer: 'The replication lag is currently spiking. We're seeing almost 1 second delay between the primary and the read replica during peak usage times. This could be impacting our user experience – slow reads on non-critical features.'
Which of the following best describes the reviewer's concern regarding the replication lag?
The reviewer isn't simply stating a number; they're highlighting the *impact* of the lag – slow reads during peak usage. The key here is recognizing that replication lag, even if technically 'within limits' based on some arbitrary metric, can still negatively affect user experience and therefore warrants attention. Options A, C, and D all miss this crucial connection between lag and a real-world problem. Understanding the *why* behind the numbers is critical for effective troubleshooting.
10 / 15
During a standup meeting, Ben says: 'We're seeing a persistent 200ms of replication lag on our staging environment. The backup window is running every night at 3 AM. It's impacting our integration tests.' What does Ben *most* likely mean when he mentions the 'backup window'?
The 'backup window' refers specifically to the timeframe during which the read replica receives its initial synchronization from the primary. This is when changes are actively copied, and therefore, a lag spike coinciding with this period is highly probable. Downtime for maintenance wouldn't inherently *cause* lag; it would simply interrupt replication.
11 / 15
You are reviewing a pull request to add a new feature that significantly increases write load on the primary database. The PR description includes this line: 'To mitigate potential replication lag, we've configured automatic failover with a 5-minute delay.' What is the *primary* purpose of this configuration?
The '5-minute delay' in automatic failover is a crucial safeguard. It provides a buffer between the primary database experiencing issues and the read replica taking over, preventing a cascading failure or prolonged downtime while waiting for synchronous replication to complete – which would be far more disruptive.
12 / 15
Chloe writes in a Slack message: 'I'm seeing a high replication lag value (around 3 seconds) during peak hours. We're running a synchronous replication setup.' What is the *most* likely reason for this observed lag?
In a *synchronous* replication setup, the read replica is blocked until it receives an acknowledgement (confirmation) from the primary that the write operation was successful. This creates a dependency and introduces latency as the read replica waits for this confirmation—the very definition of synchronous replication.
13 / 15
You're investigating increased replication lag. The monitoring system shows a persistent 150ms delay. A colleague suggests: 'Let's just increase the batch size for replication.' What is the *potential* problem with this suggestion?
While increasing batch sizes *can* improve replication throughput under ideal conditions, it can also overload the network. A large batch transmitted over a congested network will actually *increase* lag, as packets are dropped and retransmitted. It's crucial to consider network bandwidth alongside batch size.
14 / 15
During a standup meeting, Sarah says: 'We're seeing a persistent 100ms of replication lag on our development replica. The database is configured for asynchronous replication and we've increased the write buffer size.' What is the *primary* reason this lag might be present?'
In asynchronous replication, data isn't immediately written to the replica. Instead, it's buffered and sent later. A small write buffer size can cause this buffer to fill up quickly during peak loads, leading to replication lag. An unstable network connection could also contribute, but a properly sized write buffer is the more likely immediate cause given the asynchronous setup.
15 / 15
You're reviewing a pull request to migrate a service from synchronous to asynchronous replication. The PR description states: 'This change will reduce the impact on primary database performance but may introduce higher replication lag during peak loads.' What does this statement primarily indicate about the trade-off involved?
Synchronous replication guarantees immediate data consistency but introduces a performance bottleneck on the primary server. Asynchronous replication removes this bottleneck, allowing for higher throughput, but at the cost of potential lag—a delay in replicating changes to the replica. This reflects the core trade-off: speed versus consistency.
What does the "Replication Lag Vocabulary" exercise cover?
Practice replication lag vocabulary: replica delay from primary, lag spikes during backup windows, lag-triggered read-only mode, and async vs sync replication trade-offs.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to use with no account, sign-up, or paywall.
How many questions are in "Replication Lag Vocabulary"?
This exercise has 15 questions. Each one gives instant feedback with an explanation, so you can see exactly why an answer is right or wrong.
Do I need to create an account to save my progress?
No account is required. The progress bar and score are tracked in your browser for the current session -- the exercise is designed to be a quick, repeatable drill rather than something you resume later.
What happens if I get an answer wrong?
You'll see the correct answer highlighted immediately, along with a short explanation of why it's correct. Wrong answers aren't penalized beyond your score, and you can keep going through every question.
How is this exercise different from reading an article?
Articles explain vocabulary and concepts through prose, while exercises like this one are interactive drills -- multiple-choice questions -- that test and reinforce your recall of specific terms and phrasing.
Can I retry this exercise?
Yes -- use the "Try again" button on the results screen to reset your score and go through all the questions again from the start.
Where can I find more Distributed Systems Consensus exercises?
Browse the full Distributed Systems Consensus hub for related drills, or check the site-wide exercises index for other IT English topics.
Is this exercise suitable for beginners?
This exercise assumes basic familiarity with IT terminology. If a term feels unfamiliar, check the site Glossary for a plain-English definition before attempting the questions.
How often is new content like this published?
New exercises are added regularly across all categories, alongside new vocabulary sets and articles. Check back on the exercises hub to see what's new.