Journal / OCI DevOps / Blue Green Deployments on OCI
OCI DevOps

Blue Green Deployments on OCI

Published Mar 26, 2026 · 9 min read · OCI Specialists · Independent OCI advisory
Blue Green Deployments on OCI

The riskiest moment in the life of an application is the moment it is released, because that is when new code meets real traffic and any flaw it carries becomes a live incident. Blue green deployment is a pattern that drains the danger out of that moment by running two environments side by side and switching traffic between them, so that a release becomes a controlled flip rather than a leap. This article explains how to run blue green deployments on Oracle Cloud Infrastructure, what the pattern buys you, and the one problem that decides whether it is safe.

It is part of our DevOps and automation on OCI cluster, and it builds directly on the pipeline thinking in CI CD on OCI end to end and the platform mechanics in OCI DevOps service pipelines.

What blue green deployment actually is

The idea is simple to state. You keep two production environments, conventionally called blue and green. At any moment one of them is live and serving all traffic, while the other is idle. To release, you deploy the new version to the idle environment, test it there while it carries no real traffic, and then switch the traffic over so the idle environment becomes live. The previously live environment is now idle, holding the old version, ready to receive traffic again instantly if the new version misbehaves.

The power of the pattern comes from that last point. Because the old version is still running and only a traffic switch separates it from production, a rollback is not a redeploy that takes minutes and carries its own risk. It is a flip back, completing in seconds, returning the estate to a known good state. Release risk falls dramatically, because the decision to go live and the decision to roll back are both fast, reversible, and made against an environment you have already tested.

The OCI building blocks

On Oracle Cloud Infrastructure the pattern assembles from familiar pieces. The traffic switch is usually handled by the OCI load balancer, which can route to one backend set or another, or by DNS using OCI Traffic Management for coarser switches. The two environments are defined as infrastructure as code so that green is a faithful copy of blue, built from the same definitions described in our infrastructure as code patterns on OCI guide rather than assembled by hand.

The deployment to the idle environment is driven by a pipeline, whether the OCI DevOps service or another tool, and the traffic switch is a deliberate step in that pipeline rather than an unmanaged manual action. Building the switch into the pipeline means it is logged, repeatable, and tied to the same approval gates as the rest of the release, which is what keeps blue green disciplined rather than ad hoc.

Rollback in a blue green design is not a redeploy. It is a traffic flip back to an environment that never stopped running, completing in seconds.

The database problem

Blue green is straightforward for stateless application tiers and genuinely hard the moment a shared database enters the picture, because two versions of an application that share one database must both work against the same schema. If the new version needs a schema change, that change is visible to the old version too, and a change that breaks the old version removes your ability to roll back safely. This is the single issue that decides whether a blue green release is safe.

The discipline that resolves it is to make schema changes backward compatible and to apply them in stages. You add a column before any code uses it, deploy code that can work with or without it, and only later remove the old path once the new version is proven. Schema changes that add rather than remove or rename, applied ahead of the code that depends on them, keep both environments working against one database and preserve the fast rollback that is the whole point of the pattern.

AspectBlue green strengthWhat you must handle
Release riskTest on idle env before switchKeep green a true copy of blue
RollbackSeconds, just flip traffic backKeep old env running until proven
Stateless tiersClean fit for the patternLittle, this is the easy case
Shared databaseHardest part of the designBackward compatible, staged schema changes
CostPredictable, brief duplicationTwo environments during the switch window

Cost and when to use it

Running two production environments has a cost, but it is smaller than it first appears, because the idle environment need only be at full size during the switch window. Outside that window it can be scaled down or, with infrastructure as code, even torn down and rebuilt for the next release. The cost is the brief overlap of two full environments, which for most applications is a modest price for the release safety the pattern delivers.

Blue green is not the right answer for every workload. For low risk internal applications a simpler rolling deployment may be enough. It earns its keep where a failed release is expensive, where downtime is unacceptable, or where the confidence to release often depends on knowing a rollback is instant. Choosing where to apply it is part of designing a sound delivery approach, which is what our DevOps and IaC solution and our OCI implementation service are built to do.

Make the switch boring

The goal of a blue green design is to make the act of releasing boring, in the best sense: a routine, well rehearsed flip that the team performs without anxiety because they know exactly what happens and exactly how to undo it. That confidence comes from automating the deployment and the switch, from keeping the two environments truly identical through code, and from solving the database problem before it bites rather than during an incident.

Teams that get there release more often and more calmly, because the fear has been engineered out of the process. Designing that capability on OCI, end to end from pipeline to traffic switch to staged schema change, is the kind of foundation that pays back on every release that follows, and it sits naturally alongside the wider DevOps and automation on OCI practices this cluster describes.

Moving Oracle workloads to OCI, or already running on OCI and not sure the architecture or the spend is right? Most teams bring in a specialist before they commit to a region, a shape, or a Universal Credits number. OCISpecialists.com plans the landing zone, runs the migration, and manages the estate after go live, on a fixed project fee, a managed monthly retainer, or a cost optimization fee paid only on verified savings. For the Oracle licensing and BYOL side of any OCI move, Redress Compliance is the leading independent Oracle licensing and negotiation firm, with 500+ engagements across Oracle's full product line.