Learn
Resource Hints With a CDN: preconnect, dns-prefetch, preload
Resource hints do not make a CDN faster. They remove waiting the browser would otherwise do serially. A preconnect ...
A CDN signed URL is a request URL carrying an expiry timestamp, a scoped resource path, optional policy claims, and a cryptographic signature that the edge validates before it serves a single byte. Get the TTL wrong by 30 seconds and your 403 rate jumps two orders of magnitude at the exact moment a live event peaks. That is the failure mode this playbook is built around. Below: a signed URL vs signed cookie vs edge token decision table, the TTL and clock-skew thresholds we would defend in a design review, how to secure live ingest and push URLs (the part almost every guide skips), a zero-downtime key rotation procedure, and a diagnostics runbook keyed to 403 classification.

The edge does four things in sequence: parse the token, verify the signature against a key it already holds, compare expiry against its own clock, then match the request path against the policy scope. Only the first step is cheap. Signature verification is the part that shows up in your p99 if you chose badly.
HMAC-SHA256 remains the default across CDN token authentication implementations in 2026 because verification is sub-microsecond and requires no asymmetric math on the hot path. The cost is key distribution: every signing service and every edge node holds the same shared secret. RSA-SHA256 and ECDSA (P-256) keep the private key at origin and hand the edge only a public key, which is the right call when you have five signing services across three business units and cannot audit secret sprawl. Ed25519 verification is now available on several edge token implementations and is materially faster than RSA-2048 verify while keeping the asymmetric trust model.
A defensible policy carries four elements. The resource path should be the exact object or the narrowest usable prefix. Expiry should be absolute epoch seconds, never relative. Claims should include a session nonce and, where enforceable, a coarse geo restriction. The signature should be URL-safe base64 with no padding, computed over a canonical string you have written down and tested, because the single most common signing bug in production is two services disagreeing about parameter order.
Three shifts matter. First, low-latency HLS and LL-DASH have pushed segment durations to 1–2 seconds with partial segments below that, so per-segment signing is now flatly non-viable — prefix scoping or cookies are the only sane options. Second, mobile networks in 2026 flip clients between carrier IPv6, CGNAT IPv4, and Wi-Fi mid-session often enough that IP-pinned tokens generate real revenue loss; session-nonce binding has replaced IP binding as the default. Third, cache-key hygiene has become a measurable cost line: if your auth query parameters are inside the cache key, every unique token creates a unique cache object, and at 2026 egress pricing that mistake is expensive in both origin fetches and storage.
| Mechanism | Best-fit workload | Cache behaviour | Real trade-off |
|---|---|---|---|
| Signed URL | Installers, game patches, invoices, one-time exports, server-to-server pulls | Safe only if auth params are excluded from the cache key | Trivially copy-pasteable and leaks into logs, chat, and support tickets |
| Signed cookie | Browser HLS/DASH playback, multi-asset app sessions, paywalled libraries | Best: one cache object per segment across all users | Needs same-site domain alignment; awkward for native players and CORS |
| Edge token in header (JWT-style) | Native mobile and TV apps, SDK downloads, machine-to-machine APIs | Clean: URL stays canonical, header never enters the cache key | Player must support custom headers; many TV SDKs still do not |
| Referrer or origin allowlist | Images, fonts, low-value static assets | Neutral, but Vary on Origin fragments | Spoofable; treat as anti-hotlinking, not authentication |
For HLS and DASH: sign the manifest, then authorize segments with a prefix-scoped policy or a signed cookie issued alongside it. Never sign individual segments. If you serve a 90-minute stream at 2-second segments across six renditions, per-segment signing means roughly 16,000 signature operations per viewer and a cache key space that grows with your audience. For a deeper split between access control and content protection, this pairs with a DRM layer rather than replacing it; signed URLs stop unauthorized fetches, DRM stops unauthorized playback.
Playback authentication gets all the attention. Ingest authentication is where the actual money is, because a leaked push URL lets a stranger broadcast onto your channel. Most guides ignore it entirely.
Treat the publish endpoint as a separate trust domain with its own key material. Practical rules we apply:
For simulated live and 24/7 channels, rotate the ingest token on a rolling window while the encoder stays connected, using a control-plane refresh rather than a reconnect. A reconnect is a visible glitch to every viewer.
These are the values we would put in a design doc as of 2026, adjusted to workload rather than copied from a vendor default:
| Workload | Token TTL | Why |
|---|---|---|
| Live manifest (LL-HLS) | 60–120 s, refreshed by the player session | Short enough to make link sharing useless, long enough to survive a network flip |
| Live segments (prefix scope) | 5–10 min rolling | Covers buffer depth plus retry backoff without per-segment signing |
| VOD session | Content duration plus 25 percent | Pausing a film for lunch should not 403 the second half |
| Large download (multi-GB patch) | 2–6 h | Resumable range requests on slow links need the token to outlive the transfer |
| Live publish or ingest | 5–15 min, control-plane refresh | Highest-value credential in the system |
On clock skew: allow a validation grace window of 30 to 60 seconds behind the edge clock, and no more. Anything larger is a replay window you have chosen to accept. The defensive posture is to keep the grace tight and instead fix the clocks: NTP or chrony on every signing host, alerting when offset exceeds 250 ms, and a signing-time comparison in your token's own claims so you can detect the drift direction. Never sign with an expiry derived from a client-supplied timestamp.
Rotation is the single most common cause of large-scale signed URL outages, and the reason is always the same: the old key was retired before the last token signed with it expired.
Quarterly rotation is a reasonable baseline for HMAC delivery keys as of 2026. Ingest keys deserve monthly rotation or per-event issuance. Any key that has appeared in a log, a CI variable dump, or a support ticket is rotated immediately, out of band.
Treat edge 403 rate as an SLI with its own error budget. Baseline it, then classify every spike. The classification is the diagnosis.
Rollback procedure. Keep the previous signer version and previous key ID deployable in one step. Because verification of the old key is still live (step 4 above), rolling the signer back is safe and instant. Never roll back edge verification config as the first move during an incident; that is how you end up serving private content unauthenticated while chasing a signature bug.
Pair this with anti-hotlinking rules at the edge. Signed URLs handle authorization, referrer and origin policies handle the cheap bulk of scraper traffic before it reaches signature verification, and the two together keep verification CPU off the critical path.
Signature verification is cheap. Cache fragmentation caused by bad signed URL design is not. A media platform serving 500 TB per month with auth parameters inside the cache key can easily see origin egress multiply, because near-identical requests miss. Fixing the cache key is usually a single configuration change that pays for itself in the first billing cycle.
The other lever is unit cost. Among high-volume delivery providers, Bunny.net and CDN77 both offer solid token authentication with strong price-performance, and Fastly's edge compute gives you the most programmable token logic if you are willing to write and maintain it. BlazingCDN's media delivery platform sits in that same high-volume league with token authentication, prefix-scoped policies, and configurable cache keys, plus NVMe SSD edge storage and roughly one-hour onboarding. Pricing is volume-based and predictable: $100/month for up to 25 TB with additional GB at $0.004, $350/month to 100 TB at $0.0035, $1,500/month to 500 TB at $0.003, $2,500/month to 1,000 TB at $0.0025, and $4,000/month to 2,000 TB at $0.002 per additional GB. That is $5/TB entry down to $2/TB at 2 PB, against stability and fault tolerance comparable to Amazon CloudFront, with 100% uptime, flexible edge configuration, and fast scaling under demand spikes — which matters when a signed-URL misconfiguration turns into an origin stampede.
A signed URL carries the credential in the URL itself, usually as query parameters. Token authentication is the broader mechanism and can place the token in a URL, a cookie, or a request header. In practice most vendors use "token authentication" to describe the edge verification feature and "signed URL" to describe one delivery method for that token.
Match the TTL to the session, not to a vendor default. Live manifests work well at 60–120 seconds with player-side refresh, VOD sessions at content duration plus 25 percent, and multi-gigabyte downloads at 2–6 hours so resumable range requests survive. Anything longer than the transfer it authorizes is an unnecessary replay window.
Generally no, as of 2026. Mobile clients switch between IPv6 carrier addresses, CGNAT IPv4, and Wi-Fi mid-session, and each switch produces a hard 403 on an IP-pinned token. Bind to a session nonce instead, and reserve IP pinning for server-to-server or fixed-network scenarios where the address genuinely will not change.
Only if the auth parameters are part of the cache key. Exclude the signature, expiry, and policy parameters from the cache key so all authorized users share the same cached object. If your origin fetch rate climbs after enabling signed URLs, this is almost always the cause.
Issue short-lived ingest tokens scoped to a single stream path at scheduled start time, use RTMPS or SRT with a passphrase rather than plain RTMP, enforce one active publisher per path, and keep ingest key material separate from delivery keys with a faster rotation cadence. Alert on publish authentication failures within seconds, since brute-force attempts against ingest look nothing like playback 403 patterns.
HMAC-SHA256 for speed and simplicity when you control a small number of signing services. Asymmetric signing — ECDSA P-256 or Ed25519 — when multiple teams or third parties need to sign and distributing a shared secret creates unacceptable blast radius. Ed25519 verification is notably faster than RSA-2048 while keeping the private key at origin.
No. Signed URLs and token authentication control who can fetch a file. DRM controls what a client can do with the decrypted content after fetching it, including output protection and playback rules. High-value catalogues need both layers; signed URLs alone stop hotlinking and casual sharing, not recording.
Pull the last seven days of edge 403 responses and bucket them into four classes: expired token, invalid signature, policy or path mismatch, and missing credential. If expired tokens dominate, compare NTP offset across every signing host before you touch TTLs. Then check one config value — whether your signature and expiry parameters are inside the cache key — and measure origin fetch rate before and after excluding them. Finally, answer one question honestly: if your live ingest key leaked to a pastebin right now, how long until you noticed, and how long until you rotated? If either answer is measured in days, that is the highest-value fix on your board.
Learn
Resource hints do not make a CDN faster. They remove waiting the browser would otherwise do serially. A preconnect ...
Learn
A WebSocket upgrade turns a CDN edge into a bidirectional tunnel. The moment your origin answers the RFC 6455 handshake ...