Subscribe to receive notifications of new posts:

Everybody gets WebSockets

2016-05-05

2 min read

Two summers ago, with a seemed-big-at-the-time network of 28 datacenters, not long after introducing Medellin, CloudFlare introduced support for WebSockets, initially for our Enterprise customers.

CC BY 2.0 image by Marcin Wichary

Today, with our network nearing 80 global locations, we're pleased to announce support for WebSockets for all our customers, including Enterprise, Business, Pro, and Free, with resources allocated by plan level.

What are WebSockets?

If you don't want to read RFC 6455, then this short paragraph from our previous blog post explains:

The WebSocket protocol is a distinct TCP-based protocol, however, it’s initiated by an HTTP request which is then "upgraded" to create a persistent connection between the browser and the server. A WebSocket connection is bidirectional: the server can send data to the browser without the browser having to explicitly ask for it. This makes things like multiplayer games, chat, and other services that require real-time exchange of information possible over a standard web protocol

There's a lot more technical history in that post covering how we modified NGINX to support a huge number of connections through port reuse. But the bottom line is that WebSockets are a vital technology for web sites that need to get real-time updates for features like social feeds, multimedia chat, collaborative editing, multi-player gaming, stock updates, and more.

Performance & Latency

Because the WebSocket protocol creates a single connection and doesn’t require HTTP requests, WebSockets can provide anywhere from 500:1 to a 1000:1 reduction in unnecessary HTTP header traffic, compared to HTTP polling solutions.

The server no longer needs to wait for a request to come back before it sends new data; it can simply push the data to the client the moment it has new information. Tests have shown a 3:1 reduction in latency compared to other polling solutions.

   

Modern Internet, for More People

Last week, we expanded our deep support for HTTP/2 to include Server Push. HTTP/2 was finalized as a spec in 2015, so almost a newborn child as technologies go. (We're excited to help HTTP/2 grow up fast.)

By comparison, WebSockets is already a toddler, as RFC 6455 was finalized in 2011.

But, perhaps because of complexity or expense, WebSockets hasn't seen as wide adoption as we'd expect. CloudFlare is removing those obstacles, and frankly we're curious to see what happens.

We are building a better Internet, and while that may sound like a platitude... making modern tech easy to use matters. We're eager to see what our customers do to play, grow, and thrive with another tool available.

Read more about WebSockets generally, or review details in our support article.

Cloudflare's connectivity cloud protects entire corporate networks, helps customers build Internet-scale applications efficiently, accelerates any website or Internet application, wards off DDoS attacks, keeps hackers at bay, and can help you on your journey to Zero Trust.

Visit 1.1.1.1 from any device to get started with our free app that makes your Internet faster and safer.

To learn more about our mission to help build a better Internet, start here. If you're looking for a new career direction, check out our open positions.
Speed & ReliabilityProduct News

Follow on X

John Roberts|@pencoyd
Cloudflare|@cloudflare

Related posts

October 24, 2024 1:00 PM

Durable Objects aren't just durable, they're fast: a 10x speedup for Cloudflare Queues

Learn how we built Cloudflare Queues using our own Developer Platform and how it evolved to a geographically-distributed, horizontally-scalable architecture built on Durable Objects. Our new architecture supports over 10x more throughput and over 3x lower latency compared to the previous version....

October 08, 2024 1:00 PM

Cloudflare acquires Kivera to add simple, preventive cloud security to Cloudflare One

The acquisition and integration of Kivera broadens the scope of Cloudflare’s SASE platform beyond just apps, incorporating increased cloud security through proactive configuration management of cloud services. ...