Back to Articles

Introducing Support for WebSockets

By Daniel Cid (@dcid) Posted in: cdn-features, cdn

The NOC platform runs a global anycast CDN/WAF with points of presence around the world. While anyone with a domain can use the platform, agencies and hosts managing many properties see outsized benefits from the scale and built-in security.

Today we’re excited to announce full support for WebSocket connections at the edge. Many CDNs limit concurrency or gate features by plan tier; our approach is simple—no artificial per-site connection caps and a consistent configuration model across accounts.

What are WebSockets?

WebSockets (standardized in 2011) upgrade an initial HTTP/1.1 request to a persistent, bidirectional TCP channel between browser and server. That persistent channel enables low-latency, event-driven updates without polling.

Where this matters:

  • Live chat and collaboration apps
  • Real-time dashboards, trading tickers, telemetry streams
  • Multiplayer games and presence indicators
  • Push notifications and streaming updates

WebSockets don’t replace HTTP—they extend it for the specific cases where you need real-time bidirectional communication.

High-level diagram of browser ↔ edge ↔ origin WebSocket flow

NOC’s WebSocket Support

  • Edge termination & pass-through: We handle the HTTP Upgrade handshake at the edge and maintain persistent upstream connections to your origin.
  • No plan-tier caps: No arbitrary per-zone concurrency thresholds.
  • Anycast absorption: Connections land on the closest POP, reducing latency and central origin bottlenecks.
  • WAF aware: Handshake and message frames are subject to sane defaults; you can tune rules for your app’s patterns.

Readiness Checklist for Your Origin

  • Enable Upgrade flow: Ensure your app/server supports Upgrade: websocket and Connection: Upgrade on the initial handshake.
  • Keep-alive/timeouts: Increase idle timeouts to accommodate long-lived connections; avoid aggressive proxies that drop idle sockets.
  • Health & scaling: Monitor connection counts and memory; use horizontal scaling where possible.
  • WAF tuning: If you use custom subprotocols or large messages, adjust size and anomaly limits accordingly.

Notes & Best Practices

  • Authenticate early: Perform auth on the HTTP request before the upgrade (cookies, headers, or query tokens) and re-check on reconnects.
  • Backoff & jitter: Implement exponential backoff on client reconnect loops.
  • Path hygiene: Terminate WebSockets on a dedicated path (e.g., /ws) to simplify policy and routing.
  • Observability: Track connection lifecycle events, message rates, and error codes at the edge and origin.
NOC — Authoritative DNS, CDN & WAF

Accelerate and protect your sites with global DNS, edge caching, and an always-on web application firewall.

See Plans