Configuring Load Balancing for a Service

Configuring Load Balancing for a Service

A load balancing policy allows the service to distribute the traffic to an appropriate server based on the configured load balancing algorithm. To configure the load balancing policy for a service, navigate to the BASIC > Services page. Identify the service in the Services list that you want to configure to load balance, and click Edit next to it. Specify values for the following fields in the Load Balance section:

If a content rule is present under the service, the load balancing settings under the content rule will take precedence over the service level load balancing settings.

Persisting Traffic across HTTP and HTTPS Services

You can maintain persistence across HTTP and HTTPS services on the Barracuda Web Application Firewall using the Cookie Insert persistence method.

If you have two services for the same web application, where one listens on port 80 (HTTP) and the other on port 443 (HTTPS), you can persist the traffic to the same server when the client sends a request to a HTTP service, and the subsequent request sent to a HTTPS service in the web application. This can be achieved by performing the configurations below:

  1. Create two (2) services, a HTTP and a HTTPS service in the BASIC > Services page. Ensure both the services are configured with the same sub set of server(s).

  2. Edit both the services and do the following:

    1. Set Persistence Method to Cookie Insert.

    2. Configure Persistence Cookie Name and Persistence Cookie Path. Ensure that both the services have same cookie name and cookie path.

  3. Set Persistence Across Services to Yes in the ADVANCED > System Configuration page, Advanced section.

Use Case

Consider www.example.com is an e-commerce website in which product viewing and shopping are in the HTTP space, and purchase/checkout is in the HTTPS space. Initially when a client access www.example.com, the request is landed in the product viewing page http://www.example.com/us/en_US/products . After selecting the products, the client navigates to the shopping cart to check the list, http://www.example.com/us/en_US/cart . Here, the product viewing and shopping cart are in the HTTP space. The client moves to the purchase/checkout page https://www.example.com/us/en_US/login/checkout to buy the selected products. The checkout page is in the HTTPS space.

To ensure persisting traffic between HTTP and HTTPS services, you must configure persistence on the Barracuda Web Application Firewall for the web application.

Here, http://example.com is hosted on service 1 (port 80), and https://example.com is hosted on service 2 (port 443).

In the above scenario, when the client selects the cart, the request is served by service 1/server 1. When the client accesses the checkout page, the request should be served by service 2/server 1. To achieve this, persistence should be configured between the two services on the Barracuda Web Application Firewall.

The cookie name and cookie path for both the services (service 1 and service 2) are configured as:

  • Cookie Name: persistence

  • Cookie Path: example.com

Persistence across HTTP and HTTPS services is possible only when Persistence Across Services is enabled on the Barracuda Web Application Firewall. Therefore, ensure that you set Persistence Across Services to Yes in the ADVANCED > System Configuration page, Advanced section.

If one of the server of service 1 is not part of service 2, then the request can be served by any server depending on the load balancing algorithm.


We value your feedback.
If you have questions, suggestions, or feedback on our documentation, contact the Campus Product Documentation team.
For general product inquiries or technical support, please contact the global Barracuda Support team.