Content Management and Content Delivery instances in Sitecore
This post explains different databases available in Sitecore and the use of CM (Content Management), CD (Content Delivery) instances in Sitecore.
Different databases in Sitecore
In simple terms Sitecore is also a complex web application installed on IIS. This you can understand when you install and check the Sitecore website on IIS. As any web application, Sitecore does have huge website data and configurations. This data is saved on to the SQL Server database. To keep things better and clear, Sitecore maintains this data in separate databases. Below are the different databases in Sitecore and the type of data/configurations being saved on to them.
Core database: Core database is used to save all the CMS configuration related data. This includes the default CMS website –all the buttons, links, labels, tiles in the desktop, Content editor and page editor modes. To change/add/remove any of these, Core database is the one we should be connecting to.
Master database: Any CMS (Content Management System) involves maintaining multiple versions of each data item. Even in Sitecore, different versions of data need to be maintained as Sitecore does versioning of data. These multiple versions of data are maintained in Master database.
Web database: Though there are multiple versions of each data item, at any time only version would be used in the live website. This live version or published version of data will be stored in Web database. So Web database will always be a subset of Master database
Pushing the required version of the data from Master to Web database is called publishing. Here is the tutorial on how to publish Sitecore items - How to move sitecore items using publish and transfer options
There is another option in Sitecore like ‘Publish’ called Transfer. Here is the link explaining the purpose of these two options. - Publish vs Transfer options in Sitecore
Content Management (CM) instance
A CM instance will be connected to Core and Master databases only. This instance is mainly for the Content authors, to login and do any changes in the Content Editor or Experience Editor. This server is not hit when the live website is visited by the end users.
Content Delivery (CD) instance
A CD instance will be connected to Core and Web database. This instance is for the live website users but not for the Sitecore content authoring. From the CD instances we would not be allowed to open Sitecore login page or the content editor. This is the server which is hit when the live website is visited by the end user.
To scale up the application more, we can have multiple CD and CM instances as shown in the below architecture.
Note:
For detailed advantages and disadvantages of maintaining separate CM and CD go through this link - Separating Content Management from Content Delivery with the Sitecore ASP.NET CMS
Hope you like this post !! Please do share your thoughts in the comments section.