SaaS CMS has officially launched! Learn more now.

Zero downtime deployments


Hi all

I have been discusing a zero downtime approach for a standard Episerver CMS 9 site (no Commerce or Find and doesn't use Forms). The approach will be using traditional infrastructure on VMs so I'm afraid using Azure deployment slots isn't an option right now :)

Current thoughts revolve around two load balanced servers (A) and (B) using a shared database. The approach is as follows:

  1. Put Episerver into readonly mode 
  2. Take server (A) out of load balancing pool
  3. Replicate DB
  4. Point server (B) to replicated DB
  5. Apply changes (code and DB) to server (A)
  6. Smoke test server (A)
  7. Bring server (A) back online
  8. Take server (B) out of load balancing pool
  9. Apply changes to server (B)
  10. Bring server (B) back into load balancing pool

Does anyone have any thoughts inisights/they can share on this? Have you done this yourself?

Appreciate your thoughts!


Aug 05, 2016 13:01

We have done this approach @ redweb when we deploy via Octopus on to our own hosted servers and it's work pretty well

Edited, Aug 05, 2016 14:07

If using Octopus/TeamCity a step that would be good that we have yet to implement would be running Selenium or Wraith tests after. We do this as part of our automated builds and find it works pretty well but you could have a step in Octopus that on failure of the selenium tests could auto rollback via steps configured to run when previous steps fail allowing it to be all automated

Aug 05, 2016 14:12

Thanks for the insight Scott! Sounds like a blog post ;)

Aug 05, 2016 17:06

Yeah, I love Octopus so will have to do one. The first one I was planning on was around the new A/B testing so if there's any chance of a preview that would be excellent, wink wink ;-p

Aug 05, 2016 17:08

I have described some of the concepts we use for zero downtime deployment of Episerver CMS websites here:

To accomplish something similar to deployment slots on-premise, you can set up two IIS instances and use a "server farm" to control which instance is the active production environment:

Edited, Feb 22, 2017 14:21

Thanks Ted, all useful info :)!

Feb 22, 2017 14:23

Hey David,

We normally deploy to new servers, behind another laod balancer.  We check that it works fine, and then switch the domain to point to the new load balancer.  This works most of the time, the only issue we normally have is adding new fields to the basket as this randomly breaks both versions.  Once switched to, we add any new blocks, etc.

Mar 01, 2017 14:50
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.