Fortinet white logo
Fortinet white logo

CLI Reference

config load-balance method

config load-balance method

Use this command to add method configuration objects.

The system includes predefined configuration objects for all supported load balancing methods, and there is no need to create additional configuration objects. You may choose to do so, however, for various reasons, for example, to use a naming convention that makes the purpose of the configuration clear to other administrators.

Table 8 describes the predefined methods.

Predefined methods

Predefined Description

LB_METHOD_ROUND_ROBIN

Selects the next server in the series: server 1, then server 2, then server 3, and so on.

LB_METHOD_LEAST_CONNECTION

Selects the server with the least connections.

LB_METHOD_FASTEST_RESPONSE

Selects the server with the fastest response to health check tests.

LB_METHOD_URI

Selects the server based on a hash of the URI found in the HTTP header, excluding hostname.

LB_METHOD_FULL_URI

Selects the server based on a hash of the full URI string found in the HTTP header. The full URI string includes the hostname and path.

LB_METHOD_HOST

Selects the server based on a hash of the hostname in the HTTP Request header Host field.

LB_METHOD_HOST_DOMAIN

Selects the server based on a hash of the domain name in the HTTP Request header Host field.

LB_METHOD_DEST_IP_HASH

Selects the next hop based on a hash of the destination IP address. This method can be used with the Layer 2 virtual server.

Before you begin:

  • You must have read-write permission for load balancing settings.

Syntax

config load-balance method

edit <name>

set type {dest-ip-hash | fastest-response | full-uri-hash | host-domain-hash | host-hash | least-connection | round-robin | uri-hash}

next

end

type

Specify the method.

config load-balance method

config load-balance method

Use this command to add method configuration objects.

The system includes predefined configuration objects for all supported load balancing methods, and there is no need to create additional configuration objects. You may choose to do so, however, for various reasons, for example, to use a naming convention that makes the purpose of the configuration clear to other administrators.

Table 8 describes the predefined methods.

Predefined methods

Predefined Description

LB_METHOD_ROUND_ROBIN

Selects the next server in the series: server 1, then server 2, then server 3, and so on.

LB_METHOD_LEAST_CONNECTION

Selects the server with the least connections.

LB_METHOD_FASTEST_RESPONSE

Selects the server with the fastest response to health check tests.

LB_METHOD_URI

Selects the server based on a hash of the URI found in the HTTP header, excluding hostname.

LB_METHOD_FULL_URI

Selects the server based on a hash of the full URI string found in the HTTP header. The full URI string includes the hostname and path.

LB_METHOD_HOST

Selects the server based on a hash of the hostname in the HTTP Request header Host field.

LB_METHOD_HOST_DOMAIN

Selects the server based on a hash of the domain name in the HTTP Request header Host field.

LB_METHOD_DEST_IP_HASH

Selects the next hop based on a hash of the destination IP address. This method can be used with the Layer 2 virtual server.

Before you begin:

  • You must have read-write permission for load balancing settings.

Syntax

config load-balance method

edit <name>

set type {dest-ip-hash | fastest-response | full-uri-hash | host-domain-hash | host-hash | least-connection | round-robin | uri-hash}

next

end

type

Specify the method.