Dealing With Contention medium
What is the purpose of adding 'Jitter' (Randomness) to retry delays?
- A To make logging interesting.
- B To increase security.
- C To prevent 'Thundering Herd' synchronization. If 1000 clients fail at once and backoff exactly 1s, they will all retry at T+1s, causing another spike. Jitter spreads them out.
- D To use closer servers.
Answer: C. To prevent 'Thundering Herd' synchronization. If 1000 clients fail at once and backoff exactly 1s, they will all retry at T+1s, causing another spike. Jitter spreads them out.
Synchronization is the enemy of stability. `sleep(backoff + random_noise)` desynchronizes the herd.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- Why is 'Exponential Backoff' preferred over constant intervals for retries?
- What is the primary purpose of a Mutex (Mutual Exclusion) lock?
- Why does adding more threads sometimes *decrease* performance?
- In a Saga, if a Compensating Transaction (Undo) fails repeatedly due to contention, what is the last resort?
- In a database, what happens if Transaction A locks a row and Transaction B tries to modify the same row?
- A database restart causes thousands of application servers to instantly try to reconnect. This crashes the DB again. This is called: