New with Sitecore 9 is the ability to specify server roles.  There is nothing new here when it comes to the roles available, however. It’s still your typical Authoring, Delivery, Processing and Reporting roles.  There is another new “role” called “Standalone” which is “all roles” such as something you’d see for a Dev Environment.

Sitecore 9 now allows you to specify (and configure!) your servers based off role.  Previously this was a whole lot of config file updating and even automated tools that would provide feedback on config files enabled/disabled due to the role.

In Sitecore 9, if you open up the web.config, you’ll see the following chunk of configuration:

This tells Sitecore that your server is configured as a Standalone server. It has all functions Sitecore needs for a single-server environment.

It’s possible to tweak this key though, and specify a list of roles, separated by a comma.   Take the below example as a standard small-scale environment for Authoring, Processing and Reporting:

That’s all neat, but what does it do?  The big answer is…role-specific configs!

If you open up the /App_Config/Sitecore/CMS.Core/Sitecore.WebDAV.config” (which is something you disable on delivery servers as part of common practice) you see this at the top:

You can see that Sitecore is going to only patch this config in when the role is CM or Standalone.

Additionally, you can do this at the element level. For example, the master DB belongs only on the CM server.  Here’s how Sitecore has this configured out of the box:

Pretty slick!  This is a huge amount of flexibility and will make environment management SO much easier.

PS: Sitecore 9 doesn’t ship with a way to check the current server roles via code, but the method below should allow you to do just that. It leverages some of the lines from the current ConfigReader.


This entry is part of my series "Nine on Nine" which is a "quick peek" at nine new things in Sitecore 9.  I've been messing a bit with the Technical Preview, and there's lots of exciting stuff to share.  Some of these might change a little in regards to General Availability, but hopefully not too much... These posts won't cover everything in depth, as I hope to do more detailed analysis in the coming months. Other Entries in Nine on Nine
  1. Connecting to Sitecore Rocks
  2. Controlling Configuration Load Order
  3. Dynamic Placeholders
  4. Server Role Configuration
  5. Sitecore Forms
  6. Switching Search Providers
  7. SIF and HTTPS Everywhere
  8. Using Set in Configuration Files
  9. Infrastructure Software changes
There's more than just nine new things.  XConnect is a huge change to how data is collected.  Cloud-first support is another big thing.  Look to the official RSS Community Blog Feed, check out the Sitecore Slack Channel, hit up the Sitecore Stack Exchange or leave the Official Forums for more information.  It's a great time to be a Sitecore Developer!

Facebooktwittergoogle_plusredditlinkedinmail