zlacker

[return to "Twitter Is DDOSing Itself"]
1. brigad+Iv[view] [source] 2023-07-01 21:04:17
>>ZacnyL+(OP)
This is why you always use exponential backoff.
◧◩
2. fathyb+8z[view] [source] 2023-07-01 21:27:15
>>brigad+Iv
And when you're at Twitter scale, sprinkle some jitter too.
◧◩◪
3. oblio+UK[view] [source] 2023-07-01 22:49:15
>>fathyb+8z
What do you mean?
◧◩◪◨
4. 8organ+vN[view] [source] 2023-07-01 23:12:37
>>oblio+UK
Jitter is a little randomness in how long clients wait between retries. It ensures that you don't have a "thundering herd" all retrying at the same time. Imagine if your API used exponential backoff of [1s, 2s, 4s, 8s, ...] and a large group of requests gets a retryable error at t=0. They will all retry at exactly t=1, t=2, etc. If the group is large enough that repeated surge of requests can knock you offline.

There's nasty form of this where the site is offline for a bit and then all the clients rush their requests in when it comes back online. The client requests are all coordinated on the site recovery time and end up overloading the site with their coordinated retries.

[go to top]