Learn about different methods to configure connection tracking for the OVHcloud Load Balancer.
The OVHcloud Load Balancer service offers several methods for tracking connections (also known as session persistence or stickiness) to your services.
Each session on the OVHcloud Load Balancer service is maintained by a persistent connection system. The system is configured on the application layer of the OVHcloud Load Balancer service to ensure persistent connections to the server.
Requirements
- An OVHcloud Load Balancer
- Access to the OVHcloud Control Panel or OVHcloud API
Instructions
The different types of connection tracking
Two main connection tracking methods can be configured on your services:
| Tracking connections | Details |
|---|---|
| Cookie | Configures a session cookie, which will be used to distribute traffic from a single HTTP session to the same server in the cluster. |
| SourceIp | A hash algorithm will be applied to the source IP address of the request received by the OVHcloud Load Balancer. This ensures the same client IP is consistently routed to the same server. |
The following elements will affect traffic redirection:
- if the configured weight changes
- if a server in the cluster is re-enabled
- if a server in the cluster is no longer responding
NOTE: Once you have refreshed your configuration, the connections will be rebalanced, and your HTTP sessions will be lost as a result.
View details of a server cluster
From the OVHcloud Control Panel:
- Select
Bare Metal Cloudfrom the top navigation bar. - Expand the
Networksection in the left-hand menu. - Click
Load Balancerand choose your Load Balancer service. - Select the
Server clustertab.
This API call allows you to view details on a server cluster if you know its ID. In this example, we will work on an HTTP cluster.
| Parameter | Meaning |
|---|---|
| serviceName* | The ID of your Load Balancer service |
| farmId* | The ID number of the server cluster |
| Response (BackendHttp) | Meaning |
|---|---|
| farmId | The ID number of the server cluster |
| balance | Load balancing algorithm currently enabled for the cluster |
| zone | Name of the zone in which the cluster is configured |
| port | Port used to contact the servers configured on the cluster |
| probe | Type of health probe currently configured on the cluster |
| displayName | User-friendly name given to this cluster |
| stickiness | Connection tracking method currently set for the cluster |
Modify a server cluster's connection tracking method
Click the more options ... button to the right of the server cluster you wish to modify and choose Edit from the menu.
On the next screen, you can modify session tracking in the Advanced settings area. Once you have finished your configuration, click Update.
This API call allows you to edit the settings of a server farm if you know its ID. In this example, we will work on an HTTP farm. To modify the tracking method, the BackendHttp.stickiness field must be updated with an available connection tracking method:
| Setting | Meaning |
|---|---|
| serviceName* | The ID of your Load Balancer service |
| farmId* | The ID number of the server cluster |
| BackendHttp.stickiness | Connection tracking method chosen for the cluster |
Apply the modifications
Finalize your changes by clicking Apply configuration in the yellow banner.
On the next screen, select ☑ your Datacenter and click Apply configuration.
This API call is required to deploy the configuration changes to the Load Balancer service.
| Setting | Meaning |
|---|---|
| serviceName* | The ID of your Load Balancer service |
| zone | Name of the zone in which to deploy the configuration, e.g. "all" or "vin" |
Go further
For more information and tutorials, please see our other OVHcloud Load Balancer guides or explore the guides for other OVHcloud products and services.