Minimizing Downtime During Deployment

At some point in the life of a site, you may need to make large sweeping changes. This may include significant changes to the look and feel, presentation elements, and even to the content itself. You may be adding new fields or totally new content types. Whatever the change is the challenge is the same. How do we deploy the files and Sitecore changes without the site being unavailable?

Our environment

For this example, we have the following servers:

  • CM - Content Management Server
  • CD1 - Content Delivery Server 1
  • CD2 - Content Delivery Server 2

We have the 3 standard Sitecore Databases and an extra web database called the Live Web database. Both web databases are set as publishing targets. The two web databases allow us to publish to one without the other to see how the published site will perform.

We also need to remember that a CM server can view the master database in preview mode or the web database when you access it directly.

The process

  1. Perform your standard backups.
  2. Connect to the database and set the live web database to read only. This allows our two CD servers to continue to serve the existing site.
  3. Install your packages and files to apply all of the changes to the CM server.
  4. Publish the changes to the web publishing target.
  5. Verify the changes by navigating the site using the CM server.
  6. Remove CD1 from the web farm and update the connection string to use the web database.
  7. Push all of the new files to CD1 and verify the site.
  8. Add CD1 back to the web farm and remove CD2.
  9. Undo step 2 so that we can publish to the Live Web target.
  10. Apply all of the file changes to CD2.
  11. Add CD2 back to the cluster.
  12. Update CD1 to once again read from the Live Web database.

Conclusion

Due to Sitecore's database and server recommendations, you can use strategies like this to minimize downtime during major upgrades.