Skip to article
DevOps Deployment workflows

Blue-green deployment

Blue-green deployment is a release strategy that runs two production-capable environments, routes users to the current version, validates the new version, then shifts traffic with minimal downtime.

Source: Microsoft Learn - Blue-Green Deployment in Azure Container Apps Reviewed 2026-05-12

Exam trap
Treating blue-green deployment as a label instead of validating the exact Azure scope, identity, network path, and evidence.
Production check
Show the live blue-green deployment state and compare it with the approved architecture or runbook.
Article details and learning context
Aliases
None listed
Difficulty
intermediate
CLI mappings
3
Last verified
2026-05-12
Learning paths Graph DevOps concept cluster Blue-green deployment

Understand the concept

In plain English

Blue-green deployment means running two nearly identical production-ready application environments so one serves users while the other receives and proves the next release. In Azure work, it names a specific Azure application delivery behavior so teams can discuss ownership, configuration, evidence, and change impact without guessing. Operators use it in design reviews, incidents, audits, and handoffs to connect documentation language to real settings, logs, commands, and user experience. Shared context prevents confusion. Evidence keeps reviews grounded.

Why it matters

Blue-green deployment matters because it reduces release risk by validating a new version with production-like configuration before most users see it. If teams misunderstand it, they can swap the wrong environment, ignore slot-specific settings, route traffic before dependencies are ready, or keep duplicate production capacity running longer than necessary. The business impact is concrete: safer releases, faster troubleshooting, better recovery decisions, and cleaner audit evidence. Architects should define scope, owner, expected state, rollback rules, and monitoring before relying on it. Operators should know which signal proves it is healthy, which signal shows drift, and which change is safe during an incident. Well documented terms help security, finance, operations, and developers discuss the same Azure behavior clearly.

Technical context

Technically, Blue-green deployment uses deployment slots, Container Apps revisions, AKS services, Front Door routes, or load balancer rules to separate current and new versions before traffic moves. Teams observe it at App Service slots, Azure Container Apps revisions, AKS ingress, API gateways, traffic managers, and deployment pipelines that control release cutover. Evidence includes slot configuration, revision traffic weights, health probes, deployment pipeline logs, request metrics, rollback events, and application version telemetry. Verify production state through portal, CLI, REST, SDK output, logs, or model responses, then compare it with approved design.

Exam context

Compare with

Where it is used

Where you see it

  1. In Azure portal, Blue-green deployment appears in deployment slots Container Apps revisions traffic routing rules health checks pipeline, where operators confirm scope, ownership, diagnostics, and whether production behavior matches design.
  2. In CLI, REST, SDK, or configuration files, Blue-green deployment shows up through az webapp deployment slot swap az containerapp revision traffic, giving engineers repeatable evidence for reviews and incidents.
  3. In logs, metrics, traces, model output, or audit records, Blue-green deployment is visible through deployment events traffic weight changes request failure rates health probes, helping teams separate service health from configuration drift.

Common situations

  • Release application versions with a fast rollback path.
  • Validate production-like configuration before routing most users.
  • Compare error rates and latency between old and new environments.

Illustrative Azure scenarios

These examples show how the concept can affect design and operations. They are illustrative scenarios, not customer claims.

Scenario 01 Blue-green deployment in financial operations Scenario, objectives, solution, measured impact, and takeaway.
Scenario

Woodgrove Payroll, a financial services provider, needed to release a tax-calculation update without taking payroll submission offline near a statutory deadline. The Azure team had to improve payroll filing operations while keeping production controls, audit evidence, and support handoffs clear.

Goals
  • Avoid downtime during payroll week
  • Validate tax calculations before cutover
  • Keep rollback under 15 minutes
  • Capture release evidence for auditors
Approach using Blue-green deployment

Engineers used Blue-green deployment as the central design concept rather than treating it as a background setting. They deploy the new version to the green App Service slot, warm dependencies, run synthetic payroll tests, compare Application Insights metrics, and swap traffic only after finance and operations approved the evidence. The implementation was connected with the surrounding Azure services, identity model, diagnostics, and deployment workflow so operators could verify the live state during release and incident response. The team captured portal evidence, CLI or REST output, service metrics, and application telemetry in the change record. Security reviewed access and data handling, operations documented rollback or recovery steps, and product owners signed off on the measurable acceptance criteria before the pattern moved into production.

Potential outcomes
  • Production downtime was zero minutes
  • Rollback test completed in eight minutes
  • Synthetic tests found one misconfigured slot setting
  • Release audit preparation time fell 40 percent
What to learn

Blue-green deployment is valuable when teams connect the Azure capability to ownership, evidence, measurable outcomes, and a runbook that operators can actually use.

Scenario 02 Blue-green deployment in travel operations Scenario, objectives, solution, measured impact, and takeaway.
Scenario

BlueHarbor Travel, a travel booking company, needed to modernize its booking API while preserving checkout availability during peak spring-break traffic. The Azure team had to improve customer booking sessions while keeping production controls, audit evidence, and support handoffs clear.

Goals
  • Ramp traffic gradually to the new API
  • Keep checkout error rate below 0.3 percent
  • Compare latency by revision
  • Restore blue quickly if payments failed
Approach using Blue-green deployment

Engineers used Blue-green deployment as the central design concept rather than treating it as a background setting. They run blue and green Container Apps revisions, route five percent of traffic to green, monitor payment failures and latency, then shift all traffic when health probes and business metrics stayed inside thresholds. The implementation was connected with the surrounding Azure services, identity model, diagnostics, and deployment workflow so operators could verify the live state during release and incident response. The team captured portal evidence, CLI or REST output, service metrics, and application telemetry in the change record. Security reviewed access and data handling, operations documented rollback or recovery steps, and product owners signed off on the measurable acceptance criteria before the pattern moved into production.

Potential outcomes
  • Checkout error rate stayed at 0.12 percent
  • P95 latency improved 18 percent
  • Full cutover completed in one change window
  • No emergency rollback was needed
What to learn

Blue-green deployment is valuable when teams connect the Azure capability to ownership, evidence, measurable outcomes, and a runbook that operators can actually use.

Scenario 03 Blue-green deployment in public operations Scenario, objectives, solution, measured impact, and takeaway.
Scenario

Riverside County Services, a public sector digital services team, needed to deploy a permit portal redesign without disrupting inspectors and residents already submitting applications. The Azure team had to improve permit processing while keeping production controls, audit evidence, and support handoffs clear.

Goals
  • Keep permit submission available all day
  • Validate identity and payment callbacks
  • Run accessibility checks before public traffic
  • Maintain instant route rollback
Approach using Blue-green deployment

Engineers used Blue-green deployment as the central design concept rather than treating it as a background setting. They maintain blue and green environments behind Azure Front Door, validate authentication callbacks, run accessibility checks, and route residents to green after staff completed smoke tests against production dependencies. The implementation was connected with the surrounding Azure services, identity model, diagnostics, and deployment workflow so operators could verify the live state during release and incident response. The team captured portal evidence, CLI or REST output, service metrics, and application telemetry in the change record. Security reviewed access and data handling, operations documented rollback or recovery steps, and product owners signed off on the measurable acceptance criteria before the pattern moved into production.

Potential outcomes
  • Permit submissions continued without outage
  • Identity callback failures were caught before launch
  • Accessibility defects dropped 35 percent
  • Rollback route was tested in under five minutes
What to learn

Blue-green deployment is valuable when teams connect the Azure capability to ownership, evidence, measurable outcomes, and a runbook that operators can actually use.

Azure CLI

Use CLI, REST, SDK, or service-specific tools for Blue-green deployment when you need repeatable evidence instead of a one-off portal screenshot. Commands help confirm scope, capture current state, compare environments, and preserve outputs for change records, audits, incident reviews, and rollback decisions.

Useful for

  • Inspect the live blue-green deployment configuration before a release, audit, or incident review.
  • Compare blue-green deployment behavior between development, staging, and production environments.
  • Capture repeatable evidence for blue-green deployment ownership, drift detection, troubleshooting, and rollback planning.

Before you run a command

  • Confirm tenant, subscription, resource group, service name, region, and environment before collecting evidence.
  • Use least-privileged access and avoid exposing keys, tokens, personal data, or confidential document content in command output.
  • Know whether the command is read-only, mutating, cost-impacting, or security-impacting before running it in production.

What the output tells you

  • Output confirms whether blue-green deployment exists at the expected scope and matches the approved production design.
  • Returned properties, scores, metrics, or logs help distinguish healthy service behavior from drift, missing configuration, or workload symptoms.
  • Differences between environments show what changed and provide evidence for rollback, tuning, support escalation, or audit review.

Mapped commands

Blue-green deployment operations

primary
az webapp deployment slot create --name <app> --resource-group <resource-group> --slot green
az webapp deployment slotprovisionDevOps
az webapp deployment slot swap --name <app> --resource-group <resource-group> --slot green --target-slot production
az webapp deployment slotoperateDevOps
az containerapp ingress traffic set --name <app> --resource-group <resource-group> --revision-weight <revision>=100
az containerapp ingress trafficconfigureDevOps

Architecture context

Blue-green deployment matters because it reduces release risk by validating a new version with production-like configuration before most users see it. If teams misunderstand it, they can swap the wrong environment, ignore slot-specific settings, route traffic before dependencies are ready, or keep duplicate production capacity running longer than necessary. The business impact is concrete: safer releases, faster troubleshooting, better recovery decisions, and cleaner audit evidence. Architects should define scope, owner, expected state, rollback rules, and monitoring before relying on it. Operators should know which signal proves it is healthy, which signal shows drift, and which change is safe during an incident. Well documented terms help security, finance, operations, and developers discuss the same Azure behavior clearly.

Security
From a security perspective, Blue-green deployment affects secrets, identities, private endpoints, authentication callbacks, slot settings, production-only credentials, and whether both environments meet the same compliance requirements. Review identities, roles, secrets, network exposure, data classification, and logging before changing it. Prefer least privilege, managed identities or scoped credentials where possible, private endpoints or controlled ingress when applicable, and alerting for unusual access. Security teams should capture who approved the setting, which accounts or services can use it, and how emergency access is handled. The practical goal is to prevent a useful capability from becoming an untracked path to data exposure, tenant lockout, or privileged change.
Cost
Cost impact depends on how Blue-green deployment changes storage, compute, requests, data movement, telemetry volume, or reserved capacity. Review duplicate compute during parallel environments, extra databases or caches, monitoring costs, test traffic, and idle green capacity after release completion. Some terms appear cheap because they are settings, but they can drive transaction charges, higher tiers, duplicate environments, extra retention, model calls, or engineer time during investigations. FinOps teams should define expected usage, watch Azure Cost Management, and tie spend back to business value. The safest pattern is to measure before and after the change, then remove unused capacity, stale data, or unnecessary telemetry.
Reliability
For reliability, Blue-green deployment should be validated under normal traffic, failure, retry, and rollback conditions. Check health probes, warm-up behavior, dependency readiness, rollback path, traffic weight changes, sticky sessions, and whether old and new versions can coexist safely. Good runbooks explain expected behavior, dependency health, timeout limits, and recovery steps. Teams should test the feature in a representative environment, monitor Azure service health and workload logs, and document what changes after failover, scaling, slot swap, rehydration, or consistency movement. Reliable use means operators can distinguish a service problem from a configuration problem quickly, then restore user impact without making risky guesses. Practice drills matter.
Performance
For performance, Blue-green deployment affects cold starts, warmed instances, traffic ramping, latency comparisons between versions, cache priming, and load balancer or ingress behavior during cutover. Test with realistic payloads, query patterns, document sizes, browsers, consistency settings, deployment traffic, or storage throughput, depending on the service. Monitor latency, throttling, cache behavior, queue depth, search scores, page-load metrics, and backend dependency timing. Performance work should not focus only on speed; it should verify that the system remains predictable when traffic grows or failures occur. Good teams tune carefully, compare before-and-after measurements, and avoid changes that improve one path while damaging another. Measure real workloads.
Operations
Operationally, Blue-green deployment needs an owner, a review cadence, and repeatable evidence. The runbook should show how to deploy green, validate smoke tests, shift traffic, monitor key metrics, freeze risky changes, and roll back to blue if user impact appears. Include CLI or REST commands, portal paths, log queries, approvals, escalation contacts, and rollback steps where rollback exists. During incidents, operators need to know whether they are observing a configuration value, a workload symptom, or a platform limit. Good operations also means preserving outputs from checks so the next engineer can see what changed, when it changed, and whether the production design still matches reality. Ownership prevents confusion.

Common mistakes

  • Treating blue-green deployment as a label instead of validating the exact Azure scope, identity, network path, and evidence.
  • Changing production settings from portal memory without capturing CLI, REST, SDK, metric, or log output first.
  • Ignoring cost, security, reliability, and performance side effects because the feature looks like a small configuration detail.