Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Storefront server clustering overview

Storefront server clustering overview

The sample storefront server cluster consists of the following:

  • Four servers, each with a storefront instance
  • A load balancer, that is an Apache HTTP server set up on one of the storefront servers

The following diagram describes the server architecture:


Set up a proxy with AJP on each server to prepare the cluster for load balancing:

  1. Enable the two AJP connectors on the application server in <TOMCAT_HOME>\conf\server.xml:
    <Connector enableLookups="false" port="9009" protocol="AJP/1.3"/commerce-legacy/>
    <Connector enableLookups="false" port="9010" protocol="AJP/1.3" scheme="https" secure="true"/commerce-legacy/>

    Port 9010 secure parameters tell Spring Security the port is an AJP secure connection. Without this configuration, Spring Security tries to redirect the request to a secure port that does not exist, causing errors.

  2. Configure Spring Security to receive non-secure and secure connections over ports 80 and 443 (the typical HTTP and HTTPS ports). In the storefront web application's WEB-INF\classes\ file, enter the following:
    ep.port.http=80 # used to be 8080
    ep.port.https=443 # used to be 8443 
    After restarting the server, the following variables are changed in WEB-INF\conf\spring\security\security.xml:
            <port-mapping http="${ep.port.http}" https="${ep.port.https}"/commerce-legacy/>