Latest posts Visit blog
In plain words: what is this page about?

This article is about updating a shop without a pause. A stop for updates can cost sales. You keep two copies of the shop. Then you switch from the old to the new one. You can also roll out a change to a few visitors first. The text covers caches and logged-in users. Ask us about this.

For a long time, a software update to an online shop meant one thing above all: a maintenance window. The shop goes offline for a moment, a friendly under-construction page appears, and whoever wanted to buy is gone. In an era where a noticeable share of revenue happens around the clock, that is an expensive reflex. Zero-downtime deployments flip the principle: new versions go live without the shop becoming unreachable for visitors. An established technique for this is blue-green deployment, complemented by canary releases for a gradual rollout. This article explains how blue-green and canary work, how to handle migrations, message queue workers, sessions and cache warmup in Shopware, which measurements should trigger a switch back – and where the way back ends.

Why maintenance windows in a shop cost real money

Every minute your shop is unreachable is a minute without orders – and often more than that. Visitors who hit an error or maintenance page rarely return the same day; many go straight to a competitor. How high the cost per minute of downtime turns out depends on assortment, season and channel mix. For a single mid-sized shop it is lower than in an enterprise setting, but the pattern holds at every scale: being unreachable stays expensive, and a planned maintenance window is only the voluntary version of the same loss.

The Uptime Institute's annual analysis of IT and data center outages shows how expensive outages can get: in its 2025 survey, 57% (Uptime Institute) of respondents said their most recent major outage cost more than $100,000, and one in five reported more than $1 million (Uptime Institute). The 2026 report names failures to follow established procedures as the most common cause of outages due to human error (Uptime Institute) – an argument for an automated deployment pipeline instead of a manual checklist.

For a mid-sized shop, your own math is worth doing. A worked example with assumed values: €2.4 million in annual online revenue means around €4.57 per minute. If evening traffic runs at three times the average, a half-hour maintenance window at the evening peak costs around €410 – manageable. The detour is what gets expensive: bundling releases at night means shipping less often in larger batches, and a failed update without a way back that only surfaces at the next evening peak and costs two hours there comes to around €1,640, not counting follow-on costs such as lost regular customers.

The damage does not stop at the outage itself. Even noticeable delays change behavior: anyone waiting on a sluggish page is more likely to leave. Conversely, a Deloitte study that analyzed four weeks of mobile site data from retail, travel, luxury and lead generation brands across Europe and the US found that just 0.1 seconds of faster load time lifted retail conversions by 8.4% (Deloitte) and the average order value by 9.2% (Deloitte). So a release that briefly cripples the page or ships it with a cold cache hits exactly the metrics your shop earns on.

An outage is not just an outage

Unplanned outages can be caught early with monitoring of availability and performance. Zero-downtime deployments start one step earlier: they ensure that planned releases do not become an outage in the first place. The two belong together – monitoring surfaces incidents, a clean deployment process prevents the self-inflicted ones.

What zero-downtime deployment means

Zero-downtime deployment describes a release process in which a new software version goes live without the application being interrupted for users. No maintenance window, no error page, no break mid-checkout. This is achieved by first providing the new version alongside the running one, testing it fully and only then routing live traffic to it – in a way that keeps a way back open.

That frequent, uninterrupted releases pay off is shown by Google DORA's research. In the Accelerate State of DevOps Report 2024, so-called elite teams do not deploy less often, but on demand, and thus around 182 times more frequently (Google DORA) than low performers. At the same time they keep a change failure rate of 5% (Google DORA) or below and restore service after a failed deployment in under an hour (Google DORA) – roughly 2,293 times faster (Google DORA) than the lowest-performing quarter. Shipping more often and being more stable are therefore not a contradiction; with mature processes they go hand in hand.

Deployment frequency

Elite teams ship on demand, around 182 times more often than weak teams (Google DORA). Small, frequent releases shrink the risk per change.

Change failure rate

At elite teams only about one in twenty changes fails, a rate of 5% or less (Google DORA). Fewer faulty releases mean fewer emergencies.

Recovery time

After a failure, service is back in under an hour (Google DORA). An instant way back makes releases plannable instead of risky.

The latest edition, the 2025 DORA report “State of AI-assisted Software Development”, draws on responses from nearly 5,000 technology professionals (Google DORA) and sorts teams into seven team profiles instead of performance tiers such as “elite” (Google DORA). Only 16.2% (Google DORA) of respondents deploy on demand, and 21.3% (Google DORA) restore service in under an hour after a failed deployment. DORA's original four metrics have since become five; the addition is the rework rate: the share of unplanned deployments that follow an incident in production (Google DORA).

Blue-green deployment: two environments, one switch

Blue-green deployment is a widely used technique for uninterrupted releases and goes back to a description by Martin Fowler. The principle: you run two production environments that are as identical as possible, traditionally called blue and green. At any given moment only one of them serves live traffic. Fowler captures the core in a single sentence: once the software is working in the green environment, you switch the router so that all incoming requests go to the green environment – the blue one is now idle (Martin Fowler).

The procedure is unspectacular, and that is precisely the advantage. While blue keeps serving customers, the new version is installed, migrated and tested in green – without a single visitor being affected. Only once green demonstrably works does the router move all traffic to green. The switch takes a fraction of a second. Blue stays untouched and serves as an instant rollback: if a problem appears after the switch, you flip the router back to blue, and the old, stable state is live again immediately, without reinstalling (Martin Fowler).

  • No maintenance window: the switch is a routing change, not a shutdown – the shop stays reachable throughout
  • Instant rollback: the old environment is on hand as a tested state; going back takes seconds instead of a reinstall
  • A real test under production conditions: green is verified on identical infrastructure, not on a divergent test system
  • A rehearsed emergency plan: every release also exercises the switch-over path you need in a real incident (Martin Fowler)

Once the software is working in the green environment, you switch the router so that all incoming requests go to the green environment - the blue one is now idle.

Martin Fowler, Blue Green Deployment

Canary releases: roll out gradually, spot issues early

Blue-green switches all traffic at once. Sometimes a more cautious approach makes more sense – this is where the canary release comes in, also coined by Martin Fowler. The idea comes from mining, where canaries gave an early warning of danger. In a canary release the new version is first shown only to a small subset of users, before it is rolled out to the entire infrastructure and made available to everyone (Martin Fowler). If the version runs stably for these first users, you raise the share step by step; if errors appear, you pull it back before the majority is affected.

For shops this is especially valuable for extensive changes – a new checkout, an altered search logic or a framework jump. Instead of subjecting the whole audience to a risky change at once, you gather data under real conditions from a few percent of traffic. Which users see the new version can be controlled: a random share, internal staff only at first, or a group chosen by profile (Martin Fowler). The approach limits the possible damage to a small circle while producing meaningful signals.

AspectBlue-green deploymentCanary release
Switch-overall traffic at oncegradual, growing share
Risk profilefast switch, instant rollbacksmall test circle, early detection
Ideal forplannable releases with a clear cut-overrisky or large changes
Rollbackrouter back to old environmentreduce the share to zero
Infrastructuretwo complete environmentsfine-grained traffic control
Observationpre-test, then full operationongoing metrics per stage
The two can be combined

Blue-green and canary are not mutually exclusive. In practice we combine them: the new version is provided in a second environment (blue-green) and traffic is then steered onto it in a controlled, staged way (canary). This joins the clean cut-over with the early warning of a limited rollout. For large rebuilds, our guide to website relaunch planning is worth a look.

The tricky details: database, sessions and carts

The routing switch is the easy part. Zero-downtime gets demanding wherever state is involved: in the database, in users' sessions and in open carts. If this is skipped, the shop is formally reachable, but customers lose their cart mid-purchase or hit errors because the old and new versions expect different data structures.

The most critical piece is the database, because both blue and green usually share the same data. Fowler explicitly advises separating schema changes from application changes (Martin Fowler): first the schema is extended so that it tolerates the old and the new version, this state is shipped and stabilized, and only then does the new application code follow. In practice this means only additive changes at the moment of the switch. A column is first added and populated while both versions run; it is removed or renamed only in a later release, once the old version is finally retired. This expand-and-contract pattern is the key to migrations without downtime.

expand-contract-migration.sql
-- Phase 1 (Expand): additive change, compatible with old + new app
ALTER TABLE orders ADD COLUMN delivery_slot VARCHAR(32) NULL;

-- Phase 2 (Deploy): ship new app to green, then switch the router
-- both versions read and write in parallel, without conflict

-- Phase 3 (Contract): only in a later release, once v1 is retired
-- ALTER TABLE orders DROP COLUMN legacy_slot;

Migrations in Shopware: what the system already separates

Shopware builds this separation into its core: core migrations define, alongside update(), an optional updateDestructive() method for delayed destructive changes across major versions (Shopware). For plugins, Shopware runs update() for every new migration once on install and update, and there is no automatic rollback (Shopware). We therefore write plugin migrations additively: new columns with a default value or NULL, new tables instead of rebuilt ones. Because migrations must match the deployed code (Shopware), the pipeline runs them once against the shared database before green receives its first visitor.

Message queue workers during the switch

One part of the shop does not sit behind the router: the workers that process indexing, emails and imports from the message queue. A worker started before the release keeps running old code. Symfony, whose Messenger component Shopware uses, therefore recommends messenger:stop-workers on every deployment – after the new code is in place and the cache is warmed up, but before traffic shifts (Symfony); with separate servers via a shared app cache, for example in Redis (Symfony). If a message class changes fundamentally, the old version stays until the queue has been drained (Symfony). More on this in the article on Shopware message queue workers in production.

Sessions and carts in Redis

If sessions live on only one instance, for example as session files on its disk, they are lost at the switch – the customer is logged out, the cart is empty. What is needed is a shared, central session store for both environments. Shopware distinguishes rebuildable caches in Redis, sessions as durable but aging data and carts as durable, critical data, and recommends separate instances for sessions and carts that also write to disk (Shopware). In our Shopware hosting we set up the Redis-compatible Valkey for this by arrangement; details are in the article on Redis caching for Shopware.

  • Migrate the database additively (expand-and-contract), no destructive changes at the moment of the switch
  • A central, shared session store instead of sessions in an instance's memory
  • Open carts in the shared data store, not volatile per version
  • Let in-flight requests drain cleanly (connection draining) before the old instance stops
  • Backward-compatible interfaces so old and new versions can coexist during the transition
  • Restart message queue workers on every deployment, keep old message classes until the queue is drained
The silent killer: the database

Most failed zero-downtime attempts are not caused by routing, but by a migration that breaks the old version. We therefore plan schema changes additively as a matter of principle and separate them from the code release – just as our experience from shop migrations suggests.

Cache warmup: why the green environment must not start cold

A freshly started environment is technically ready quickly, but slow. Its caches are empty: object cache, HTTP cache, compiled templates, warmed-up database buffers – all of it has to fill up first. Switch full traffic onto a cold green environment and the first wave of real customers hits noticeably longer load times while the caches build under load. It is exactly at this moment that the benefit of the uninterrupted release turns into its opposite, because slow pages cost conversions – the cited 8.4% (Deloitte) per 0.1 seconds work in the other direction too.

That is why a clean zero-downtime deployment includes a cache warmup: before the router switches, the most important pages of the green environment are called deliberately and their caches pre-filled – homepage, most-visited categories, best sellers, the central landing pages. Only once green is not just running but also warm does it take over traffic. For shops with a lot of dynamic content, it is also worth looking at delivery via a fast, cacheable data path. In Shopware, the warmup mainly concerns four areas:

  • HTTP cache: since version 6.5.8.0 the built-in HTTP cache warmers are deprecated, and Shopware recommends a real crawler (Shopware). It requests sitemap and best-seller pages under the public hostname but directly at green's address and only warms the guest version, because logging in, currency or cart change the cache entry via the sw-cache-hash cookie (Shopware); more on this in the article on the Shopware cache rework.
  • Compiled theme and assets: are produced in the CI build, not at the switch (Shopware); at deployment time the Deployment Helper only handles migrations, extensions and one-time tasks.
  • Search index in Elasticsearch or OpenSearch: until the switch, green uses the existing index in the read-only mode Shopware provides for servers that should only read (Shopware); after a rebuild via the message queue, the alias is only set once indexing is complete, in some cases via bin/console es:create:alias (Shopware).
  • Object cache and connections: warm up frequent queries, establish database and Redis connections in advance.
Warmup belongs in the pipeline

A warmup that someone has to trigger by hand gets forgotten. We anchor it as a fixed step in the deployment pipeline: only after a successful warmup and a final health check does the automation release the router. That way speed and availability move together instead of getting in each other's way during a release.

The way back: rollback criteria and what cannot be undone

A way back is only useful if it is clear beforehand when to take it. We define the criteria before every release and compare green with blue at the same time of day: server errors, response times for category, cart and checkout, completed orders, the message queue's failure queue and search. If a criterion is breached, the router switches back without debate; the cause is investigated afterwards.

The limit of the router's way back lies in the database: code can be switched back, data cannot. Shopware names one special case: with blue-green deployment enabled, you can roll back to the previous version without restoring the database backup, which is only recommended if Shopware alone was updated, without extensions (Shopware). After a destructive migration, only a fix forward or a backup remains, and after a restore every order since the backup has to be recovered. We therefore take the contract step only once blue has been retired, and a verified backup has to be in place before every release, as described in the article on backup and disaster recovery for shops.

Type of changeWay back via routerWhat else is needed
Code without schema changeyes, immediatelynothing else
Additive migration (expand)yes, the old version ignores new columnsnew columns stay unused for now
Shopware update without extensions, blue-green enabledyes, per the documentation without restoring the backupkeep the previous version ready to run
Plugin update with migrationonly if the migration was additiveno automatic rollback, manual cleanup
Destructive migration (contract)nofix forward or backup restore with follow-up work

When a short maintenance window is the more honest choice

Not every update can sensibly be installed without interruption. Shopware provides for maintenance mode when updating a running production environment (Shopware), and the Deployment Helper can enable it only for the migration step system:update:finish (Shopware). For major versions with many migrations, a planned window of a few minutes is often safer than an expand/contract sequence across several releases; zero-downtime remains the goal for the many small releases in between.

Example: a release run with measurement points

How this fits together is shown by a schematic run for a patch release with a template change and an additive plugin migration. The table shows example values, not measurements from a customer project; we calibrate thresholds per shop against its baseline noise. The label p95 is the 95th percentile, the response time that 95 out of 100 requests stay under.

  1. One hour before: build with the compiled theme, tests passed, backup verified, blue's reference values recorded
  2. Half an hour before: start green, run the additive migration, health check through to checkout
  3. Shortly before: a crawler warms the HTTP cache, search is checked, workers are restarted with messenger:stop-workers
  4. Switch: first a small share of traffic as a canary, then the full move
  5. A quarter of an hour and one hour after: check the measurement points against the reference values, back to blue if a threshold is breached
  6. Until the next release: blue stays in place as the way back
Measurement pointBlue before the switchGreen a quarter of an hour afterBack to blue if …
Server errors (HTTP 5xx)0.2% of requests0.3% of requestsmore than twice as high as on blue
Response time p95, category page420 ms450 msmore than 25% above blue
Response time p95, checkout380 ms390 msmore than 25% above blue
Cache hit rate91%86%below 80% after the warmup
Completed ordersin line with the previous weekin line with the previous weekbelow the previous week at the same time
Message queue failure queueemptyemptynew failed messages

In this example, green stays within all thresholds and therefore stays live; the slightly lower hit rate is to be expected shortly after a release because the crawler only pre-warms the most frequent pages. The order matters: record reference values first, then switch – otherwise numbers get debated in an emergency instead of switching back.

What a clean release process does for your revenue

Zero-downtime deployment is not a purely technical exercise but a business decision. DORA's research has shown for years that teams with high delivery performance work not only faster but also more stably. According to Google DORA, the difference between top and lagging teams is less a tooling gap than a practice gap: hallmarks are small change batches, automated tests on every commit and trunk-based work without long-lived feature branches (Google DORA). It is precisely these practices that make frequent, uninterrupted delivery possible.

For the shop operator this means: improvements go live when they are ready, not only in a nightly slot. Small, frequent releases lower the risk per change, and a tested way back usually turns the worst case into the press of a button. In Google DORA's 2024 report, the elite teams that work this way were among the roughly 19% (Google DORA) of respondents with the highest delivery performance – an attainable goal, not a law of nature.

From a risk event to routine

When a release no longer triggers anxiety, it changes product work. Improvements to the assortment, checkout or performance go live more often and in smaller steps, each with an instant way back. That way the continuous evolution of your shop becomes the norm – supported by our custom programming and development.

How we set up zero-downtime deployments for your shop

In practice, zero-downtime is less a single tool than a well-thought-out chain of infrastructure, data handling and automation. We set it up step by step, tailored to your system – from Shopware through WooCommerce to custom applications – and to the way you want to run releases.

  1. Assessment: capture the current deployment path, database, sessions and cache strategy
  2. Set up environments: provide two equivalent production environments (blue/green) on identical infrastructure
  3. Set up routing: configure the router or load balancer for the controlled switch-over path
  4. Harden data handling: establish an additive migration strategy, a central session store and shared carts
  5. Automate warmup: anchor cache pre-filling and health checks as fixed pipeline steps
  6. Add canary: set up staged rollout with metrics per stage for risky changes
  7. Operate and observe: define rollback criteria per release, continuously monitor latency and error rates and refine the process

How simple the actual cut-over is becomes clear when you look at the router. A blue-green switch is, at its core, a line swap followed by a config reload – without in-flight connections being dropped:

router-cutover.conf
# Blue-green cut-over: one upstream, switched in a single step
upstream shop_backend {
    # server blue.internal:8080;   # v1 (old) - standby
    server green.internal:8080;    # v2 (new) - live
}

# Rollback: re-enable the old line, comment out the new one, then
# nginx -s reload  (reloads config without dropping connections)
It fits your infrastructure

Whether your own server, a cloud environment or containers: the blue-green principle can be implemented on very different foundations. We set the process up as part of hosting and maintenance and run it permanently on request, including monitoring and emergency rollback. For Shopware shops, our managed Shopware hosting also covers the message queue workers, scheduled tasks and cache warmup.

Releases without a noticeable interruption

An update should not be an event your customers get to feel. With blue-green, canary, central sessions, restarted workers and a pre-warmed cache, new versions usually go live while the shop keeps selling – and as long as no destructive migration has run, the way back remains open.

Anyone modernizing operations this way should keep the content and legal side in mind too: from an AI connection for the shop via the Model Context Protocol to new obligations such as the GPSR product safety regulation for online shops. Stable operation is the foundation on which such developments become safely possible in the first place. We support both – from reliable hosting to custom shop development with Shopware.

Sources and studies

This article draws on: Google DORA (Accelerate State of DevOps Report 2024: elite teams deploy around 182 times more often than low performers, a change failure rate of 5% or below, recovery in under an hour and roughly 2,293 times faster, about 19% of respondents in the elite cluster; 2025 DORA report: nearly 5,000 respondents, seven team profiles, 16.2% deploy on demand, 21.3% restore service in under an hour; dora.dev: five metrics), Uptime Institute (Annual Outage Analysis 2026, 2025 annual survey: 57% of respondents with outage costs above $100,000), Martin Fowler (blue-green deployment and canary release), Deloitte (“Milliseconds Make Millions”: 8.4% more retail conversions and 9.2% higher order value per 0.1 seconds), Shopware (developer documentation and the 6.5 upgrade notes) and Symfony (Messenger documentation). The figures cited are snapshots and can vary depending on time and methodology.

That depends on the type of migration. The old version can usually cope with additive changes such as a new column, so the router can switch back. After a destructive change, the old version lacks what it needs; then the options are a fix forward or restoring a backup. For pure Shopware updates with blue-green enabled, the documentation describes a way back without restoring the backup (Shopware); for plugin migrations there is no automatic rollback.

Blue-green deployment switches all traffic at once from the old to the new environment and keeps the old one on hand as an instant rollback. In a canary release, by contrast, the new version is rolled out gradually, at first only to a small subset of users (Martin Fowler). Both methods can be combined: provision as in blue-green, then steer traffic over in stages as in canary.

Not necessarily. The second environment is needed mainly around the deployment. In a cloud environment it can be spun up on demand and scaled back down after the switch, so the extra cost stays manageable. In our experience, the effort is in a favorable ratio to the revenue loss avoided from outages.

For sessions and carts to survive the switch, they belong in a central, shared store that both environments access, in Shopware for example separate Redis instances for sessions and carts – not in the volatile memory of a single instance. Then a user stays logged in through the move from blue to green and keeps their cart. In practice, this point decides whether a release really goes unnoticed.

Often yes, because smaller shops also lose orders and trust with every maintenance window. The scope can be matched to the size: not every shop needs full canary control right away, but a clean blue-green switch with additive migrations and cache warmup is well within reach for mid-sized businesses and usually pays off quickly.

A few criteria defined in advance work well, compared with the old environment at the same time of day: server errors, response times for category, cart and checkout, completed orders and new entries in the message queue's failure queue. If a criterion breaches its threshold, traffic switches back and the cause is investigated afterwards. We set exact thresholds per shop based on its usual baseline noise.