Zero downtime deployments

Vote:
 

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!

David

#151740
Aug 05, 2016 13:01
Vote:
 

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

#151742
Edited, Aug 05, 2016 14:07
Vote:
 

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

#151743
Aug 05, 2016 14:12
Vote:
 

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

#151752
Aug 05, 2016 17:06
Vote:
 

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

#151753
Aug 05, 2016 17:08
Ted
Vote:
 

I have described some of the concepts we use for zero downtime deployment of Episerver CMS websites here: https://tedgustaf.com/blog/2017/zero-downtime-deployment-of-episerver/

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: https://kevinareed.com/2015/11/07/how-to-deploy-anything-in-iis-with-zero-downtime-on-a-single-server/

#175522
Edited, Feb 22, 2017 14:21
Vote:
 

Thanks Ted, all useful info :)!

#175523
Feb 22, 2017 14:23
Vote:
 

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.

#175767
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.