Grokking the System Design Interview, Volume II
Vote

0% completed

Unique ID Generator: Failure Modes and Operations

Step 8: Failure Modes and Operations

This system stores almost nothing, so most of the usual failure questions do not apply. It has exactly one way to break badly, and it is the clock.

The clock goes backwards

Snowflake puts the current time in the top bits of every id. If a node's clock jumps backwards, it will reach a millisecond it has already used, with the same machine number and a sequence counter that has reset. That produces a duplicate id, which is the one outcome this whole system exists to prevent.

Clocks move backwards more often than people expect

.....

.....

.....

Like the course? Get enrolled and start learning!