The Side-by-side functionality in SharePoint 2016 did not get a lot of attention in current documentation so I would like to explain how it works and how SharePoint administrators can enable it.
The only place where I’m aware of that Side-by-Side functionality is mentioned in public documentation is in the following article – but the information provided is very basic:
So how does the SharePoint Server 2016 side-by-side functionality work?
Some of you might have noticed this directory and might have been curious about the purpose of this directory:
After installing a new CU and running PSConfig you will notice a second version directory inside the LAYOUTS directory:
Be aware that the SharePoint configuration wizard will remove all side-by-side directories except the currently used one before creating the new side-by-side directory for the latest version. And the algorithm used here to remove the directories deletes all directory which slightly look like a side-by-side directory. And that means all directories which have the pattern of a version number. So a directory 220.127.116.11 would also be removed. Be careful not to use this pattern when creating custom directories inside the layouts directory!
So how does this help us with Zero-Downtime-Patching?
So the relevant steps related to Zero-downtime-patching would be as follows:
- Ensure that the side-by-side functionality has been enabled previously and that a version folder exists inside the LAYOUTS directory
- Configure the site-by-side functionality to use the specific version directory inside the layouts folder (in our example 16.0.4456.1002) by specifying the appropriate side-by-side token.
- Follow the normal instructions to perform zero-downtime-patching as outlined in the following articles:
- After all servers are patched and the configuration wizard was executed on all machines configure the site-by-side functionality to use the new version directory inside the layouts folder (in our example 16.0.4471.1000) by specifying the appropriate side-by-side token.
Ok, enough theory – how can I make use of the side-by-side functionality?
To enable the side-by-side functionality you need to set the EnableSideBySide property of the WebService to true (e.g.) by using Powershell:
To ensure that a current side-by-side directory exists you can call the Copy-SPSideBySideFiles powershell command which will create the side-by-side directory for your current patch level:
If you would like to get a logfile about the performed copy operation you can specify the optional -LogFile parameter:
To ensure that the side-by-side files will be used in future http requests to the server you finally have to configure the SideBySideToken. The value of this token has to match the name of the side-to-side directory that should be used:
After patching to a new CU (e.g. with build 16.0.4471.1000) and running PSConfig on all machines you only have to update the side-by-side token and all generated URLs will automatically be redirected to the new side-by-side directory: