Backend Protection
Your backend handles 5 requests. Trident handles 10,000.
Never crash on Black Friday again.
How It Works
Three Layers of Protection
Each layer catches what the previous one couldn't handle
Request Coalescing
When multiple users request the same uncached URL, only one request goes to your backend. All others wait and share the response. 92% reduction in backend calls.
Learn more about coalescing →Connection Limiting
Set a maximum number of concurrent connections to each backend. Excess requests queue with a configurable timeout. Your database never sees a traffic spike.
[[backends]]
name = "magento"
[backends.connection_limit]
max_connections = 5
queue_size = 50
queue_timeout = "2s"Overflow Handling
When the queue is full, Trident has three options: serve stale content, return 503, or show a branded waiting page with auto-refresh. Users never see ugly errors.
[backends.connection_limit]
overflow_action = "serve_stale" # or "return_503" or "serve_waiting_page"
stale_fallback = "serve_waiting_page"
[backends.connection_limit.waiting_page]
retry_after = 3
title = "High Traffic"
message = "We're experiencing high demand..."Feature Comparison
| Feature | Trident | Varnish OSS | Varnish Plus |
|---|---|---|---|
| Request Coalescing | ✓ Built-in | ✗ | ✓ Extra cost |
| Connection Limiting | ✓ Built-in | ✗ | VMOD required |
| Request Queue | ✓ Built-in | ✗ | ✗ |
| Queue Timeout | ✓ Configurable | ✗ | ✗ |
| Overflow Actions | ✓ 3 options | ✗ | ✗ |
| Waiting Page | ✓ Branded | ✗ | ✗ |
| Stale Fallback | ✓ Automatic | Manual VCL | Manual VCL |
| Per-Backend Isolation | ✓ | ✗ | ✗ |
Real-World Scenario
Black Friday Flash Sale
Without Trident
- 10:00:00 — Flash sale starts
- 10:00:01 — 5,000 users hit product page
- 10:00:02 — Database connections maxed
- 10:00:03 — Response times spike to 30s
- 10:00:05 — Backend crashes
- 10:00:10 — Users see 502 errors
- Result: Lost sales, angry customers
With Trident
- 10:00:00 — Flash sale starts
- 10:00:01 — 5,000 users hit product page
- 10:00:01 — Coalescing: 1 backend request
- 10:00:01 — Connection limit: 5 max to DB
- 10:00:02 — All 5,000 users served
- 10:00:02 — Backend CPU: 15%
- Result: Record sales, happy customers
Battle-Tested
12 dedicated E2E tests for backend protection scenarios
queue_timeout_serve_stalerequest_coalescing_interactionper_backend_isolationstale_fallback_cold_cachereturn_503_overflowwaiting_page_overflowprotection_stats_apiqueue_length_trackingpermit_releaseconfig_reload_preserves_stateProtect Your Origin Today
Backend protection is included in all Trident plans.
Your backend will thank you.