Migrate from Varnish
Zero downtime. Run in parallel. Rollback anytime.
Most migrations complete in under a day.
Why Teams Migrate
Simple TOML Config
Clean, declarative configuration in just 40 lines. Any developer can maintain it.
91% Less RAM
With zstd compression, you need 10x less hardware for the same cache capacity.
Native Cache Tags
Tags, soft purge, and request coalescing included in all plans.
Memory Safety
Built in Rust with compile-time safety guarantees. Modern, secure foundation.
34x Faster Purge
Soft purge with stale-while-revalidate. Users never wait for backend.
Modern Operations
REST API for everything. Prometheus metrics. No CLI gymnastics.
Migration Steps
Install Trident
5 minutesDownload and install Trident alongside existing Varnish.
# Docker
docker pull trident/velocity-engine:latest
# Or binary
curl -sSL https://get.trident.dev | shCreate TOML Config
30 minutesTranslate your VCL settings to TOML. Most configs are 10x shorter.
# trident.toml
[server]
listen = "0.0.0.0:8081" # Different port for testing
[cache]
max_memory = "4GB"
default_ttl = "1h"
grace_period = "24h"
[[backends]]
name = "origin"
host = "your-backend.example.com"
port = 443
tls = trueTest in Parallel
2-4 hoursRun Trident on a different port. Compare responses with Varnish.
# Start Trident on port 8081
trident --config /etc/trident/trident.toml
# Compare responses
curl -I http://localhost:6081/products/123 # Varnish
curl -I http://localhost:8081/products/123 # Trident
# Verify headers match
# X-Cache: HIT/MISS should be identicalShift Traffic Gradually
1-2 daysUse load balancer to shift 10%, then 50%, then 100% to Trident.
# nginx load balancer example
upstream cache {
server trident:80 weight=10; # 10% to Trident
server varnish:80 weight=90; # 90% to Varnish
}
# Increase Trident weight as confidence grows
# Monitor error rates, latency, hit ratiosRetire Varnish
1 hourOnce 100% traffic is on Trident, decommission Varnish.
# Final steps
1. Update purge scripts to use Trident API
2. Update monitoring dashboards
3. Remove Varnish from infrastructure
4. Enjoy the simpler operations!VCL to TOML Translation
Varnish VCL
vcl 4.1;
backend default {
.host = "backend.example.com";
.port = "443";
.ssl = true;
}
sub vcl_recv {
if (req.http.Cookie ~ "session") {
return (pass);
}
if (req.http.Authorization) {
return (pass);
}
}
sub vcl_backend_response {
set beresp.ttl = 1h;
set beresp.grace = 24h;
if (beresp.http.Cache-Control ~ "no-cache") {
set beresp.uncacheable = true;
}
}
sub vcl_deliver {
if (obj.hits > 0) {
set resp.http.X-Cache = "HIT";
} else {
set resp.http.X-Cache = "MISS";
}
}Trident TOML
# trident.toml
[[backends]]
name = "default"
host = "backend.example.com"
port = 443
tls = true
[cache]
default_ttl = "1h"
grace_period = "24h"
# Session/auth bypass is automatic!
# No config needed - secure by default
[response_headers]
x_cache = true
# That's it! 15 lines vs 35 lines
# And no scripting language to learnMost VCL features are built-in defaults in Trident. You don't need to configure them.
Common VCL Patterns
Cache Tags (Varnish Plus)
Varnish Plus (€30K/year)
# Requires commercial license
import xkey;
sub vcl_backend_response {
set beresp.http.xkey =
beresp.http.X-Cache-Tags;
}Trident (All plans)
# Just works! No config needed.
# Tags from X-Cache-Tags header
# are automatically indexed.Health Checks
Varnish VCL
probe health {
.url = "/health";
.interval = 5s;
.timeout = 2s;
.window = 5;
.threshold = 3;
}
backend default {
.host = "backend";
.probe = health;
}Trident TOML
[[backends]]
name = "default"
host = "backend"
health_check_path = "/health"
health_check_interval = "5s"Strip Tracking Params
Varnish VCL
sub vcl_recv {
set req.url = regsuball(
req.url,
"(\?|&)(utm_[^&]+|fbclid=[^&]+)",
""
);
}Trident TOML
[cache.key]
ignore_query_params = [
"utm_*",
"fbclid",
"gclid"
]Zero-Risk Rollback
Migration not going as planned? Roll back instantly by shifting traffic back to Varnish. No data loss, no downtime.
Parallel Running
Both caches run simultaneously during migration
Instant Rollback
Shift traffic back in seconds via load balancer
Compare Metrics
Monitor both systems before committing
Migration Support
Self-Service
- ✓Documentation & guides
- ✓VCL to TOML examples
- ✓Community support
- ✓GitHub issue tracking
Assisted Migration
- ✓Dedicated migration engineer
- ✓VCL review & translation
- ✓Performance benchmarking
- ✓Production go-live support
Ready to Migrate?
Start your free trial and run Trident alongside Varnish today.