Get the latest tech news

Back to basics: Why we chose long-polling over websockets


Learn how we implemented real-time updates using Node.js, TypeScript, and PostgreSQL with HTTP long polling. A practical guide to building scalable real-time systems without WebSockets.

Worker Node Updates: Hundreds of worker nodes running our Node.js / Golang / C# SDKs needed to know about new jobs as soon as they were available, requiring a querying strategy that didn't bring down our Postgres database Agent State Synchronization: Agents required real-time updates about execution and chat state, which we needed to stream efficiently. Web sockets are built on top of HTTP specifically to serve the kind of realtime data stream that Electric provides. In fact, we actually recommend ElectricSQL if you don't need extreme control or low-level constructs to handle real-time updates.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of basics

basics

Photo of polling

polling

Photo of websockets

websockets

Related news:

News photo

IO_uring Enjoys Hybrid IO Polling & Ring Resizing With Linux 6.13

News photo

An Analysis of the Performance of WebSockets in Various Programming Languages (2021)

News photo

WebSockets cost us $1M on our AWS bill