Real-Time APIs · Real-Time Transports

Emerging Options: HTTP/3, WebTransport and Managed Services

What's new and when to use a managed real-time platform.

WebTransport (over HTTP/3/QUIC) offers multiple streams and unreliable datagrams with low latency, without TCP head-of-line blocking — useful for games, media and high-frequency updates; browser support is growing but not universal, so keep fallbacks. Managed real-time services (Ably, Pusher, PubNub, AWS AppSync/API Gateway WebSockets, Azure Web PubSub, Cloudflare Durable Objects, Supabase Realtime) handle connection scaling, presence and global edge delivery.

Build vs buy vs new protocols

Criterion Self-hosted WebSockets Managed real-time service WebTransport
Ops effort High at scale Low High (new stack)
Global latency Depends on deployment Edge networks Low (QUIC)
Features Build yourself Presence, history, auth hooks Streams + datagrams
Cost Infra Per message/connection Infra
Maturity High High Emerging
// WebTransport (browser, where supported)
const wt = new WebTransport("https://rt.example.com:4433/game");
await wt.ready;
const writer = wt.datagrams.writable.getWriter();
writer.write(new Uint8Array([1, 2, 3]));          // unreliable, unordered: good for position updates

Common pitfalls

  • Adopting WebTransport without fallbacks.
  • Underestimating the cost of building presence/history/scaling yourself.
  • Vendor lock-in without an abstraction layer.

Key points

  • WebTransport for low-latency streams/datagrams
  • Managed services save ops at scale
  • Keep fallbacks and abstractions

Further reading: MDN: WebTransport API

Practice questions

What advantage do WebTransport datagrams offer for games?

Answer

Unreliable, unordered delivery means stale position updates aren't retransmitted or block newer ones, minimizing latency.

When is a managed real-time service worth it?

Answer

When you need global scale, presence, message history and connection management without a team dedicated to operating WebSocket infrastructure.

Open in the app to mark lessons complete, take notes and track your progress.