CDN on Zerops
Zerops CDN has 6 global regions with a fixed 30-day cache TTL (HTTP Cache-Control headers are ignored by CDN but still affect browsers). Built on Nginx + Cloudflare geo-steering.
Regions
- EU (Prague, CZ) — Primary + all-region failover
- EU (Falkenstein, DE) — Secondary European
- UK (London)
- AU (Sydney)
- SG (Singapore)
- CA (Beauharnois, Canada)
DNS TTL: 30 seconds. Geo-steering routes to nearest node. EU Prague is fallback if all others down.
CDN Modes
Object Storage CDN
- URL:
https://storage.cdn.zerops.app/bucket/path - Env var:
${storageCdnUrl} - Direct from Object Storage through CDN
Static CDN
- URL:
https://static.cdn.zerops.app/domain.com/path - Env var:
${staticCdnUrl} - For custom domains on static/nginx services
- Wildcard domains NOT supported
API CDN
- Coming soon
- Env var:
${apiCdnUrl}
Cache Behavior
- TTL: Fixed 30 days (not configurable)
- HTTP
Cache-Controlheaders: Affect browser caching, NOT CDN caching - Eviction: LRU when storage capacity reached
- First request: Fetched from origin and cached
Purge Patterns
Wildcard must be at end. Use $ suffix for exact file match.
Purge via zsc
Signature: zsc cdn purge <domain> [path] — the domain is required first; the path/pattern is the optional second arg (defaults to *). Works for Static-Mode CDN only — Object-Storage CDN content is purged via the REST API, not zsc. Run from a container whose CDN domain is active.
Gotchas
- CDN URLs are project-scoped env vars:
${storageCdnUrl},${staticCdnUrl},${apiCdnUrl}are referenced directly with no hostname prefix (unlike service vars like${storage_apiUrl})