Skip to main content

Zero-Downtime Deployment Strategy Planner

Plan a zero-downtime deployment, blue-green, canary, or rolling, with safe database migrations, rollback procedures, and health check configuration.

Fill in the placeholders

Edit the values, then copy your finished prompt.

Your Prompt
prompt.txt
You are a deployment engineering specialist. Design a zero-downtime deployment strategy for my application.

**Application Details:**
- Stack: Laravel 11 + PHP 8.3 + MySQL 8 + Redis
- Infrastructure: Kubernetes on AWS EKS with ALB ingress
- Current deployment: Manual SSH deploy with 2-5 minutes of downtime during migrations
- Database: MySQL 8 RDS, 50GB data, largest table has 20M rows
- Traffic: 5K RPM peak, US and EU traffic with no quiet deployment window

**Phase 1 — Strategy Selection:**
Evaluate these strategies for MY specific case:

| Strategy | How It Works | Pros for You | Cons for You | Recommended? |
|----------|-------------|-------------|-------------|--------------|
| Blue-Green | Full parallel environment | | | |
| Canary | Gradual traffic shift | | | |
| Rolling | Pod-by-pod replacement | | | |

Select the best strategy and explain WHY based on my infrastructure and constraints.

**Phase 2 — Database Migration Plan:**
This is where zero-downtime deployments usually fail. Design a migration plan for:
- Schema changes that are backward-compatible with old AND new code
- The expand-contract pattern for breaking changes:
  1. **Expand:** Add new column/table (old code ignores it)
  2. **Migrate:** New code writes to both old and new
  3. **Contract:** Remove old column after full rollout
- Data migration strategy for large tables (online DDL, pt-online-schema-change)
- Rollback plan if the migration causes issues

**Phase 3 — Implementation:**
Generate the complete configuration for Kubernetes on AWS EKS with ALB ingress:

- Deployment manifest / configuration files
- Health check endpoints (what to check, timeout, threshold)
- Readiness vs liveness probes (different checks for each)
- Traffic shifting configuration (percentage-based if canary)
- Resource limits and scaling parameters
- Horizontal Pod Autoscaler configuration for handling traffic during deployment

**Phase 4 — Rollback Procedure:**
Step-by-step rollback plan:
- Automatic rollback triggers (health check failures, error rate spike)
- Manual rollback command sequence
- Database rollback considerations (can the migration be reversed?)
- Cache invalidation during rollback
- Communication template for stakeholders

**Phase 5 — Verification Checklist:**
After deployment, verify:
- All health checks passing
- Error rates at or below pre-deployment baseline
- Latency percentiles stable
- Database connection pool healthy
- Queue processing normally
- No memory leaks in new pods/containers
- Verify Stripe webhook processing is working correctly after deployment

**Phase 6 — Runbook:**
Generate a deployment runbook that an on-call engineer can follow at 3 AM:
- Pre-deployment checklist
- Deployment commands (copy-paste ready)
- What to watch during rollout
- When to abort and how
- Post-deployment verification

What this prompt does

This prompt makes the AI a deployment engineering specialist that designs a zero-downtime deployment strategy for your application. You provide the [tech_stack], the [infrastructure], your [current_deployment], the [database_info], and the [traffic_volume], and it works through six phases: strategy selection, a database migration plan, implementation config, a rollback procedure, a verification checklist, and a 3 AM runbook. It compares blue-green, canary, and rolling strategies for your specific case rather than recommending one in the abstract.

The structure works because it focuses on where zero-downtime deploys actually fail: the database. Phase 2 designs backward-compatible schema changes and the expand-contract pattern (expand, migrate, contract) so old and new code coexist during rollout, plus an online-DDL approach for large tables and a rollback plan. Phase 3 generates the [infrastructure] config including health checks and separate readiness versus liveness probes, with extras from [additional_config]. Phase 5 adds your [verification_step], and the runbook is written so an on-call engineer can follow it half-asleep.

When to use it

  • Your current deploys take the app down during migrations and you want that gone
  • You need a reasoned choice between blue-green, canary, and rolling for your setup
  • You have a large table and need an expand-contract migration that won't strand data
  • You need health-check, readiness, and liveness probe configs for your platform
  • You want automatic rollback triggers and a manual rollback command sequence
  • You need a copy-paste runbook an on-call engineer can run at 3 AM

Example output

You get a filled-in strategy comparison table with a recommendation and reasoning, an expand-contract migration plan for your schema changes, [infrastructure] deployment manifests with health checks and readiness/liveness probes, a rollback procedure with automatic triggers and manual commands, a post-deploy verification checklist, and a step-by-step 3 AM runbook with copy-paste-ready commands.

Pro tips

  • Describe [current_deployment] honestly, including the downtime it causes, so the comparison addresses your real pain
  • Give accurate [database_info] (engine, size, largest table row count) since migration strategy hinges on it
  • Set [traffic_volume] realistically, especially if you have no quiet deployment window
  • Match [infrastructure] exactly so the generated manifests and probes are usable, not illustrative
  • Use [verification_step] for the thing you most fear breaking, like Stripe webhook processing post-deploy
  • Validate the migration's reversibility yourself; an AI-claimed reversible migration still needs testing against a copy of prod

Frequently Asked Questions

Which deployment strategy will it pick?
It evaluates blue-green, canary, and rolling against your specific `[infrastructure]` and constraints in a comparison table, then recommends one with reasoning. There is no universal answer; the choice depends on your traffic, database size, and platform.
How does it handle database migrations safely?
It uses the expand-contract pattern, adding new columns before old code is gone, writing to both during transition, and removing the old schema only after full rollout. This keeps schema changes backward-compatible so a rollback never strands data.
Does it include a rollback plan?
Yes. Phase 4 covers automatic rollback triggers like error-rate spikes, a manual rollback command sequence, database rollback considerations, cache invalidation, and a stakeholder communication template. You should still test reversibility against a copy of production.
Will the config work on my platform?
It generates deployment manifests, health checks, and readiness versus liveness probes for whatever you set in the `[infrastructure]` variable. Specify your platform exactly so the output is directly usable rather than illustrative.
What is the 3 AM runbook for?
Phase 6 produces a runbook an on-call engineer can follow when tired: a pre-deployment checklist, copy-paste deployment commands, what to watch during rollout, when to abort, and post-deployment verification, so deploys do not depend on the author being awake.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

More in DevOps & Cloud Prompts

Engr Mejba Ahmed

Engr Mejba Ahmed

AI assistant · trained on my work

👋

Hey there!

Quick Actions

WhatsApp Direct line to me

Chat on WhatsApp

+880 1723 741224 · Replies within the hour on working days

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

mejba.13@gmail.com

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support