Expected Idle Servers When Requests Hash to Random Backends
Last updated: November 29, 2026
Quick Overview
A Google frontend sends 1,000 requests, each to one of 1,000 backend servers chosen uniformly at random. Find the expected number of servers that receive no requests, the typical maximum load, and how the power of two choices changes things.
0
0
0 solved
A Google frontend sends 1,000 requests, each to one of 1,000 backend servers chosen uniformly at random. Find the expected number of servers that receive no requests, the typical maximum load, and how the power of two choices changes things.
Load balancing questions in Google loops often hide a balls-into-bins probability problem. The interviewer checks linearity of expectation with indicators, the exponential approximation, and awareness of why random placement produces hot spots.
What the Interviewer Expects
- Define an indicator for each empty server
- Compute the expectation exactly and approximately
- Estimate the maximum load scaling
- Explain the power of two choices
- Validate with a simulation
Key Topics to Cover
How to Approach This
- Define your hypotheses (H0 and H1) clearly before performing any test.
- Calculate required sample size BEFORE running an experiment, using power analysis.
- Remember the Central Limit Theorem: sample means become approximately normal with large n.
- Watch for Simpson's paradox. Always segment data by key dimensions.
- Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
- What is the variance of the number of empty servers?
- How many requests are needed before every server gets at least one?
- How does consistent hashing with virtual nodes compare?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Browse Statistics QuestionsSample Answer
Clarify
Requests choose servers independently and uniformly; servers are identical. Let requests and servers....
Approach
Let if server gets nothing. . Sum over servers by linearity, even though the indicators are dependent. For the maximum, use the known result that with t...