Request Mirroring for Shadow Deployments
⚙️ Advanced
·
Updated 3 weeks ago
Request Mirroring for Shadow Deployments
What Does It Do?
Duplicates every HTTP request asynchronously to secondary backends ("mirror targets"). The client always receives only the response from the primary backend.
Use Cases
- Test a new version: Mirror production traffic to staging
- Debugging: Send traffic to a logging backend
- Load testing: Check whether a new backend can handle real traffic
- Shadow deployment: Run a new version in parallel
Setup
- Edit route → Enable Request Mirroring
- Add Target → Enter IP and port
- Up to 5 mirror targets per route
- Save
Important Notes
- Write requests (POST, PUT, DELETE) are also mirrored — use a test backend
- Body limit: 10 MB
- Timeout: 10 seconds per target
- WebSocket upgrades are not mirrored
- Only available for HTTP routes (not L4)
API Example
curl -X PUT https://gatecontrol.example.com/api/v1/routes/1 \
-H "Authorization: Bearer gc_..." \
-H "Content-Type: application/json" \
-d '{"mirror_enabled": true, "mirror_targets": [{"ip": "203.0.113.10", "port": 8080}]}'