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¶
-
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.
-
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.
-
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.
-
Draft-16 adds
PUBLISHandSUBSCRIBE_NAMESPACE.PUBLISHlets 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_NAMESPACElets a subscriber request all tracks under a namespace (including future ones), removing per-track subscription overhead. -
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."
-
Open-source tooling available. Cloudflare's moq-rs (Rust) provides
moq-pubandmoq-subCLI tools for publishing and subscribing. Demonstrated piping ffmpeg fragmented MP4 throughmoq-pub→ relay →moq-sub→ffplay. -
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¶
- systems/cloudflare-moq-relay-network — Cloudflare's global anycast MoQ relay network
- systems/moq-transport-protocol — the IETF MoQ Transport protocol (draft-14, draft-16)
- systems/moq-rs — Cloudflare's open-source Rust MoQ implementation
Concepts¶
- concepts/publish-subscribe — the fundamental messaging model MoQ implements
- concepts/relay-as-isolated-scope — relay provisioning creates an isolated namespace scope, not a server instance
- concepts/token-scoped-access — tokens scoped to specific operations (publish/subscribe) on a single relay
- concepts/cdn-relay-provisioning — control-plane API for managing relay scopes and credentials without touching the media data plane
- concepts/fan-out — relay copies each stream to everyone who wants it; publisher doesn't handle distribution
Patterns¶
- patterns/virtual-host-style-relay-provisioning — provisioning creates a namespace scope across existing infrastructure rather than starting dedicated compute
- patterns/scoped-token-per-operation — separate tokens with distinct operation permissions (publish vs subscribe) and independent lifecycle
- patterns/publish-before-subscribe — publisher pushes tracks to relay proactively so first subscriber gets immediate data without round-trip to publisher
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¶
- Original: https://blog.cloudflare.com/moq-relays/
- Raw markdown:
raw/cloudflare/2026-07-31-an-api-for-moq-provision-your-own-isolated-relays-694406d6.md
Related¶
- concepts/quic-transport — MoQ runs on QUIC
- concepts/anycast — Cloudflare's relay network uses anycast routing
- concepts/publish-subscribe — MoQ's fundamental model
- systems/quiche — Cloudflare's QUIC/HTTP/3 implementation (shared transport layer)