Minimizing Downtime During Deployment
Jan 01, 0001
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?
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.
- Perform your standard backups.
- 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.
- Install your packages and files to apply all of the changes to the CM server.
- Publish the changes to the web publishing target.
- Verify the changes by navigating the site using the CM server.
- Remove CD1 from the web farm and update the connection string to use the web database.
- Push all of the new files to CD1 and verify the site.
- Add CD1 back to the web farm and remove CD2.
- Undo step 2 so that we can publish to the Live Web target.
- Apply all of the file changes to CD2.
- Add CD2 back to the cluster.
- Update CD1 to once again read from the Live Web database.
Due to Sitecore's database and server recommendations, you can use strategies like this to minimize downtime during major upgrades.