All jobs / Database administrator / High Availability
Database administrator interview question · 1–3 years
Finance says the end-of-day report, which reads from a replica, is missing the last few minutes of orders.
How do you respond?
The strongest answer
Measure the lag and its cause — long transactions, heavy reporting queries, or network — then either route that report to the primary, add lag-aware routing, or fix the workload that is holding replay back
Why it works
Exactly — lag has a cause; find it and decide where that particular read belongs.
What a good answer covers
- Measure lag and find the cause.
- Route lag-sensitive reads deliberately.
- Fix the workload blocking replay.
- Restarts are not diagnosis.
Answers that fall short
- Close, but not the strongest: Tell the report owners that replicas are always a bit behind and they should refresh later
Some lag is normal, but unexplained lag is a symptom to diagnose, not a disclaimer. - Weak: Switch all reads back to the primary until we work it out
That removes the point of the replica and can overload the primary. - Red flag: Restart the replica — that usually catches it up
A restart hides the cause and the replay still has to catch up.
Who gets asked this
More High Availability questions
- With replication and clustering available, when is log shipping still the right answer?
- There is a standby but nobody has ever failed over to it. What do you propose?
- A product needs high availability for its main relational database. How do you pick the topology?
- What can go wrong with automatic failover, and how do you guard against it?
- Analysts run heavy ad-hoc queries against the production primary and slow the application. What do you set up?
- The data platform wants a change feed from the database. Physical or logical replication, and why?
- How do you set up quorum and a witness, and why does the vote count matter?
- For SQL Server, when do you choose an availability group over a failover cluster instance, and what does each…