Lesson249 words

Minimising downtime

Plan for minimising downtime during deployments

Three mechanisms, three different levels of the stack.

MechanismLevelHow it avoids downtime
Load balancingNetworkRemove a backend from new-request rotation; where supported, drain existing connections before update
Rolling deploymentFleetUpdate in batches; the rest keep serving
Deployment slots + swapPlatform (App Service)Warm up in staging, then swap — no cold start for users

Slots and the warm-up

A slot swap is not a file copy. App Service applies target settings to the source slot and warms its workers to the production scale while the target remains online. After successful warm-up, it switches the slots' routing rules, avoiding swap downtime.

Two details worth carrying:

  • Swap is reversible — swap back to roll back, which is what makes slots the practical blue-green implementation on App Service.
  • Slot settings are configuration values marked sticky to the slot: they stay put during a swap. Connection strings pointing at staging versus production databases must be slot settings, or a swap sends production traffic at the staging database.

Rolling and maxParallel

yaml
strategy: rolling: maxParallel: 2

With six VMs and maxParallel: 2, four remain in service at all times. Lower maxParallel means less capacity lost per iteration and a longer deployment — that is the trade-off being tested.

Primary sources

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free