Delivery Overview
How Tuzzle delivers files through the CDN.
Tuzzle delivers files through a CDN service that handles image processing, caching, access control, and format negotiation.
Delivery Flow
Client Request
↓
Access Validation (via API)
↓
Check Cache
├─ Cache Hit → Serve immediately
└─ Cache Miss ↓
Fetch Original
↓
Apply Transformations
↓
Cache Result
↓
Return Response
CDN URL Structure
https://cdn.tzzl.io/{space_handle}/{storage_path}
For example:
https://cdn.tzzl.io/a1b2c3/image-01HQ...
Add query parameters for transformations:
https://cdn.tzzl.io/a1b2c3/image-01HQ...?w=400&h=300&f=webp
Access Validation
On every request, the CDN validates file access through the API's internal delivery endpoints. This check:
- Verifies the file exists
- Confirms the space handle in the URL matches the file's space
- Retrieves access control settings (public, private, or authenticated)
- Returns file metadata (dimensions, blurhash, face detections)
Response Headers
| Header | Description |
|---|---|
content-type | MIME type of the delivered file |
cache-control | public, max-age=2592000 (30 days) |
etag | Entity tag for conditional requests |
last-modified | Last modification timestamp |
x-image-width | Original image width in pixels |
x-image-height | Original image height in pixels |
x-blurhash | Blurhash placeholder string |
File Types
Tuzzle delivers any file type stored in cloud storage. Image transformations (resize, crop, format conversion) only apply to image files. Non-image files are served as-is.
Error Responses
| Status | Reason |
|---|---|
| 400 | Path traversal attempt (e.g., .. in URL) |
| 403 | Access denied (invalid signed URL or space mismatch) |
| 404 | File not found |
| 422 | Invalid transformation parameters |
| 503 | Server under memory pressure or processing queue full |