</> MAANG.io
system design · 301

Advanced

Master system design interviews with scalable architecture patterns, distributed systems, and real-world design challenges.

0/480 solved 0% complete

Section 3: The Busiest Minute Comes After the Polls Close - Scale Estimation & Workload Analysis

Executive Summary: This section turns Northfield College's 8,000 students into a workload, step by step. The election produces 4,800 ballots over 48 hours: 0.03 votes per second on average and 1 vote per second at the opening-email peak. Every ballot ever cast fits in 4.8 MB. The heaviest load arrives after voting ends, when 4,000 students refresh the results page at 400 requests per second, 400 times the voting peak, and a static file on a CDN absorbs it. The availability target leaves 2.9 minutes of downtime for the whole election. We then preview how these numbers grow for a 12-college university and a United States election, and why the hard part changes at each step while the throughput never becomes the problem.

The interviewer has your requirements from Section 2 on the board. "Before you draw anything, size it. How big is this thing?"

Some candidates hear "voting" and reach for a global queue and a distributed database. Two minutes of arithmetic rules that out.

You: "I'll state my inputs so you can correct them. Then I'll derive four numbers: the average rate, the peak rate, storage, and the results load. Then the downtime budget."

Eligible students (registrar roll)       8,000
Turnout                                  60%
Voting window                            48 hours
Races per ballot                         5  (president, vice-president, treasurer, 2 referenda)
Ballot record size                       about 1 KB

Votes: Average and Peak

Ballots:        8,000 × 60%                      = 4,800 ballots
Window:         48 h × 3,600 s                   = 172,800 s
Average rate:   4,800 ÷ 172,800 s                ≈ 0.03 votes/s

An average hides the shape, so find the worst ten minutes. The spike comes when voting opens and the election committee emails everyone the link.

Open the email in the first 10 minutes:   8,000 × 10%   = 800 students
Of those, vote right away:                800 × 75%     = 600 votes
Peak rate:                                600 ÷ 600 s   = 1 vote/s

Alex is one of those 600. They open the email, sign in with college SSO at 09:04 on day one, and finish the 5-race ballot a couple of minutes later. Alex's vote is one of about sixty cast that minute.

You: "One vote per second at the worst moment. One database instance handles that with almost no load, so the p99 ≤ 1 s submission target constrains the work inside the request, not the capacity."

Quick check before moving on:


Sign in to continue reading

The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.

Sign in to read the full lesson

Sign in to MAANG.io

Use your Google or Microsoft account — no password to remember.

Continue with Google Continue with Microsoft

Please accept the terms above to continue.