Configure the exponential backoff retry strategy

Version: 10.4

The xConnect retryer uses the exponential backoff retry strategy by default. You can change the exponential backoff retry configuration by updating the configuration file.

To change the configuration on a Sitecore CMS role:

  1. Open the C:\path\to\sitecore\App_Config\Sitecore\XConnect.Client.Configuration\Sitecore.XConnect.Client.config file.

    Note

    In a non-Sitecore context, open the sc.xConnect.Client.xml configuration file.

  2. In the configuration file, locate the <ExponentialRetry> section, and set the following settings to the value of your choice:

    Setting

    Description

    MaxAttempts

    Specifies the maximum number of retry attempts for transient faults. When this amount is reached, the retryer defines the target service as unavailable.

    MinBackoff

    The minimum time period between retry attempts.

    MaxBackoff

    The maximum time period between retry attempts.

    DeltaBackoff

    The number of seconds between retries (the length of back-off time).

    The following shows an example of the default retryers configuration that the xConnect Collection and xConnect Search services uses for the Content Management role:

    RequestResponse
    <!-- Collection and Search XConnect Client configuration for ContentManagement role -->
      <clientconfig type="Sitecore.XConnect.Client.Configuration.SitecoreXConnectClientConfiguration,Sitecore.XConnect.Client.Configuration"
                   singleInstance="true"
                   role:require="ContentManagement">
            <param desc="clientModel" ref="xconnect/runtime" />
            <param desc="collectionConnectionStringName">xconnect.collection</param>
            <param desc="searchConnectionStringName">xconnect.search</param>
            <param desc="configurationConnectionStringName">xconnect.collection</param>
            <param desc="CircuitBreakerFactory" ref="xconnect/CircuitBreakersConfiguration"/>
            <param desc="retryerRegistry" type="Sitecore.Framework.TransientFaultHandling.IRetryerRegistry,Sitecore.Framework.TransientFaultHandling.Abstractions" resolve="true"/>
            <param desc="retryerName">Sitecore.XConnect.Client.Retryer</param>
     </clientconfig>
    
    <TransientFaultHandling>
      <Retryers>
            <Sitecore.XConnect.Client.Retryer>
              <Type>Sitecore.Xdb.Common.HttpTransientFaultHandling.DefaultHttpPolicyRetryerFactory, Sitecore.Xdb.Common.HttpTransientFaultHandling</Type>
              <Options>
                <ExponentialRetry>
                  <MaxAttempts>10</MaxAttempts>
                  <MinBackoff>00:00:01</MinBackoff>
                  <MaxBackoff>00:00:30</MaxBackoff>
                  <DeltaBackoff>00:00:10</DeltaBackoff>
                </ExponentialRetry
                <CustomCodes>
                </CustomCodes>
              </Options>      
            </Sitecore.XConnect.Client.Retryer>
       </Retryers> 
    </TransientFaultHandling>
    
Note

In the example, the <CustomCodes> section is empty. If the retryer configuration does not specify error respond codes, the retryer uses the default codes.

Do you have some feedback for us?

If you have suggestions for improving this article,