Home / Companies / Ably / Blog / Post Details
Content Deep Dive

WebSockets vs Long Polling

Blog post from Ably

Post Details
Company
Date Published
Author
Kieran Kilbride-Singh
Word Count
877
Company Posts That Month
5
Language
English
Hacker News Points
-
Post removed?
No
Summary

This article compares WebSockets and long polling as methods for building live experiences online. Long polling is a more efficient form of HTTP request/response polling, where the server holds a client connection open until new data becomes available or a timeout threshold is reached. WebSockets are built on top of TCP/IP stack and provide an as-close-to-raw-as-possible TCP communication layer with added abstractions for security considerations. Long polling has advantages such as universal support through XMLHttpRequest, but disadvantages include resource intensity and latency issues. WebSockets offer benefits like reduced latency and full-duplex messaging, but lack automatic recovery when connections are terminated. The article also discusses Ably's serverless WebSocket solution for building live experiences and its support for various transports including WebSockets, XHR streaming, XHR polling, and JSONP polling.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Real-time 5 515 117 54 -12%
Serverless 1 245 48 21 -42%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.