← Back to Docs
Recipe

CDN Strategies

Ship updates fast without breaking client trust. Edge caching, cache-busting, and fallback patterns for Nimbus auto-update payloads.

Edge-first delivery

Deploy signed payloads to a global CDN with aggressive edge caching. Each release lands on a versioned path like /releases/nimbus_3.2.1.dat. Immutable URLs mean infinite cache TTLs and zero origin fetch after the first request.

Cache-busting with content hashing

Append a SHA-256 hex digest of the payload to the filename: nimbus_a1b2c3.dat. When the loader polls for updates, it fetches a manifest that maps version → hash. The client compares against its local hash and downloads only on mismatch.

Manifest-driven updates

Serve a tiny JSON manifest at a stable URL with a short cache TTL (60 seconds). The manifest lists the latest version, payload hash, and rollout percentage. The loader checks this endpoint, respects the rollout window, and fetches the payload only when eligible.

Stale-while-revalidate fallback

Configure CDN rules to serve stale content if the origin is unreachable. Combined with offline grace caches signed with HMAC, the loader can operate for days without phoning home. Circuit breakers prevent cascading failures when the CDN edge has a partial outage.

Regional routing

Route clients to the nearest edge node using GeoDNS or Anycast. For regions with restrictive firewalls, maintain a secondary origin behind a different ASN. The loader falls back through a priority list of CDN endpoints with exponential backoff and jitter.