Shadow backend
Absorb a website's traffic into a local sink that answers 200 OK, without forwarding to a real backend — the companion to backend mirroring.
The Shadow backend mode turns a reverse-proxy website into a local sink: every incoming request is immediately answered with a fake
HTTP 200by a lightweight local service, and nothing is forwarded to a real backend server. The request is fully consumed (including its body) and acknowledged, but never re-transmitted.It is the companion of Backend Mirroring: when a reverse proxy is used as the target of mirrored (duplicated) traffic, shadow mode lets it absorb those copies cleanly instead of proxying them onward to real servers.
Benefits
- No re-transmission, no duplicate side effects.
A proxy that receives mirrored traffic acknowledges every copy with a 200 without forwarding it, so it never triggers a second database write, e-mail, payment or any other side effect on a real backend.
- Always fast, always up.
The sink is local and answers instantly; the site keeps responding even when no real backend exists or all backends are down — no 502s.
- Instant, per-website, non-destructive.
Shadow mode is a single toggle on each website. The real backends stay configured but are simply not used while it is on; turning it off restores normal routing immediately.
- Protocol-agnostic.
It accepts every method (GET, POST, PUT, DELETE…) and any request-body size, over both HTTP and HTTPS (TLS is terminated by the reverse proxy in front).
- Zero configuration.
The sink runs inside the reverse-proxy service itself — there is nothing extra to install, and it takes precedence over HaBackend when both are set.
- Full front-end observability.
Even though nothing reaches a backend, the reverse proxy still logs and counts every absorbed request (access logs, statistics, WAF verdicts), so you keep complete visibility of the traffic the sink swallows.
- Safe by containment.
Because requests are terminated locally and never relayed, hostile or malformed traffic aimed at a shadow site cannot reach — or be used to pivot toward — any real backend.
Use cases
- Absorb mirrored traffic.
Point backend mirroring at a second reverse proxy and put the matching website there in shadow mode:
it swallows the duplicated stream and returns 200, letting you observe the received volume and behaviour without any real backend being hit twice.
- Graceful maintenance / drain.
While a website’s real backends are down or being worked on, switch it to shadow mode so visitors and clients get a clean 200 instead of 502 errors, then switch back when the backends return.
- Proxy-path testing.
Exercise the front-end chain — TLS termination, WAF, header rewriting, routing, rate limits — without a real backend, because the sink always answers quickly and predictably.
- Black-hole a retired website.
Quietly accept and discard traffic to a decommissioned site, returning 200, without keeping a real backend alive for it.
- Load-generation target.
Use a shadow website as a safe, high-throughput endpoint to measure how much traffic the reverse proxy itself can sustain, isolated from backend performance.
- WAF / rule canary.
Combine shadow mode with backend mirroring to replay real production traffic against a new WAF, ModSecurity ruleset or header-rewrite policy and watch the verdicts, without any risk to the live backend.
- Scanner & bot absorption (decoy).
Expose a decoy hostname in shadow mode to quietly swallow scanner, bot and vulnerability-probe traffic — every request gets a clean 200 and is logged, while no real service is ever touched.
- Capacity & resilience drills.
Run planned failover or overload drills by draining a site to the sink, verifying the front-end keeps returning 200 under load before restoring the real backends.
How it works
- Shadow mode is enabled per website. When it is on, all of that site’s upstream traffic is routed to a shared local Unix socket instead of to the configured backends.
- The local sink answers every request with
HTTP 200 OK, a small JSON body ({"shadow":true,"status":"ok"}) and anX-Shadow-Backend: 1header, after fully reading and discarding the request body. - The real backends listed for the website are kept in the configuration — they are just not emitted while shadow mode is active. Disabling shadow mode brings them back instantly.
- Shadow mode takes precedence over HaBackend: if both are enabled, traffic goes to the shadow sink.
Note. Because the sink discards everything and always returns 200, a website in shadow mode does not serve real content. Use it to absorb, drain or test traffic — not to deliver an application.
Enabling shadow mode
Open the Backends page of the website. In the toolbar you will find a Shadow button showing the current state (Shadow OFF / Shadow ON), next to the HaBackend button.
Click it to open the toggle. Switch it on to route the website to the local sink; the explanation panel summarises exactly what the mode does.
The change applies immediately: the website’s configuration is rebuilt and reloaded within a few seconds, with no service restart and no interruption for other websites.