Skip to content

CLOUDFLARE

Read original ↗

Cloudflare — An API for MoQ: provision your own isolated relays

Summary

Cloudflare launches a provisioning API for Media over QUIC (MoQ) relays, allowing developers to create isolated relay scopes with separate publisher and subscriber credentials via a single API call. Unlike traditional relay deployments requiring dedicated servers, provisioning a Cloudflare MoQ relay creates an isolated scope across the existing global anycast network — no VMs, containers, or dedicated processes — available in 330+ cities within seconds. The relays support draft-14 and draft-16 of the IETF MoQ Transport specification with authentication. Free during beta.

Key takeaways

  1. MoQ is a publish/subscribe protocol over QUIC being standardised at the IETF. Publishers send named streams of data; subscribers request by name; relays (CDN servers) handle fan-out without inspecting content. One protocol replaces separate systems for live video, video calls, and low-latency messaging.

  2. Relay provisioning is virtual-host-style, not instance-style. Creating a relay doesn't start a VM, container, or dedicated process — it creates an isolated scope across the existing global network. Analogous to adding a virtual host rather than starting a new web server. Available immediately without choosing regions, estimating capacity, or setting up a load balancer.

  3. Token-based access control separates publishers from subscribers. Each relay has scoped tokens — publish-only, subscribe-only, or both — with independent expiration and revocation. A viewer's credentials cannot be used to hijack a publisher's tracks. The token travels in the URL path and is checked at session open.

  4. Draft-16 adds PUBLISH and SUBSCRIBE_NAMESPACE. PUBLISH lets a publisher push a track to a relay before any viewer requests it — eliminates the subscription-must-travel-to-publisher-first latency on first-viewer connect. SUBSCRIBE_NAMESPACE lets a subscriber request all tracks under a namespace (including future ones), removing per-track subscription overhead.

  5. The provisioning API design is being standardised. Cloudflare is documenting the design in draft-englishm-moq-cdn-provisioning — an Internet-Draft proposing a common provisioning model across CDN and relay implementations. The draft calls the resource a "scope" rather than a "relay."

  6. Open-source tooling available. Cloudflare's moq-rs (Rust) provides moq-pub and moq-sub CLI tools for publishing and subscribing. Demonstrated piping ffmpeg fragmented MP4 through moq-pub → relay → moq-subffplay.

  7. 1,000+ unique clients still connect daily to the unauthenticated open-preview endpoints (draft-14), validating the protocol's utility for client development and testing even without access controls.

Operational numbers

Metric Value
Cloudflare MoQ relay locations 330+ cities (same as edge network)
Daily unique clients on open preview 1,000+
Supported IETF drafts draft-14, draft-16
Relay provisioning latency "within seconds"
Pricing Free during beta

Systems, concepts, and patterns extracted

Systems

Concepts

Patterns

Caveats

  • Beta pricing (free) — production pricing not disclosed.
  • Token model is per-relay granularity today; finer-grained (per-track, per-namespace) permissions are under IETF community development.
  • The MoQ CDN provisioning Internet-Draft is early stage — API model may change.
  • No production scale numbers disclosed (QPS, concurrent sessions, bandwidth served).
  • Only fragmented MP4 demonstrated; other container formats not discussed.

Source

Last updated · 606 distilled / 1,847 read