THIS IS ARCHIVED DOCUMENTATION

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:

  1. The Content Management server.
  2. The Content Delivery servers.

    See the Sitecore documentation on scaling if you want to have more than one CD or CM.

  3. 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.

  1. Run the same CES 7.0.XXXX installer on your mirror server as you used for the master (see Installing CES Mirror Components).
  2. 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)

  1. 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.

  2. Copy the CES Master Certificates on the mirror(s):
    1. On your CES Master server, go to <MASTER_INDEX_DRIVE>:\CES7\Config\Certificates, and copy both the cert-iis.p12 and the cert-ca.pem certificates.
    2. For each mirror, go to <MIRROR_INDEX_DRIVE>:\CES7\Config\Certificates, and both certificates in the folder.
  3. On each CES server, go to \Program Files\Coveo Search API 8, and open config.yml in a text editor:
    1. In the server node:

      1. Set the serverCertificatePath to point to the cert-ca-.pem location on your mirror server.

      2. Set the clientCertificatePath to point to the cert-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
        
    2. In the application node:

      1. Change the secret for the one you generated when you installed the Search API on the Master.
      2. Make sure allowImpersonate is true.

         applications:
           - name: Sample Application
             secret: [Random Application Secret Token]
             allowImpersonate: True
        
  4. 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:

  1. On the CD server, in the App_Config\Include\Coveo folder, open the Coveo.SearchProvider.Rest.Custom.config file in a text editor:

    1. In the coveo node:

      1. 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>
        
      2. While you’re in the coveo node, check if the <applicationSecret> is correctly set.

    2. Save and close the Coveo.SearchProvider.Rest.Custom.config file.

  2. Repeat the procedure for each CD your infrastructure includes.