What is Production Gate?
Production Gate is a comprehensive pre-deployment test suite that answers one question: "Is this deploy safe to ship?"
It runs a standardized checklist in staging/pre-production and generates a readiness score (0-100). Deploy only when you pass the gate.
Why Production Gate matters
Production incidents are expensive. Real-world costs:
- Amazon Prime Day 2018: 63 minutes downtime = $99M revenue lost
- British Airways (2017): Power failure = £80M loss + 75,000 stranded passengers
- Knight Capital (2012): Bad deployment = $440M loss in 45 minutes
- GitLab (2017): Accidental DB deletion = 6 hours downtime + reputation damage
Production Gate prevents these disasters by catching issues before they reach production.
What Production Gate tests
Health & Availability
All critical endpoints respond correctly. Database connections alive. Cache reachable.
Security Probes
OWASP Top 10 checks. Auth bypass attempts. SQL injection. XSS tests.
Load Simulation
50-100 concurrent users. Response times under threshold. No memory leaks.
Rate Limit Validation
Rate limiters work correctly. 429 responses when exceeded. Retry-After headers present.
Dependency Checks
Third-party APIs reachable. Payment gateway responds. Email service available.
Smoke Tests
Critical user flows work. Login succeeds. Checkout completes. Search returns results.
How to run Production Gate in Flasqo
Step 1: Go to Testing Types → Production Gate → Launch
Step 2: Configure gate settings
• Environment: Staging URL (e.g., https://staging.yourapp.com)
• Critical endpoints: Add health check, auth, core features
• Thresholds: Max response time (200ms), min success rate (99%)
• Load profile: 50 concurrent users for 2 minutes
Step 3: Click "Run Production Gate"
Flasqo runs in parallel:
• Health checks (5 sec)
• Security probes (30 sec)
• Load simulation (2 min)
• Rate limit tests (10 sec)
• Dependency checks (5 sec)
Step 4: Review readiness score
Instant results:
• 0-59: ❌ FAIL — Do NOT deploy
• 60-79: ⚠️ WARNING — Review issues before deploy
• 80-100: ✅ PASS — Safe to deploy
Step 5: Fix failing checks
Drill into each category:
• Health: Database connection timeout → Increase pool size
• Security: Missing HSTS header → Add to nginx config
• Load: 500 errors under load → Optimize slow query
• Rate limit: No 429 responses → Enable rate limiting
Step 6: Re-run gate
After fixes, re-run Production Gate until score ≥ 80
Step 7: Deploy with confidence
Gate passed → Deploy to production → Monitor with same checks
Readiness score breakdown
How the score is calculated
Example failing score (58/100):
⚠️ DEPLOYMENT BLOCKED
Score 58/100 is below threshold. Fix security and rate limiting issues before deploying.
Real-world Production Gate scenarios
Scenario 1: E-commerce Black Friday deploy
Situation: New payment integration going live before Black Friday sale.
Production Gate catches:
- Payment gateway times out under 100 concurrent users
- Checkout endpoint returns 500 when inventory is low
- Missing retry logic when payment provider is slow
Outcome: Issues fixed in staging. Black Friday sale proceeds smoothly, zero payment failures.
Scenario 2: SaaS platform feature launch
Situation: New dashboard feature launching for 50,000 users.
Production Gate catches:
- Database query N+1 problem → 2s load time under 50 users
- Missing CORS header → Frontend can't fetch data
- Auth token expires after 5 minutes instead of 24 hours
Outcome: Deploy postponed, optimizations made. Feature launches without incident.
Scenario 3: API version upgrade (v1 → v2)
Situation: Deprecating v1 API, migrating users to v2.
Production Gate catches:
- v2 endpoints missing authentication checks (security regression)
- Breaking schema change:
user_idnow string instead of int - Rate limits not configured on v2 endpoints
Outcome: Deploy blocked until parity with v1 security and rate limits achieved.
CI/CD integration
Run Production Gate automatically before every production deployment:
# .github/workflows/deploy.yml
- name: Deploy to Staging
run: ./deploy.sh staging
- name: Run Production Gate
run: |
SCORE=$(flasqo production-gate \
--env staging \
--threshold 80 \
--format json | jq .score)
if [ $SCORE -lt 80 ]; then
echo "❌ Gate failed: Score $SCORE/100"
exit 1
fi
- name: Deploy to Production
run: ./deploy.sh production
Deploy automatically fails if gate score < 80. No manual approval needed.
Production Gate vs traditional testing
| Aspect | Traditional Testing | Production Gate |
|---|---|---|
| When it runs | During development | Immediately before deploy |
| What it tests | Individual features | Entire system readiness |
| Failure impact | Developer fixes before merge | Deploy blocked automatically |
| Scope | Unit, integration, E2E | Health, security, load, dependencies |
| Output | Pass/fail per test | 0-100 readiness score |
Best practices
1. Run on staging, not production
Production Gate makes real requests. Run against staging environment before deploying to prod.
2. Set appropriate thresholds
Don't require 100% score. Aim for 80-85. Adjust based on your risk tolerance:
- High-risk (payments, healthcare): Threshold 90+
- Medium-risk (SaaS, e-commerce): Threshold 80-85
- Low-risk (internal tools): Threshold 70-75
3. Include gate in deployment automation
Make Production Gate a required step in CI/CD. If gate fails, deploy doesn't happen.
4. Review gate reports weekly
Even if deploys pass, review reports to spot trends: "Response times increasing over time."
5. Test third-party dependencies
If your app depends on Stripe, SendGrid, AWS S3, add them to dependency checks. Gate fails if any are down.
Prevent production disasters
Comprehensive pre-deployment testing. Get a readiness score before every deploy. Block releases that aren't production-ready.
Run Production Gate Free