Skip to content

Deploy

To deploy is to move a new version of software from an environment where it was built or tested into the environment where users can access it — from build to production, or from staging to production.

Definition

What it is

Deployment is the boundary between "code exists" and "code runs for users". It is not the same as release: a deploy may ship a feature disabled by a flag; a release is when the flag is turned on. It is not the same as build: a build produces an artifact; a deploy moves the artifact to a target environment. And it is not the same as delivery: Continuous Delivery means a deploy is possible at any time; Continuous Deployment means it happens automatically.

Deployment patterns are the family that governs how this transition happens: blue/green, canary, rolling, recreate, shadow. Each trades downtime, risk, complexity and rollback speed differently.

Why it matters

A team that can deploy in five minutes ships small changes several times a day. A team whose deploy takes two hours ships big changes once a week. The second team's releases are inherently riskier, because each contains more code and therefore more opportunities to break. Deployment speed is not a luxury; it is a lever on release risk.

Blue/green vs canary vs rolling vs recreate

Pattern

Downtime

Rollback

Cost

Best for

Recreate

Yes

Redeploy old

Low

Dev, simple apps

Rolling

No

Redeploy old

Low

Stateless services

Blue/green

No

Flip environment

High (double)

Risk-sensitive

Canary

No

Route away

Medium

Continuous traffic

Shadow

No

Drop shadow

High (double)

Validating migrations

The deploy pipeline

graph LR
  B[Build] --> A[Artifact]
  A --> R[Registry]
  R --> D[Deploy target]
  D --> H[Health check]
  H -->|OK| T[Traffic shift]
  H -->|Fail| Rollback
  T --> M[Monitor]
  M -->|OK| Done
  M -->|Fail| Rollback
  style D fill:#FFF3E0
  style Done fill:#E8F5E9
  style Rollback fill:#FFEBEE

How to deploy safely

A deploy that gets out of the way

  1. Automate every step

    Manual steps fail. ./deploy.sh beats a wiki page with twelve steps. Every step that could be code should be code.

  2. Health check before shift

    Serve a /health endpoint. Wait for it to return 200 before sending traffic. Cuts "deployed, users see 502" incidents in half.

  3. Monitor after shift, not just during

    Errors and latencies often surface five minutes after traffic shift. Watch the dashboard after the deploy, not before.

  4. Rollback under five minutes

    A deploy without rollback is a bet. Rollback changes the risk calculus from "hope nothing breaks" to "revert if it does".

Common failures

Origin

The word came to English in the late 18th century from French déployer, "to unfold". Its first sense was military: to spread out troops from a column into battle order. The image was spatial — spreading soldiers across the terrain. Computing adopted it in the 1990s for spreading software across servers: from a build artifact into all the environments where it runs. The metaphor survived: a deploy spreads code across the field.

Deployment is the process of getting software from a build environment to production. It is the last mile of the pipeline and the first place users experience the team's work.

— Jez Humble & David Farley, *Continuous Delivery*, 2010 (paraphrase)
1793 · "déployer" en francés militar
1990s · deploy en software
2010 · *Continuous Delivery* (Humble/Farley) formaliza la práctica
2018 · "Elite performers deploy on demand" (DORA State of DevOps)
<5 min · rollback target en equipos maduros

Evidence

FAQ

Deploy vs release?

Deploy moves code to production. Release makes it visible to users. A flag can be released in a deploy or later.

Deploy vs build?

A build produces the artifact; a deploy ships it. Continuous Integration builds on every commit; Continuous Deployment deploys on every passing build.

Why deploy small changes?

Because a bug in a 10-line diff is easy to spot; a bug in a 500-line diff is not. Small deploys localize the failure.

How to rollback?

Redeploy the last known good artifact, or flip the traffic back (blue/green, canary). Either way, it must be under five minutes.

Connections

Etymology

Origin: borrowed

  • deploy (verb): from French déployer, "to unfold"; military sense in 1793

Semantic network

DeployoperationsdevopsBuildRollbackCanaryBlue/greenContinuousdora

● broader ● narrower ● related

Used in the garden

Sources