Cache Compression
91% less memory. 11x more content. Same performance.
Industry-leading cache efficiency.
Memory Usage Comparison
15,000 Cached Entries (Mixed Content)
What This Means For You
Lower Infrastructure Costs
Same cache capacity with 91% less RAM. A 4GB server does the work of a 44GB server.
Higher Hit Rates
More content fits in cache before eviction. Less backend traffic, faster responses.
Better Customer Density
For hosting providers: 10x more customer sites on the same hardware.
Three Lines of Config
# trident.toml
[cache.compression]
enabled = true # Enable compression
algorithm = "zstd" # zstd or gzip
level = 3 # 1-19 (3 is fast + good ratio)
# Optional: only compress certain types
content_types = ["text/*", "application/json", "application/javascript"]
min_size = "1KB" # Don't compress tiny responseszstd (Recommended)
- • Best compression ratio
- • Very fast decompression
- • Developed by Facebook
gzip (Alternative)
- • Universal compatibility
- • Slightly lower ratio
- • Good for mixed content
Availability Comparison
| Product | Cache Compression | Memory Savings |
|---|---|---|
| Trident Velocity | ✓ Built-in zstd/gzip | 91% |
| Varnish OSS | ✗ Not available | 0% |
| Varnish Plus | ✗ Not available | 0% |
| Nginx | ✗ Not available | 0% |
| HAProxy | ✗ Not available | 0% |
| Cloudflare | ✗ Edge only | 0%* |
* CDNs compress on the edge, but your origin cache still uses full memory
How It Works
Response Received
Trident receives response from backend with Content-Type header.
Eligibility Check
Checks if content type matches configured types and size exceeds min_size.
Compression
Response body compressed with zstd at configured level before storing.
Storage
Compressed data stored in cache. Headers preserved separately.
Serving
On cache hit, decompressed instantly (zstd is very fast) and served to client.
Calculate Your Savings
Current Setup
With Trident
Cut Your Infrastructure Costs
Cache compression is included in all Trident plans.