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

HeaderDescription
content-typeMIME type of the delivered file
cache-controlpublic, max-age=2592000 (30 days)
etagEntity tag for conditional requests
last-modifiedLast modification timestamp
x-image-widthOriginal image width in pixels
x-image-heightOriginal image height in pixels
x-blurhashBlurhash 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

StatusReason
400Path traversal attempt (e.g., .. in URL)
403Access denied (invalid signed URL or space mismatch)
404File not found
422Invalid transformation parameters
503Server under memory pressure or processing queue full