Scaling Out Coveo for Sitecore with CES Mirrors
Scaling Out Coveo for Sitecore with CES Mirrors
On-Premises only
As your number of search queries goes up, you may want to use mirrors to replicate the content of your Coveo Index and reduce the load on your Coveo Enterprise Search server. A typical use case would be to use the CES Master server specifically for content management while using one or more CES mirror server to answer the front-end content delivery servers.
Step 1: Set Up Your Sitecore and Coveo Infrastructure
To set the mirrors correctly, you need to have set up the following:
- The Content Management server.
-
See the Sitecore documentation on scaling if you want to have more than one CD or CM.
- The CES Master server (see Setting Up Coveo for Sitecore in a Remote Server Configuration).
Step 2: Set Up the CES Mirror(s)
Now that you set up the basic infrastructure, you can set up the CES mirrors.
- Run the same
CES 7.0.XXXX
installer on your mirror server as you used for the master (see Installing CES Mirror Components). - Configure the Master Server to synchronize with the mirror(s) (see Adding a Mirror Server).
Step 3: Install the Search API on the Mirror(s)
-
If you have not already done it as part of the CES set up, run the Coveo Search API installation package on each CES server (see Installing the Coveo Search API).
Don’t forget to select the This installation is part of a Sitecore Integration option.
Note the random Application Secret Token as you’ll need to use the same token on each mirror.
- Copy the CES Master Certificates on the mirror(s):
- On your CES Master server, go to
<MASTER_INDEX_DRIVE>:\CES7\Config\Certificates
, and copy both thecert-iis.p12
and thecert-ca.pem
certificates. - For each mirror, go to
<MIRROR_INDEX_DRIVE>:\CES7\Config\Certificates
, and both certificates in the folder.
- On your CES Master server, go to
- On each CES server, go to
\Program Files\Coveo Search API 8
, and openconfig.yml
in a text editor:-
In the
server
node:-
Set the
serverCertificatePath
to point to thecert-ca-.pem
location on your mirror server. -
Set the
clientCertificatePath
to point to thecert-iss.p12
location on your mirror server.server: uri: https://localhost:52810 serverCertificatePath: <MIRROR_INDEX_DRIVE>:\CES7\Config\cert-ca.pem clientCertificatePath: <MIRROR_INDEX_DRIVE>:\CES7\Config\cert-iis.p12
-
-
In the
application
node:- Change the
secret
for the one you generated when you installed the Search API on the Master. -
Make sure
allowImpersonate
istrue
.applications: - name: Sample Application secret: [Random Application Secret Token] allowImpersonate: True
- Change the
-
- On each CES server, open the Windows Services manager and restart the Search API service.
Set Up A Network Load Balancer (Optional)
If you have more than one mirror, you need to add a network load balancer between your Content Delivery server(s) and the mirrors (see Configuring Coveo Servers in a Network Load-Balancing Cluster). If you only have one mirror to answer the Content Delivery server(s), skip this step.
For load balancing Sitecore servers, see section Horizontal Scaling in Scalability Options.
Step 4: Modify the Search API Endpoint in Coveo.SearchProvider.Rest.Custom.config
You have to make sure the following ports are open between your front-end servers and the CES servers:
-
52810
: Coveo Search Web Service and Coveo Admin Web Service. -
8080
: to allow the Sitecore REST endpoint to communicate with the Search API service.
Now that you have set up the whole infrastructure, you need to change the REST Search API endpoints in the configuration file so the search components on your website can communicate with the required resources:
-
On the CD server, in the
App_Config\Include\Coveo
folder, open theCoveo.SearchProvider.Rest.Custom.config
file in a text editor:-
In the
coveo
node:-
Locate the
<searchApiUri>
parameter and replace the line with the following:To set up a direct connection with the CES Mirror
<searchApiUri>http://<CES_MIRROR_HOST_NAME>:8080</searchApiUri>
OR
To go through a Network Load Balancer
<searchApiUri>http://<LOAD_BALANCER_ADDRESS>:8080</searchApiUri>
-
While you’re in the
coveo
node, check if the<applicationSecret>
is correctly set.
-
-
Save and close the
Coveo.SearchProvider.Rest.Custom.config
file.
-
-
Repeat the procedure for each CD your infrastructure includes.