Load Balancing Sitecore xConnect Guide
Horizontal scaling of xConnect, behind Load Balancers, is an approved architecture in Sitecore 9. Beyond the details stated in the “Multiple XP Service Instances” section of Sitecore’s documentation (https://doc.sitecore.com/developers/90/platform-administration-and-architecture/en/scale-horizontally.html) there are few key steps to implement this capability.
Horizontal xConnect Scaling Steps
As xConnect roles are essentially RESTful endpoints, they are prime targets for load balancing. The following steps are aimed at helping you load balance xConnect:
Step 1) Stand up your xConnect Servers behind a Load Balancer. Per Sitecore:
You do not need to use a persistent load-balancing method – there is no session state to maintain. Use the root page (https://xconnect_example/) to check server availability (or “heartbeat”).
https://doc.sitecore.com/developers/90/platform-administration-and-architecture/en/scale-horizontally.html
Step 2) Install the 5 xConnect roles on each Server, with the exception of running the Shard Map Manager again after you have already installed it during your xConnectCollection installation, as you don’t need to recreate the Shard Map databases. In a SIF scenario, you would need to employ a skip in the json file for xConnectCollection for the Shard Map Manager.
If you decide to leave the Shard Map Manager component of SIF in place, it will delete the databases if they are detected. You can always manually install the Shard Map Manager once you have all your xConnect servers established. Use this guide for the Shard Map Manager manual creation: https://thebitsthatbyte.com/what-is-and-how-to-use-the-sitecore-9-shard-map-manager-tool/
Step 3) Whether using self-signed certificates or a Public CA, you need to ensure that the certificates for xConnect are the same across all xConnect roles. That is because as the CMS, CDS, Reporting, or Processing roles connect to xConnect they use a thumbprint of the certificate for the xConnect endpoints.
If you have the wrong thumbprint on the second (or third, fourth, etc.) server running xConnect you will receive intermittent failures as the connecting servers through the load balancer can’t create a handshake to allow communication
IMPORTANT: This includes the connectionStrings of the role, the AppSettings of the role, and the continuous jobs
Step 4) Disable the Search Indexer Windows Service on all but one of your xConnect Servers. If the xConnect Server running the the Search Indexer Windows Service fails, you can simply turn on the Search Indexer on another xConnect Server in your node set behind the load balancer.
This is because…
“As soon as the second index gets started it will read a special document from the index that states how much has been already indexed (so live indexing is continued from that point forward).”
Sitecore Support