By Jacob Spoelstra
Research and drafting assistance by Grok.
Several years ago a colleague asked me a question that looked like a five-minute calculation and was not.
We have 100 servers behind a load balancer. An incoming ping is sent to a server chosen uniformly at random. The servers sleep until pinged. If they are all asleep, how many pings do we need to send to have a 95% chance of having woken every one of them?
The naive answers are wrong in instructive ways. A hundred pings is nowhere near enough: the chance of covering all 100 servers in 100 pings is about