fivenines

Practice / target 80%

RDB Snapshotting Practice

01

A key is set after a background snapshot begins. Should it appear in that snapshot? Explain using copy-on-write.

intro

Scenario

A background save forked two seconds ago, and a client has just SET a brand-new key on the live server.

02

Why does atomic rename protect the previous valid snapshot?

intro

Scenario

The save path writes the new dump into a temporary file and renames it over the old one only at the very end.

03

What information must be stored so a hash can be restored with the correct logical behavior?

applied

Scenario

You are defining the on-disk record format for hash values in your snapshot file.

04

Why can RDB load faster than replaying a long AOF?

applied

Scenario

Two servers restart with the same dataset, one loading an RDB file and the other replaying a week of AOF history.

05

What data-loss window exists when only periodic RDB snapshots are enabled?

advanced

Scenario

An operator runs snapshots every five minutes with AOF disabled and asks what crash safety that actually buys.