How to Automate Rollbacks for Failed Software Deployments

CI/CD pipeline monitoring a software deployment and automated rollback

Automating rollback for a failed software deployment is not simply a matter of running an old deployment command when an error appears. A safe rollback process must know which release was previously stable, determine whether the new version is causing real user impact, restore traffic without creating a second failure, and verify that the recovery actually worked.

The code may be reversible while the database, messages, configuration, feature flags, caches, and external integrations are not. For this reason, a deployment should be considered rollback-safe only after the complete change has been evaluated.

The objective is not to reverse every imperfect release automatically. It is to detect harmful releases early, limit how many users are exposed, and choose the safest recovery action: abort the rollout, shift traffic back, redeploy a previous artifact, disable a feature, or move forward with a corrective release.

This guide explains how to define reliable failure signals, preserve deployable artifacts, build progressive release gates, automate recovery actions, protect database compatibility, and test the complete rollback workflow before a real incident occurs.

Operational scope The examples in this article are illustrative. Deployment commands, health behavior, revision history, traffic routing, alarm evaluation, and rollback capabilities vary by platform. Systems handling payments, private accounts, regulated information, authentication, or critical infrastructure should require tested recovery procedures and appropriate specialist review.

Last reviewed: July 16, 2026. Deployment platforms, cloud services, controllers, and recommended practices may change. Confirm current behavior in the official documentation for the tools and versions used by your environment.

What an Automated Rollback Actually Does

An automated rollback evaluates a release after deployment begins. It compares the new version with predefined technical and business conditions. When those conditions indicate unacceptable risk, the workflow performs a previously tested recovery action.

Depending on the architecture, that action may:

  • Stop the rollout before more instances receive the release.
  • Remove unhealthy instances or pods from traffic.
  • Shift traffic from a canary back to the stable version.
  • Switch a load balancer back to the previous environment.
  • Redeploy the last known-good immutable artifact.
  • Disable the newly released behavior through a feature flag.
  • Prepare a rollback and wait for human approval.

A rollback is complete only after the previous behavior has been restored and verified. Executing a command successfully does not prove that users can log in, submit orders, process payments, or use the API again.

Rollback, Abort, Roll Forward, and Feature Disablement

These actions are related but not identical.

Action What It Does Best Fit
Abort rollout Stops the release before it reaches additional instances or users Progressive release where the stable version is still serving most traffic
Rollback Restores a known previous application version or environment Previous version remains compatible with current data and configuration
Roll forward Deploys a corrective version instead of restoring the old one Data or schema changes make the previous version unsafe
Disable feature Turns off risky behavior without replacing the complete release The problem is isolated behind a controlled feature flag
Traffic failback Routes users back to an existing stable environment Canary or blue-green deployment with both versions available
Rollback is not always the safest recovery If the release performed destructive database changes, sent irreversible external requests, changed message formats, or modified shared infrastructure, restoring old application code may create additional failures. The recovery workflow must be able to pause and request human review.

Requirements Before Rollback Automation

Automation should be added only after deployments are repeatable. A process that depends on undocumented server edits, manually copied files, mutable image tags, or one engineer’s memory cannot identify a reliable recovery target.

Immutable and Traceable Artifacts

Every production release should use a uniquely identifiable artifact, such as:

  • A container image with an immutable digest.
  • A package with a fixed version.
  • A serverless application revision.
  • A signed build archive.
  • An infrastructure plan connected to a reviewed commit.

A production artifact record should include:

  • Release identifier.
  • Source commit.
  • Build workflow run.
  • Artifact digest or checksum.
  • Deployment environment.
  • Deployment time.
  • Database migration version.
  • Configuration version.
  • Approver or automated policy.

A Known-Good Release

The previous deployment is not automatically the last known-good deployment. It may have been partially released, manually modified, or associated with configuration that no longer exists.

Mark a release as stable only after it passes the agreed validation period and required production checks.

Testable Recovery Commands

The rollback action must be executable without manually reconstructing old files or parameters. It should be idempotent where practical and safe to run more than once.

Observability Connected to Releases

Metrics and logs should identify the application version, environment, region, and deployment. Without release labels, a system may detect an error increase but fail to determine whether the new version caused it.

Design the Deployment as a State Machine

A clear deployment workflow is easier to reason about during failure.

Controlled Deployment Flow
Build Immutable Artifact
Deploy Limited Exposure
Run Validation
Promote or Recover
Verify Final State

Useful deployment states include:

  • Pending: the release has not started.
  • Deploying: new instances are being created or updated.
  • Analyzing: the new version is receiving limited traffic while checks run.
  • Promoting: exposure is increasing.
  • Stable: the release has passed the validation window.
  • Aborted: promotion stopped before completion.
  • Rolling back: recovery is in progress.
  • Recovered: the stable behavior has been restored and verified.
  • Manual intervention: automation cannot determine a safe action.

Step 1: Define What a Failed Deployment Means

A deployment should not roll back because one request failed. Production systems naturally contain temporary errors, network interruptions, retries, background operations, and unrelated incidents.

Define failure using measurable conditions evaluated over an appropriate window.

Signal What It May Indicate Recommended Use
Readiness failure The new instance cannot safely serve traffic Stop rollout while investigating startup or dependency problems
Elevated 5xx rate Server requests are failing after release Compare the canary with the stable version over a sustained window
Latency regression New code, queries, or dependencies are slowing responses Use percentile latency and minimum traffic volume
Smoke-test failure A critical user path does not work Block promotion or recover before broad exposure
Business metric drop Users cannot complete an important action Use when attribution to the release is reliable
Queue or job failure Asynchronous processing is broken while the web API appears healthy Include worker and message health in release validation
Data-integrity warning The release may be producing incorrect or duplicated data Stop the rollout and require manual review before code rollback

Use Baselines and Comparison Groups

A fixed error threshold may be inappropriate when traffic changes throughout the day. Progressive delivery allows the new version to be compared with the stable version under similar conditions.

Useful comparisons include:

  • Canary error rate versus stable error rate.
  • Canary latency versus stable latency.
  • Current deployment versus the same service baseline.
  • Business success rate before and after release.
  • New worker failure rate versus the previous worker version.

Require Enough Data

A percentage calculated from two requests is not reliable. Define minimum request volume, analysis duration, and acceptable missing-data behavior.

If the monitoring system cannot provide an answer, the safest action may be to pause rather than promote or roll back automatically.

Step 2: Select a Release Strategy

Rolling Deployment

A rolling deployment gradually replaces instances with the new version. It uses less additional infrastructure, but the old and new versions may run simultaneously during the transition.

Rollback requires the previous artifact and compatible configuration to remain available.

Canary Deployment

A canary sends a small portion of traffic to the new version. Its behavior is compared with the stable version before exposure increases.

This limits the impact of a bad release and creates a natural place for automated analysis.

Blue-Green Deployment

Two environments run side by side. Traffic is switched from the stable environment to the new one after validation.

Recovery can be fast because the previous environment still exists. However, the database and other shared services must support both application versions.

Feature-Flagged Release

The code is deployed while new behavior remains disabled or limited to selected users.

Feature flags can reduce the need to redeploy, but they do not solve failures caused by performance, startup, configuration, infrastructure, or unflagged code paths.

Strategy Rollback Advantage Primary Risk
Rolling Uses normal revision history and deployment capacity A large portion of traffic may see the release before detection
Canary Traffic can return to stable before full promotion Requires reliable metrics and traffic control
Blue-green Previous environment remains immediately available Infrastructure cost and shared-state compatibility
Feature flag Problematic behavior can be disabled quickly Inactive paths and old flags create long-term complexity

Step 3: Add Pre-Deployment Safety Gates

Rollback should be the final protection, not the first quality check.

Before production deployment, verify:

  • Unit, integration, and contract tests pass.
  • The artifact is the exact artifact tested in staging.
  • Security and dependency checks meet the release policy.
  • Required configuration and secrets exist.
  • Database migrations are backward compatible.
  • The previous artifact is still available.
  • The recovery command has permission to run.
  • Monitoring queries return usable data.
  • The responsible team is available for high-risk releases.

Step 4: Validate the New Version Before Promotion

A basic process check is not sufficient. The application may be running while critical functionality is broken.

Readiness Checks

A readiness check should answer whether an instance can receive traffic. It should not report success before the application can serve requests safely.

Avoid making readiness depend on every optional external service. An unrelated analytics provider should not necessarily remove the complete application from traffic.

Smoke Tests

Smoke tests should cover a small number of high-value paths:

  • Application health and version endpoint.
  • User authentication.
  • Critical API operation.
  • Database read and safe write behavior.
  • Queue or background-job processing.
  • Access to required storage or external services.

Synthetic Transactions

A synthetic transaction performs a controlled action through the deployed system. Use dedicated accounts and data that can be safely created, identified, and removed.

Metric Analysis

Evaluate metrics over a window long enough to observe realistic traffic and initialization behavior. Services with cold caches, just-in-time compilation, background startup, or connection-pool warm-up may need a controlled stabilization period.

Step 5: Define the Rollback Trigger

A trigger should specify more than a metric name.

Document:

  • The metric or test.
  • The data source.
  • The threshold.
  • The evaluation window.
  • The required number of failing evaluations.
  • The minimum traffic or sample count.
  • The behavior when data is missing.
  • The recovery action.
  • Whether human approval is required.

Illustrative Trigger

Example only — not a universal production threshold

Abort the canary when it has processed enough requests and its server-error rate remains materially worse than the stable version for several consecutive evaluation periods. Pause instead of deciding when monitoring data is missing.

Use multiple independent signals when appropriate. For example, an error-rate increase combined with a failed checkout synthetic test provides stronger evidence than one isolated metric.

Step 6: Build the Recovery Action

A recovery job should be able to identify the stable target without guessing.

It should:

  1. Lock or serialize production deployment activity.
  2. Record the failed release and trigger.
  3. Stop further promotion.
  4. Select the approved stable release.
  5. Restore traffic or redeploy the stable artifact.
  6. Wait for health and readiness.
  7. Run post-rollback smoke tests.
  8. Notify the team with evidence.
  9. Keep the failed environment available for investigation when safe.

Prevent Deployment Collisions

Do not allow a new production deployment to start while another deployment or rollback is active. Concurrent changes can cause the recovery job to restore the wrong revision.

Keep Stable Artifacts Available

Artifact retention should cover enough release history to recover from problems discovered after several deployments. Do not delete the stable image immediately after a new release appears healthy.

Verify the Restored Version

After recovery, check:

  • The intended artifact is running.
  • Traffic reaches the stable version.
  • Critical smoke tests pass.
  • Error and latency metrics recover.
  • Queues and background workers are processing correctly.
  • No destructive operation continues from the failed release.

Worked Example: Canary Release of a Checkout API

Consider a checkout API deployed with a stable version and a new canary version.

The release process exposes the canary gradually:

  1. Deploy the canary with no public traffic.
  2. Run readiness and smoke tests.
  3. Send a small controlled percentage of traffic.
  4. Compare technical and checkout metrics with the stable version.
  5. Increase exposure only after successful analysis.
  6. Return all traffic to stable if the analysis fails.
Validation Success Direction Failure Action
Readiness All intended canary instances become ready Do not route public traffic
Smoke checkout Controlled checkout completes and can be reconciled Abort canary and investigate
Server errors Canary remains comparable to stable Shift traffic back to stable
Latency User-facing percentiles remain inside the release budget Stop promotion and compare traces
Checkout success Canary success rate remains consistent with stable traffic Abort and examine payment or order behavior
Data-integrity signal No duplicated orders or inconsistent totals Stop traffic and require manual incident review

The last condition is not a normal automatic code rollback. If the canary created incorrect orders, the incident may require data reconciliation before either version can safely continue.

Kubernetes Rollback Behavior

Kubernetes Deployments maintain revision history through their ReplicaSets. A previous revision can be restored with commands such as:

kubectl rollout history deployment/checkout-api

kubectl rollout undo deployment/checkout-api

kubectl rollout status deployment/checkout-api --timeout=10m

A specific revision can be selected when the history is known:

kubectl rollout undo deployment/checkout-api --to-revision=7

Keep enough revision history for the recovery policy. Setting a Deployment’s revision-history limit to zero removes the ability to use stored Deployment revisions for rollback.

Kubernetes does not make every rollback decision automatically Readiness checks can prevent unhealthy pods from receiving traffic, and rollout status can detect an incomplete update. Metric-based automatic recovery normally requires pipeline logic or a progressive-delivery controller.

Progressive Delivery with Argo Rollouts

Argo Rollouts extends Kubernetes with canary and blue-green strategies, traffic management, pauses, experiments, and metric analysis.

See also  Implementing Zero-Trust Security Protocols in DevOps Environments

An analysis can evaluate data from a supported metrics provider and determine whether a rollout should continue, pause, or abort.

The following structure is illustrative and must be adapted to the installed controller, traffic provider, service names, and metrics system:

apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: checkout-api
spec:
  replicas: 6
  revisionHistoryLimit: 5

  strategy:
    canary:
      stableService: checkout-stable
      canaryService: checkout-canary

      steps:
        - setWeight: 10
        - pause:
            duration: 5m

        - analysis:
            templates:
              - templateName: checkout-release-analysis

        - setWeight: 30
        - pause:
            duration: 10m

        - analysis:
            templates:
              - templateName: checkout-release-analysis

        - setWeight: 100

  selector:
    matchLabels:
      app: checkout-api

  template:
    metadata:
      labels:
        app: checkout-api
    spec:
      containers:
        - name: checkout-api
          image: registry.example.com/checkout@sha256:IMMUTABLE_DIGEST
          readinessProbe:
            httpGet:
              path: /ready
              port: 8080

A rollback window can also allow recent stable revisions to be restored without repeating every normal promotion step. The configured revision history must be large enough to retain the revisions covered by that window.

A Generic CI/CD Recovery Workflow

The following example shows the structure of a pipeline-controlled rollback. The scripts and release identifiers are placeholders, not ready-made production commands.

name: Controlled Production Deployment

on:
  workflow_dispatch:
    inputs:
      release_id:
        required: true
        type: string

jobs:
  deploy:
    runs-on: ubuntu-latest

    concurrency:
      group: production-deployment
      cancel-in-progress: false

    steps:
      - name: Check out deployment configuration
        uses: actions/checkout@v4

      - name: Read current stable release
        id: stable
        run: |
          stable_release="$(./scripts/get-stable-release.sh)"
          echo "release=${stable_release}" >> "$GITHUB_OUTPUT"

      - name: Deploy requested release
        run: |
          ./scripts/deploy.sh "${{ inputs.release_id }}"

      - name: Validate new release
        id: validation
        continue-on-error: true
        run: |
          ./scripts/wait-for-rollout.sh "${{ inputs.release_id }}"
          ./scripts/run-smoke-tests.sh
          ./scripts/check-release-metrics.sh "${{ inputs.release_id }}"

      - name: Restore stable release
        if: steps.validation.outcome == 'failure'
        run: |
          ./scripts/rollback.sh "${{ steps.stable.outputs.release }}"

      - name: Verify recovery
        if: steps.validation.outcome == 'failure'
        run: |
          ./scripts/wait-for-rollout.sh "${{ steps.stable.outputs.release }}"
          ./scripts/run-recovery-smoke-tests.sh

      - name: Mark new release as stable
        if: steps.validation.outcome == 'success'
        run: |
          ./scripts/mark-stable-release.sh "${{ inputs.release_id }}"

      - name: Fail workflow after successful recovery
        if: steps.validation.outcome == 'failure'
        run: |
          echo "Deployment failed and the stable release was restored."
          exit 1

The stable release must come from trusted deployment history. It should not be selected by relying on a mutable tag such as latest.

Automatic Rollback with AWS CodeDeploy

AWS CodeDeploy can be configured to redeploy the last known-good application revision when a deployment fails or when associated monitoring alarms enter the configured state.

Before enabling that behavior, verify:

  • The deployment group identifies a valid last known-good revision.
  • Alarm thresholds reflect release health rather than unrelated infrastructure noise.
  • The old revision remains compatible with the current database and configuration.
  • Notifications identify the failed and restored deployments.
  • The automatic rollback configuration is included in infrastructure review.

Cloud alarms should not be attached blindly. A regional dependency incident or unrelated traffic spike could activate the alarm during a healthy deployment.

Database Changes Are the Main Rollback Risk

Application binaries are often easy to replace. Data changes may be irreversible.

Use Expand-and-Contract Changes

A safer schema transition separates compatibility changes from cleanup:

  1. Expand: add the new table, column, or field without removing the old structure.
  2. Deploy compatible code: support both the old and new structures.
  3. Backfill: migrate existing data in controlled batches.
  4. Switch behavior: move reads and writes to the new structure.
  5. Observe: confirm the new application is stable.
  6. Contract: remove the old structure in a later deployment.

This gives the previous application version a chance to continue operating during the release window.

Avoid Destructive Changes in the Same Release

Operations requiring special care include:

  • Dropping columns or tables.
  • Changing data types incompatibly.
  • Rewriting large amounts of production data.
  • Removing enum values.
  • Changing identifier formats.
  • Encrypting or transforming records irreversibly.
  • Changing queue-message schemas without versioning.

Separate Code Recovery from Data Recovery

Database transaction rollback and software deployment rollback are different operations. Restoring old application code does not undo previously committed production transactions.

For data-impacting releases, define:

  • Whether the migration is reversible.
  • Whether a backup restore is required.
  • Which records need reconciliation.
  • How new writes will be stopped during recovery.
  • Who can authorize destructive data actions.

Configuration, Secrets, and Feature Flags

A previous application version may fail when it runs with the new release’s configuration.

Version and review:

  • Environment variables.
  • Feature-flag state.
  • API endpoints.
  • Authentication configuration.
  • Secret versions.
  • Rate limits.
  • Queue and topic names.
  • Infrastructure policies.

Do not automatically restore old secrets during a code rollback when they were rotated for security reasons. The rollback plan must distinguish compatibility configuration from credentials that must remain revoked.

Asynchronous Workers and Message Compatibility

A web API may be restored while background workers continue processing messages created by the failed release.

Use versioned and backward-compatible event contracts when multiple application versions may coexist.

Before rollback, consider:

  • Messages already published by the new version.
  • Retries and delayed messages.
  • Dead-letter queues.
  • Scheduled jobs created by the release.
  • New event fields the old consumer cannot understand.
  • Side effects already performed by third-party integrations.

Stopping web traffic does not stop asynchronous damage automatically.

Prevent Rollback Loops

A release system can enter a loop when the stable version is restored, a pipeline immediately redeploys the failed version, and the rollback repeats.

Use protections such as:

  • Marking the failed release as blocked.
  • Requiring a new artifact or explicit approval before retry.
  • Pausing automatic reconciliation during incident handling when appropriate.
  • Serializing deployment and rollback jobs.
  • Limiting automatic recovery attempts.
  • Escalating to manual intervention after repeated failure.

When Human Approval Is Safer

Automation can detect a failure, gather evidence, prepare the recovery plan, and still require an authorized person to approve the final action.

Situation Recommended Behavior
Destructive or uncertain database migration Stop rollout, collect evidence, and require database-aware approval
Financial transactions may be duplicated Stop new traffic and evaluate transaction state before recovery
Security release removes a known vulnerability Prefer a corrective roll-forward when returning to the vulnerable version is unsafe
Infrastructure state changed outside the application Review the current state and plan before applying an old configuration
Monitoring signals disagree or are unavailable Pause promotion rather than making an unsupported automatic decision

Rollback Notifications and Incident Evidence

A rollback notification should contain enough context for investigation.

Include:

  • Service and environment.
  • Failed release identifier and artifact digest.
  • Restored release identifier.
  • Deployment and rollback timestamps.
  • The trigger and evaluation window.
  • Links to metrics, logs, traces, and pipeline execution.
  • Database and configuration versions.
  • Whether recovery validation passed.
  • Who or what approved the action.
  • Incident or ticket reference.

Preserve evidence from the failed version when safe. Automatically deleting every failed pod, environment, or log stream may remove information needed to identify the root cause.

Test Rollback Before Depending on It

A rollback workflow that has never been exercised is an assumption.

Controlled Staging Test

Deploy a version that deliberately fails a readiness check or smoke test. Confirm that:

  • Promotion stops.
  • The correct stable version is selected.
  • Traffic returns successfully.
  • Notifications contain the required details.
  • The failed release cannot immediately redeploy itself.

Production-Like Recovery Drill

Run scheduled exercises using non-destructive failure scenarios. Measure:

  • Time to detect.
  • Time to decide.
  • Time to restore traffic.
  • Time to verify recovery.
  • Missing permissions or artifacts.
  • Manual steps that delayed the process.

Database Compatibility Test

Deploy a backward-compatible schema change, run both application versions, and confirm that each can read and write safely before rehearsing the rollback.

Common Rollback Automation Mistakes

Mistake Possible Result Better Direction
Using mutable image tags Rollback redeploys unexpected code Use immutable versions or image digests
Reacting to one failed request Healthy releases are reverted because of noise Use windows, minimum samples, and comparative signals
Checking only process health Broken user workflows remain undetected Add smoke tests and business metrics
Ignoring database compatibility Old code fails against the current schema Use expand-and-contract migrations
Ignoring workers and queues Failed behavior continues after web traffic is restored Include asynchronous components in recovery
Deleting old artifacts too early No trusted version is available to restore Define production artifact-retention rules
Allowing concurrent deployments Recovery restores the wrong revision Serialize production changes
Never verifying recovery The rollback command succeeds while users remain affected Run post-rollback health and user-path tests

Production Readiness Checklist

Before enabling automatic rollback, confirm:
✓ Production artifacts are immutable and traceable
✓ The last known-good release is recorded explicitly
✓ Deployment activity is serialized
✓ Rollback commands were tested
✓ Stable artifacts remain available
✓ Metrics identify the deployed release
✓ Triggers use evaluation windows and minimum samples
✓ Missing monitoring data pauses the release safely
✓ Critical user paths have smoke tests
✓ Database changes remain backward compatible
✓ Configuration compatibility was reviewed
✓ Workers and message formats support recovery
✓ Rollback-loop protections are active
✓ Post-rollback validation is automated
✓ Notifications contain release and trigger details
✓ Manual approval rules are documented

When to Request Specialist Support

Involve experienced reliability, database, cloud, or security professionals when:

  • Deployments affect payments or financial records.
  • The release modifies identity, authorization, or account recovery.
  • The application stores regulated or health information.
  • Database migrations cannot be reversed safely.
  • The architecture spans multiple regions or providers.
  • The system has strict recovery-time or recovery-point requirements.
  • Background processing can create irreversible external effects.
  • Automatic rollback permissions include broad production access.
  • The team cannot clearly choose between rollback and roll forward.

Conclusion

Reliable rollback automation begins before the deployment starts. Every release must use a traceable artifact, have a known stable predecessor, expose meaningful health signals, and include a recovery action that has already been tested.

Use progressive exposure whenever practical. A canary or blue-green strategy limits how many users experience a defective release and makes traffic recovery faster than replacing a complete production environment under pressure.

Design triggers around sustained user impact, sufficient samples, and comparative evidence. When monitoring data is unclear, pause the rollout rather than making an unsupported decision.

Most importantly, evaluate data and compatibility. Restoring application code is only safe when the previous version can operate with the current database, configuration, messages, infrastructure, and external effects.

Automation should reduce incident impact without hiding the failure or creating a second incident. The safest system supports both fast automatic recovery and controlled human intervention when the state of production is uncertain.

Frequently Asked Questions

Does Kubernetes automatically roll back a failed Deployment?
Kubernetes can preserve Deployment revisions and allows an operator or automation to execute rollout undo. Readiness checks can prevent unhealthy pods from receiving traffic, but metric-based automatic rollback normally requires pipeline logic or a progressive-delivery controller.
What should trigger an automatic rollback?
Use sustained and release-related signals such as failed readiness, failed smoke tests, elevated server errors, significant latency regression, or broken critical user transactions. Define evaluation windows, minimum samples, and behavior for missing data.
When is rolling forward safer than rolling back?
A corrective roll-forward may be safer when the release changed data or schema incompatibly, removed a security vulnerability, produced events the old version cannot understand, or modified infrastructure that cannot be restored safely.
Can feature flags replace rollback automation?
Feature flags can disable isolated behavior without redeploying, but they do not solve startup failures, performance regressions, infrastructure problems, incompatible migrations, or defects outside the flagged path. Mature systems often use both mechanisms.
How should database migrations be handled?
Prefer backward-compatible expand-and-contract changes. Add new structures first, deploy code that supports both versions, migrate data gradually, and remove old structures only after the transition is stable.
How often should rollback procedures be tested?
Test the process after meaningful changes to the deployment platform, permissions, database strategy, traffic routing, or monitoring. Scheduled recovery drills also help identify expired permissions, missing artifacts, and undocumented manual steps.

Official References

Editorial note: The services, release names, thresholds, scripts, YAML configurations, and recovery procedures in this article are illustrative. Production automation must be adapted to the application architecture, deployment platform, database, traffic volume, security requirements, and incident-response process.