Skip to content
EncryptTechBD
Home Industries Our Work Blog Pricing About Contact Discuss Your Project
বাংলা (BN)
Cloud, DevOps & FinOps 5 min read

Zero downtime deployment strategy comparison

Compare blue-green, canary, rolling and feature-flag deployments for Bangladeshi teams, with criteria, trade-offs and practical decision guidance.

E
EncryptTechBD · 0 comments
Network switches with blue cabling in a rack
Photo: ShakataGaNai / Wikimedia Commons (BY-SA)

A customer in Dhaka adds a product to the cart at 9pm. A deploy starts at the same moment, the application restarts, and the checkout returns an error. The order is lost, the customer tries a competitor, and the support team spends the next morning explaining what happened. Zero downtime deployment is the set of practices that prevent this scene.

It is not a single tool. It is a combination of routing, health checks, database compatibility, observability and rollback discipline. This comparison sets out the main strategies, the trade-offs that matter for a Bangladeshi business and the questions that lead to a sensible choice.

Criteria that decide the strategy

  • User impact during release: can a customer complete a payment while the new version starts?
  • Rollback speed: how quickly can the previous version take traffic again?
  • Infrastructure cost: does the strategy need a second full environment or extra capacity?
  • Operational complexity: what must the team monitor, script and rehearse?
  • Database changes: can old and new code run against the same schema during the transition?
  • Observability: are error rates, latency and business metrics available per version?
  • Team capability: can the team diagnose a failed release at night without the original developer?
  • Compliance and audit: can the business show who approved a release and what changed?

Rolling deployment

Instances are replaced in batches while the load balancer sends traffic to healthy ones. It is the default pattern in Kubernetes and many platform services.

Strengths: no duplicate environment, relatively simple, works well for stateless web applications.

Weaknesses: two versions run at once, so an API change can break a session or a background job. Rollback means rolling back through the same process, which is slower than switching a router. Database migrations must be backward compatible.

Fits when: the application is stateless, sessions are externalised, health checks are meaningful and the team already runs containers.

Blue-green deployment

Two complete environments exist. Traffic points at blue while green receives the new release, is tested, and then takes over. If something fails, the router switches back to blue.

Strengths: fast rollback, a clean pre-production check with real infrastructure, and a clear separation between the old and new versions.

Weaknesses: roughly double the infrastructure for the application tier, plus the discipline to keep the idle environment patched. Database changes still need a compatibility plan; switching the application back does not undo a destructive migration.

Fits when: downtime has a direct revenue or service cost, the application can run as a complete duplicate and the business accepts the infrastructure bill.

Canary deployment

A small share of traffic, perhaps internal users or one branch, goes to the new version first. The team watches error rates, latency and business outcomes, then increases the share.

Strengths: limits the blast radius, produces real evidence before a full release and supports a gradual rollback.

Weaknesses: requires traffic routing, consistent user assignment and good metrics. A canary that is too small may miss a problem that only appears at peak load. Debugging is harder because two versions are live.

Fits when: the team has observability and can define a stop condition before the release starts.

Feature flags

The code is deployed with the new behaviour switched off, then enabled for selected users, branches or a percentage of traffic. Deployment and release become separate events.

Strengths: instant rollback by disabling a flag, targeted testing, and the ability to release outside business hours without a redeploy.

Weaknesses: flags accumulate and become a maintenance burden. A flag is not a substitute for a safe deployment pipeline, and stale flags can create security or behaviour surprises. The flag service itself becomes a dependency.

Fits when: releases are frequent, several customer segments need different behaviour and the team will retire flags on a schedule.

Maintenance window

The application is taken offline for a planned period, with a notice and a rollback plan. It is not zero downtime, but it is honest and sometimes the safest option for a legacy system, an on-premise server or a major database upgrade.

Fits when: the business can tolerate a defined quiet period, the alternative is an unsafe release, and the window is communicated to customers and staff in advance.

Comparison summary

  • Lowest complexity: maintenance window, then rolling deployment.
  • Fastest rollback: blue-green or feature flags.
  • Best evidence before full release: canary.
  • Highest infrastructure cost: blue-green with a full duplicate environment.
  • Most dependent on monitoring: canary.
  • Most dependent on database discipline: every strategy that changes the schema.

Decision guidance

  1. Start with the cost of downtime. If a short outage is invisible to customers, a maintenance window may be the most responsible choice.
  2. Check whether the application is stateless. If sessions live on the server, fix that before choosing a strategy.
  3. Separate schema changes from code releases. Use expand-and-contract migrations so old and new code can coexist.
  4. Choose the simplest strategy that meets the rollback target. Complexity that nobody rehearses is not resilience.
  5. Define a stop condition before the release: an error rate, a latency threshold or a failed business metric.
  6. Rehearse the rollback in staging, including the database step, and record how long it took.

Metrics to watch

Track deployment frequency, change failure rate, mean time to restore, rollback duration and the number of releases that required a manual database fix. Add business metrics such as completed checkouts and failed payment attempts per version. A release that is technically successful but depresses conversion is still a failure.

Where this fits in our work

Deployment design belongs with the wider cloud and operations stack. If you need help assessing your release process, start with Managed Technology & Cybersecurity and review the scope options on our pricing page. For the container side of the same decision, read Docker deployment for web applications in Bangladesh.

Sources

Services that deliver this

Want this implemented properly?

Pricing →

Every engagement starts with a written scope. If a requirement is outside it, we quote it separately before starting.

Responses (0)

No comments yet. Add the first one below.

Leave a response

Your email address will not be published. Required fields are marked *.

Keep reading

More field notes