Implementing China specific instance of Sitecore (Part 2 of 3)
In Part 1 we covered the importance of understanding the nuances of China’s internet environment, and the requirements for ensuring a proper set up of your website on Sitecore. In Part 2, we will talk discuss your server infrastructure plan.
Part 2. Server infrastructure plan
Planning a proper server infrastructure plan for Sitecore requires a good understanding of your website’s eventual usage so as to ensure you can identify the right Sitecore product to adequately cater for the server load. In this article, we will focus on Sitecore XP 9.3 as an example.
In most cases, we start the project on a smaller scale and upgrade it slowly according to the growth in the website traffic. But due to the size of China’s internet population which stands at around 1 billion users (Source: http://www.cnnic.net.cn/), it is better to start planning on the largest scale possible.
To this end, server scaling is one of the most important tasks in your server infrastructure plan. In Sitecore we should start by considering:
- Server scaling options
- xDB scalability options
Server scaling options
You can vertically and horizontally scale the Sitecore Experience Platform to meet your requirements.
- Vertical scaling
To scale vertically (or scale up) means to add resources to a single node in a system, typically involving the addition of CPUs or memory to a single computer.
An advantage of vertical scaling is that you can upgrade specific components (depending on role) without upgrading the entire environment. For example, a content delivery server might need faster CPUs, while the collection database needs more disk space for storage, and plenty of RAM to maintain system performance. Therefore, if you scale vertically, you can dedicate specific servers to specific roles, and upgrade hardware accordingly.
Vertical scaling is suitable for the needs of most organizations, particularly small to medium-sized organizations where the data requirements are not too high.
- Horizontal scaling
To scale horizontally (or scale out) means to add more nodes to a system, such as adding a new computer to a distributed software application.
In Sitecore, horizontal scaling means you deploy multiple servers for specific components, such as content delivery, processing, content management, or collection, to increase the capacity of your solution.
For example, as demand increases, you can deploy multiple clusters of content delivery servers to deliver web content to contacts as quickly and efficiently as possible. On multiple content delivery clusters, you can use load-balancing software to optimize performance across clusters and to maintain high availability. You could also implement multiple content delivery clusters to provide multiple geographically-distributed collection points.
Implementing a fully scalable xDB architecture brings many benefits, such as improved performance and high availability. This approach is particularly suitable for the largest, enterprise organizations that need to handle a lot of website traffic and want reliability and high availability. These types of organizations often have large data storage requirements so may need to consider horizontal scaling as part of their future strategy for expansion.
For example, to scale horizontally you can deploy:
- Multiple content delivery servers.
- Multiple clusters of content delivery servers, either to increase capacity beyond a single cluster, or to create geographically-distributed content delivery and traffic collection points.
- A dedicated session state server for handling session data. This is a requirement if you have a cluster with more than one node.
- A collection database (MongoDB) for storing contact and interaction data – this can be a single MongoDB replica set (which requires a minimum of three nodes, for example, two data nodes and an arbiter) or it can be a sharded cluster with multiple replica sets.
- One or more processing servers. The number of processing servers you have depends on how much website traffic you need to handle.
- Multiple content management servers – depending on your content editing needs.
- A reporting server that runs the Reporting Service hosted on a dedicated Sitecore server instance.
- A reporting database hosted on a dedicated Microsoft SQL Server instance (this could also be a failover cluster).
You can vertically scale the Sitecore Experience Platform by:
- Adding more power (RAM, CPU) to your existing machine or web application in your topology.
- Scaling horizontally:
You can horizontally scale the Sitecore Experience Platform by dedicating multiple web applications to the same role within a topology. For example, you can deploy two instances of the Content Delivery role behind a load balancer:
Scalability options – xDB
In the Sitecore Experience Database, to achieve better performance and to cope with greater demand and large amounts of website traffic, you have several scalability options.
You can configure Sitecore xDB environments to:
- Run as a standalone environment
- Scale vertically
- Scale horizontally
- Standalone environment
A standalone or minimal installation is an all-in-one configuration where you install all Sitecore xDB components on the same computer.
For example, a minimal installation could include the following components:
- A Sitecore application server instance with all the components necessary for content management, content delivery, processing, reporting, and session tracking
- A collection database (MongoDB) – to record the entire customer experience
- A reporting database (SQL Server) – to provide reporting data for the Experience Profile and Experience Analytics reports
- Content databases (Master, Core, and Web)
You should not use a standalone installation as a production environment as this setup is most suitable for development or testing and is the least scalable approach.
Sitecore xDB - fully scalable architecture (horizontal scaling)
This diagram shows how you could start to implement horizontal scaling (scaling out) by configuring multiple content delivery clusters. It shows how you can add more nodes to your xDB architecture as demand on your website increases while at the same time maintaining high performance.
Benefits of a fully scalable xDB architecture
The xDB is particularly suitable for medium and large-scale enterprises. The main benefits of deploying a fully scalable Sitecore Experience Database architecture, include:
- High flexibility – from a single server to highly scalable solutions with many different configuration options. As demand on your website increases, you can expand your solution by scaling up and scaling out.
- High performance – for example, you can optimize the performance of multiple content delivery servers using load balancing software and have the possibility to scale almost any component vertically and horizontally.
- Full support for content delivery web clusters - you can configure content delivery web clusters and session state right out of the box, without the need for any extra custom components. You can distribute the load on your servers using load-balancing software with failover, and can upgrade your solution while it is still live.
- Highly scalable data storage – a MongoDB database at the core of data collection provides storage that incrementally scales to terabytes or even petabytes of data. You can increase capacity by horizontal scaling, which in MongoDB you can implement by sharding. You can add more servers over time when you need to expand your solution. It is possible to implement both replication and sharding across multiple geographical locations. All customer interaction data (online visits) is stored in a MongoDB NoSQL database (nothing is deleted) and is made available to Sitecore reporting applications. Also, you can scale out the processing server role to perform all activities necessary for processing and aggregation.
- High availability – all application components can be deployed as multiple servers, and database components support high availability and data persistence. In MongoDB, replication enables higher availability (HA) and better fault tolerance.
- Cloud-ready – you can deploy application components as preconfigured servers allowing for quick scaling up and down on demand, depending on traffic patterns.
In the third and final edition of Implementing a China Specific Instance of Sitecore, we will discuss risk mitigation activities.
Note: This article is written by Jimmy Yeung, Technical Director at Bray Leino Splash China.