---
title: "Tracking connections on the OVHcloud Load Balancer"
description: "The OVHcloud Load Balancer service offers several methods for tracking connections (also known as session persistence or stickiness) to your services."
url: https://docs.us.ovhcloud.com/en/network/load-balancer/create-stickiness
lang: en
---
> For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt.

# Tracking connections on the OVHcloud Load Balancer

The [OVHcloud Load Balancer](https://us.ovhcloud.com/network/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](https://us.ovhcloud.com/network/load-balancer/)
- Access to the [OVHcloud Control Panel](https://manager.us.ovhcloud.com/) or [OVHcloud API](https://api.us.ovhcloud.com/)

 

## 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

**Warning:**

**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

#### Via the OVHcloud Control Panel

From the [OVHcloud Control Panel](https://manager.us.ovhcloud.com/):
1. Select `Bare Metal Cloud` from the top navigation bar.
2. Expand the `Network` section in the left-hand menu.
3. Click `Load Balancer` and choose your Load Balancer service.
4. Select the `Server cluster` tab.

#### Via the OVHcloud API

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.

[GET /ipLoadbalancing/{serviceName}/http/farm/{farmId}](https://api.us.ovhcloud.com/console/?section=/ipLoadbalancing&branch=v1#get-/ipLoadbalancing/-serviceName-/http/farm/-farmId-)

| 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

#### Via the OVHcloud Control Panel

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`.

#### Via the OVHcloud API

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:

[PUT /ipLoadbalancing/{serviceName}/http/farm/{farmId}](https://api.us.ovhcloud.com/console/?section=/ipLoadbalancing&branch=v1#put-/ipLoadbalancing/-serviceName-/http/farm/-farmId-)

| 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

#### Via the OVHcloud Control Panel

Finalize your changes by clicking `Apply configuration` in the yellow banner.
On the next screen, select `☑` your **Datacenter** and click `Apply configuration`.

#### Via the OVHcloud API

This API call is required to deploy the configuration changes to the Load Balancer service.

[POST /ipLoadbalancing/{serviceName}/refresh](https://api.us.ovhcloud.com/console/?section=/ipLoadbalancing&branch=v1#post-/ipLoadbalancing/-serviceName-/refresh)

| 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

Browse all the [Load Balancer guides](https://docs.us.ovhcloud.com/en/network/load-balancer/landing-page-load-balancer.md).

Browse the rest of the [OVHcloud US documentation](https://docs.us.ovhcloud.com/en/index.md) for guides on our other products and services.

Learn more about [Load Balancer](https://us.ovhcloud.com/network/load-balancer/) on the OVHcloud US website.
