SD-49 · LIVE PAGE VIEWER COUNT · INTERACTIVEBreak it.
Break it.
Then fix it.
Connect more viewers, watch what melts, and add the parts a real viewer badge needs. Every switch is a decision you would defend in an interview.
CHALLENGEShow 10M viewers a correct count, fresh within 5 s, with no errors.
StatusHEALTHYAt 1M connected viewers
Update delay4 sTarget 5 s or less
Errors0%Counts correct
Monthly cost$3,17016 gateways
ViewersLIVE
1.0M open tabstraffic source
Gateways × 16OK
Forward every event1.0M / 1.6M sockets
Count API × 2OK
Listing reads only5.0K / 10K req/s
Count aggregatorOK
Every join, leave and ping57K entries/s
Pub/subOK
One msg per viewer150K / 1M msgs/s
Count storeOK
Entries expire57K ops/s · hot key 5.7K/s
Counting smoothly. Connect 10M viewers and see what breaks next.
15%Visits with no goodbyeClosed laptops and lost signal never send a leave, so presence must expire.
154Gateways at 10M65,000 sockets each; a hot page is 154 numbers, not 1 million.
220KCentral writes/sInstead of 570,000 per-viewer writes or 1 million polls.
2 sTickOne coalesced update per page per tick, sent only when the shown number changes.
Want the reasoning behind every switch?Visual walkthroughFull write-up
Was this lab useful?Your vote tells us what to improve next.