Menu

How to Scale Live Polls by Publishing Aggregated Tallies Instead of Every Vote
📰

How to Scale Live Polls by Publishing Aggregated Tallies Instead of Every Vote

DEV Community: backend·loganpierce2073·about 1 hour ago
#TMZwXkNv
#devtobackend#devto#dev#vote#version
Reading 0:00
15s threshold

Short answer: publish an aggregated tally to viewers, keep each accepted vote in an auditable write path, and let reconnecting clients fetch a versioned snapshot before resuming updates. Publishing every vote is justified only when the product must expose a public event-by-event stream and its fan-out budget has been measured against peak participation.

The bill is dominated by fan-out, not ballot ingestion. For a poll with V accepted votes, C connected viewers, and a batch size of B votes, publishing every vote creates roughly V * C outbound deliveries; publishing one tally per batch creates roughly ceil(V / B) * C . Those are workload arithmetic, not benchmark claims, but they reveal the lever that matters. At 20,000 votes and 8,000 viewers, the first design schedules 160 million viewer deliveries, while batches of 100 schedule about 1.6 million.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.