---
title: "Load Balancing Protocols and Methods"
sidebar_label: "Load Balancing Protocols and Methods"
sidebar_position: 1
description: "Which protocols, session persistence methods, and load balancing methods are supported by FortiGate"
---

import Formbricks from '@theme/MDXComponents/Formbricks'
import {CustomTable} from '@selectel/docux/components'

# Load Balancing Protocols and Methods

Load balancing allows you to distribute incoming traffic between several servers to increase fault tolerance and request processing speed. With FortiGate, you can configure load balancing between servers in your Selectel infrastructure.

When configuring load balancing, you select:

* [incoming traffic protocol](#protocols);
* [load balancing method](#load-balancing-methods).

Depending on the protocol you choose, you can enable [session persistence](#session-persistence).

## Protocols \{#protocols}

Protocols at different levels of the OSI model are available for load balancing:

* network and transport layers (L3–L4): IP, TCP, and UDP;
* application layer (L7): HTTP, HTTPS, IMAPS, POP3S, SMTPS, and SSL.

## Session Persistence \{#session-persistence}

You can enable session persistence during load balancing. All requests from a single user will be handled by the same server. This allows for maintaining a user session, for example, to prevent authentication on a website from being interrupted. Session persistence is not supported for all [protocols](#protocols). The method of session persistence depends on the protocol.

<CustomTable>
  <table data-sticky>
    <thead>
      <tr>
        <th />

        <th>Session persistence method</th><th>Description</th>
      </tr>
    </thead>

    <tbody>
      <tr>
        <th>HTTP, HTTPS</th><td>HTTP cookie</td><td>Requests with the same cookie are sent to the same server behind the firewall</td>
      </tr>

      <tr>
        <th>IMAPS, POP3S, SMTPS, SSL, HTTPS</th><td>SSL Session ID</td><td>Requests with the same SSL Session ID are sent to the same server behind the firewall</td>
      </tr>

      <tr>
        <th>TCP, UDP, IP</th><td>Without session persistence</td><td>Requests are sent to a server behind the firewall according to the [load balancing method](#load-balancing-methods)</td>
      </tr>
    </tbody>
  </table>
</CustomTable>

## Load Balancing Methods \{#load-balancing-methods}

The balancing method determines how requests are distributed between servers behind the firewall.

<CustomTable>
  <table>
    <tbody>
      <tr>
        <th>Static</th><td>Requests are evenly distributed to all servers without considering server load</td>
      </tr>

      <tr>
        <th>Round Robin</th><td>Requests are sent to each server in turn</td>
      </tr>

      <tr>
        <th>Weighted</th><td>Servers with a higher weight receive a proportionally larger number of requests</td>
      </tr>

      <tr>
        <th>Least Session</th><td>The request is sent to the server with the fewest active sessions</td>
      </tr>

      <tr>
        <th>Least RTT</th><td>The request is sent to the server with the minimum round-trip time (RTT). The RTT value is measured using a server availability check—a Ping-type Health Check. If Health Check is not configured, the default RTT is zero</td>
      </tr>

      <tr>
        <th>First Alive</th><td>All requests are directed to the first available server. If the server is unavailable, requests are sent to the next server</td>
      </tr>

      <tr>
        <th>HTTP Host</th><td>Requests are distributed between servers based on the HTTP `Host` header</td>
      </tr>
    </tbody>
  </table>
</CustomTable>

<Formbricks />
