4 ms·
> Avoiding thundering herd on reconnect is a very explored problem and wasn't too bad. Can you please share approaches to mitigate this issue?
by playing_colours 5y ago
> Avoiding thundering herd on reconnect is a very explored problem and wasn't too bad.
Can you please share approaches to mitigate this issue?
- malandrew 5y agoCongestion avoidance algorithms such as TCP Reno and TCP Vegas. basically code clients to back off if they detect a situation where they may be a member of a thundering herd.
- rakoo 5y agoExponential back off. Basically try to reconnect after a random short time, if that doesn't work try with a time twice longer, then twice again, etc..
- slaymaker1907 5y agoUsually you want the 2x wait to be a random time between 1.5x and 2x longer or something.
- dcuthbertson 5y agoAs rakoo said, exponential backoff mitigates the thundering herd. I was going to say add some jitter to the time before reconnecting, then I realized rakoo already said "after a random short time", which is exactly what jitter is. (edited for coffee kicking in)