Database / ValKey Interview questions
What is the difference between synchronous and asynchronous replication in Valkey?
Valkey defaults to asynchronous replication, and offers the WAIT command as an opt-in way to approximate stronger durability on specific writes.
| Default (Async) | WAIT-backed |
| Client gets a reply immediately; replicas catch up in the background | Client blocks until N replicas acknowledge the write |
| Small window of possible lost writes if the primary crashes | Reduced loss risk, since replicas are confirmed first |
| Lower per-write latency | Added latency while waiting for acknowledgments |
| Best-effort durability guarantee | Stronger, but not a strict two-phase-commit guarantee, and can time out |
More Related questions...