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.

Google
Statistics & Math
Software Engineer
Google
November 29, 2026
Software Engineer
Onsite
Statistics & Math
Medium

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
balls into bins
indicator variables
linearity of expectation
power of two choices
load balancing
How to Approach This
  1. Define your hypotheses (H0 and H1) clearly before performing any test.
  2. Calculate required sample size BEFORE running an experiment, using power analysis.
  3. Remember the Central Limit Theorem: sample means become approximately normal with large n.
  4. Watch for Simpson's paradox. Always segment data by key dimensions.
  5. 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 Questions
Sample Answer
Clarify

Requests choose servers independently and uniformly; servers are identical. Let n=1000n = 1000 requests and m=1000m = 1000 servers....

Approach

Let Xj=1X_j = 1 if server jj gets nothing. P(Xj=1)=(1−1/m)nP(X_j = 1) = (1 - 1/m)^n. Sum over servers by linearity, even though the indicators are dependent. For the maximum, use the known result that with n=mn = m t...


Submit Your Answer
Markdown supported