Deprecated feature

Disabling Hystrix on the Store server

The Hystrix framework is used as a proxy for back-end resources such as the Transaction server and Search server by default. This can be disabled, but does have performance implications that must be considered.

To learn more about Hystrix, see Hystrix on the Store server.
  • In earlier releases HCL Commerce, prior to 9.1.14.0, the Commerce Remote Store (CRS), otherwise known as the Store server, implements Hystrix.

    In these releases, it is recommended to disable Hystrix as it is no longer being maintained.

To disable Hystrix without the need for any reconfiguration of your Store server, upgrade to a version of HCL Commerce 9.1.14.0 or greater.

If you want to disable Hystrix on a version of HCL Commerce 9.1.0.0 to 9.1.13.0, complete the following procedure.

Procedure

  1. Disable Hystrix on the Store server.
    1. Open the Store server configuration file (wc-store.xml) for editing.
      This file is located within the crs.ear/xml/config/ directory.
    2. Set the enableHystrix parameter to false.
      The following can be added to your Dockerfile to implement this change on image deployment.
      RUN sed -i 's/enableHystrix=\"true\"/enableHystrix=\"false\"/g' /opt/WebSphere/Liberty/usr/servers/default/apps/crs.ear/xml/config/wc-store.xml
  2. Reconfigure the Default Executor thread pool.

    The WebSphere Application Server V8.5.5 Liberty server that the CRS runs on implements a single thread pool named "Default Executor" to handle incoming requests. This pool is self-tuned and adapts to the current workload by dynamically adding or removing threads.

    The implication of disabling the Hystrix request pools is that in case of a slow down in the back-end servers WebSphere Application Server V8.5.5 Liberty might allow the Default Executor pool to expand, which could result in a large number of threads executing and waiting for a response from the back-end services. To avoid this condition, it is possible to configure the Default Executor pool with an upper limit by adding a custom configuration file.

    To set a limit for the Default Executor pool, customize the CRS image by adding a new WebSphere Application Server V8.5.5 Liberty configuration file.

    1. Create a file named threadpool.xml.
      Within it, add the following configuration:
      <server>
          <executor name="Default Executor" id="default" coreThreads="50" maxThreads="50" />
      </server>
    2. Add the threadpool.xml configuration file to the CRS image by adding this instruction to Dockerfile.
      COPY threadpool.xml /opt/WebSphere/Liberty/usr/servers/default/configDropins/overrides/threadpool.xml

Results

Hystrix is no longer used to proxy requests to the back-end services. The Default Executor pool is constrained to avoid the possibility of unbounded threads waiting and causing performance implications.