Election night results page for a regional newspaper
Your task
Your newspaper covers a state election. On election night, 2,400 polling places report their counts to the state election office as they finish. The office publishes running totals through an API, and one call returns the totals for every race. The office updates them each time a polling place reports. Your newspaper may call the API once every 5 seconds.
Your results page shows all 361 races: governor, 60 state house seats and 300 local races. The full set of results is about 300 KB, or 40 KB compressed. Readers want new numbers within 30 seconds of the office publishing them.
At the last election, 40,000 people had the page open at once at 22:00. This year you expect up to 100,000.
What runs between the office's API and your readers, and how does an open page get new numbers?
It covers
- Election results
- Traffic peaks
- Source limits