Learn about several ways you can configure tracking connections to your services on the OVHcloud Load Balancer.
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, and it maintains a persistent connection to the server. This guide is merely an introduction to how you can configure these options.
Requirements
- an OVHcloud Load Balancer
- access to the OVHcloud Control Panel or OVHcloud API
Instructions
The different types of connection tracking
There are two main connection tracking methods that 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. |
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
Modify a server cluster's connection tracking method
From the OVHcloud Control Panel:
- Select
Bare Metal Cloud
from the top navigation bar. - Expand the
Network
section in the left-hand menu. - Click
Load Balancer
and choose your Load Balancer service. - Select the
Server cluster
tab. - Click the more options
...
button to the right of the server cluster you wish to modify and chooseEdit
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
.
Finalize your changes by clicking Apply configuration
in the yellow banner.
On the next screen, select ☑
your Datacenter and click Apply configuration
.
View details on a server cluster
With this call instruction, you can view details on a server cluster if you know its ID. In this example, we will work on an HTTP cluster.
GET /ipLoadbalancing/{serviceName}/http/farm/{farmId}
Setting | Meaning |
---|---|
serviceName* | Your Load Balancer service ID |
farmId* | The server cluster's ID number |
Response (BackendHttp) | Meaning |
---|---|
farmId | The server luster's ID number |
balance | Balance type 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 probe currently configured on the cluster |
displayName | Name given to this cluster |
stickiness | Connection tracking method currently set for the cluster |
Modify a server cluster's connection tracking method
With this call instruction, you can edit the settings of a server cluster if you know its ID. In this example, we will work on an HTTP cluster. To modify the tracking method, the BackendHttp.stickiness field must be updated with an available connection tracking method:
PUT /ipLoadbalancing/{serviceName}/http/farm/{farmId}
Setting | Meaning |
---|---|
serviceName* | Your Load Balancer service ID |
farmId* | The server cluster's ID number |
BackendHttp.stickiness | Connection tracking method chosen for the cluster |
Apply the modifications
POST /ipLoadbalancing/{serviceName}/refresh
Setting | Meaning |
---|---|
serviceName* | Your Load Balancer service ID |
zone | Name of the zone in which to deploy the configuration, e.g. "all" or "rbx" |
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.