TLDR Web Dev · ARTICLES & TUTORIALS
BACK TO BASICS: WHY WE CHOSE LONG POLLING OVER WEBSOCKETS
Summary from the TLDR Web Dev newsletter
Inferable chose HTTP long polling over WebSockets for its real-time system due to scalability challenges with its Node.js/TypeScript backend and PostgreSQL database. Long polling, unlike short polling or WebSockets, keeps the connection open until data is available or a timeout is reached, offering a balance between immediacy and resource efficiency. This approach avoided complexities associated with WebSockets, such as adapting its observability stack, authentication mechanisms, and infrastructure configurations.