request mirroring
Safe production traffic mirroring and response parity comparison for backend service migrations.
Free
Works with the AI Agents you already use
request mirroring
Example session with this skill installed
I need to move our Python API from Django 4 to Django 5. Can you help me set up a shadow rollout to compare them?
- Read your context and instructions
- Compiled the request mirroring
I will set up the shadow traffic stack to compare Django 4 (primary) and Django 5 (shadow). I've mapped the dependencies and will use a shadow Postgres instance to prevent data pollution.
Shadow Rollout Configuration
| Component | Specification | Description |
|---|---|---|
| Primary URL | http://django-v4:8000 | Current production service |
| Shadow URL | http://django-v5:8000 | New Django 5 implementation |
| Comparison Mode | JSON | Deep comparison with key-order independence |
| Ignore Keys | updated_at, uuid, last_login | Volatile fields to skip during parity check |
| Fakes Enabled | Stripe, SendGrid, Twilio | External APIs redirected to fakeapi tool |
Docker Compose Shadow Override
version: '3.8'
services:
django-v5:
image: api-django5:latest
env_file: .env.shadow
networks:
- shadow-net
depends_on:
- shadow-db
shadow-proxy:
image: agensi/shadow-proxy:latest
ports:
- "8019:8019"
- "9187:9187"
environment:
- PRIMARY_URL=http://django-v4:8000
- SHADOW_URL=http://django-v5:8000
- IGNORE_KEYS=updated_at,last_login
- MAX_COMPARE_KB=1024
networks:
- shadow-net
Next steps
- Run
templates/scripts/shadow-db-refresh.shto populate the shadow database with a production snapshot. - Deploy the
shadow-proxyand verify metrics are appearing at:9187/metrics. - Execute
mirror-switch.sh onto begin teeing 100% of traffic to the Django 5 instance.
Connects securely to your tools. The creator never sees your data.
About this skill
Safely replacing a production backend is high-risk. This skill implements language-agnostic request mirroring to validate new code against real traffic without affecting users.
What it does
- Traffic mirroring copies live HTTP requests and sends them to a shadow service while the primary service answers the client.
- Automated comparison performs byte-for-byte or deep JSON parity checks on responses, ignoring key ordering or numeric formatting differences.
- External service faking provides stubs for APIs, SMS, and payment gateways to prevent the shadow service from triggering real-world side effects.
- Resource monitoring tracks RAM, CPU, and latency for both primary and shadow services to detect performance regressions.
- Grafana observability generates dashboards showing parity percentages, p95 latency, and side-by-side diffs for every failed match.
How it works
- Discovery analyzes your existing nginx config, Docker networks, and external dependencies to map out the shadow environment.
- Environment Isolation clones the production database to a shadow instance and configures a
.env.shadowfile to point all external URLs to fakes. - Proxy Deployment launches a Go-based sidecar proxy that tees traffic from nginx to both services with automatic failover.
- Parity Triage uses the Grafana dashboard to classify differences as bugs, stale data, or intentional changes.
Frameworks & tools
The tooling is built in Go but works with any HTTP-based stack including Python (Django, FastAPI), Node.js, Java, Go, and PHP. It integrates with nginx, Docker, Prometheus, and Grafana.
Why this beats prompting it yourself
Shadowing requires strict safety rules like async fire-and-forget logic and request timeouts to ensure the shadow never blocks production. This skill provides a hardened Go proxy and pre-written nginx rollback scripts that handle these edge cases out of the box.
Use cases
- Language migrations like rewriting a legacy Python monolith in Go.
- Major framework upgrades such as moving from Django 4 to 5 or Node 18 to 22.
- Database migrations validating a new ORM or query layer against live data.
- Infrastructure changes switching application servers from gunicorn to uvicorn.
Known limitations
Does not support mirroring for WebSockets, Server-Sent Events (SSE), or file uploads exceeding the configured size limit. Requires an nginx ingress and Docker-based deployment for the toolset.
Does not support WebSockets or SSE. Requires nginx and Docker. Large payloads above MAX_COMPARE_KB are skipped. Shadow database must be manually refreshed to maintain parity.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 10 days ago
- Free with an Agensi account
Requires
Permissions
Allowed Hosts