Deepak Kumar

Get in Touch

Let's discuss your next project

All Articles
System DesignReact.jsWebSocketReal-timeNode.js

Engineering India Today's Election Dashboard: Real-Time Data at Scale

Behind the scenes of building India Today's live election results dashboard — handling 10,000+ constituency results in real-time with WebSockets, React, and Node.js.

8 min read

Advertisement

Election night at India Today Group is the Super Bowl of Indian tech media. Millions of concurrent users watching live results. Zero tolerance for downtime. Here's how we engineered it.

The Challenge

Displaying real-time results for 543 Lok Sabha constituencies + 4000+ state assembly seats with sub-second updates to millions of concurrent viewers.

Architecture

EC Data Feed → Node.js Ingestion → Redis Pub/Sub → WebSocket Gateway
  → CDN (static) + SSE/WS (dynamic) → React Dashboard

Key Engineering Decisions

Server-Sent Events over WebSockets — for the public dashboard, SSE is simpler, works through CDN, and handles millions of one-way connections better than bidirectional WebSockets.

React with Canvas rendering — the India map visualization renders 543 constituency polygons. DOM would choke at this scale, so we use HTML Canvas with React for the controls layer.

Redis for pub/sub — when a result comes in, it's published to Redis. All WebSocket gateway instances subscribe and push to connected clients within 200ms, regardless of which server the client is connected to.

Handling Traffic Spikes

We pre-warm CDN caches 30 minutes before result declaration, use auto-scaling on EC2, and implement circuit breakers so that database issues don't cascade to the frontend.

Results

Handled 5 million+ concurrent users on election night with 99.99% uptime and sub-500ms update latency. The dashboard became one of India Today's most-visited features of the year.

Advertisement

Deepak Kumar

Sr Software Engineer at India Today Group

MERN Stack · Generative AI · React.js · WebSocket

Hire Me
All Articles
React.jsWebSocketReal-timeNode.jsIndia TodayEngineering