config link-load-balance link-group
Use this command to configure link groups.
Link groups include ISP gateways your company uses for outbound traffic. Grouping links reduces the risk of outages and provisions additional bandwidth to relieve potential traffic congestion.
The link group configuration specifies the load balancing algorithm and the gateway routers in the load balancing pool. You can enable LLB options, such as persistence rules and proximity routes.
Before you begin:
- You must have configured gateway links and persistence rules and before you can select them in the link group configuration.
- You must have read-write permission for link load balancing settings.
After you have configured a link group configuration object, you can select it in the link policy configuration.
Syntax
config link-load-balance link-group
edit <name>
set addr-type ipv4
set persistence <datasource>
set proximity-route {enable|disable}
set route-method {consistent-hash-ip | least-connection | least-new-cps | least-throughput-all | least-throughput-in | least-throughput-out | spillover-throughput-all | spillover-throughput-in | spillover-throughput-out | wrr>
config link-member
edit <name>
set backup {enable|disable}
set gateway <datasource>
set spillover-priority <integer>
set status {enable|disable}
set weight <integer>
next
end
next
end
addr-type |
Only IPv4 is supported. |
persistence |
Specify a persistence configuration. Optional. |
proximity-route |
Enable/disable use of proximity routes. |
route-method |
|
config link member |
|
backup |
|
gateway |
Specify a gateway configuration object. |
spillover-priority |
Assigns a priority to the link when using a spillover load balancing method. Higher values have greater priority. When a spillover method is enabled, the system dispatches new connections to the link that has the greatest spillover priority until its threshold is exceeded; then it dispatches new connections to the link with the next greatest priority until its threshold is exceeded, and so on. If multiple links in a link group have the same spillover priority, the system dispatches new connections among those links according to round robin. The default is 0. The valid range is 0-9. |
status |
|
weight |
Assigns relative preference among members—higher values are more preferred and are assigned connections more frequently. The default is 1. The valid range is 1 to 255. All load balancing methods consider weight, except spillover, which uses its own priority configuration. Servers are dispatched requests proportional to their weight, relative to the sum of all weights. The following example shows the effect of weight on WRR:
For other methods, weight functions as a tie-breaker. For example, with the Least Connection algorithm, requests are sent to the server with the least connections. If the number of connections is equal, the request is sent to the server with the greater weight. For example:
The next request is sent to Server B. |
Example
FortiADC-VM (link-group) # edit llb-link-group
Add new entry 'llb-link-group' for node 618
FortiADC-VM (llb-link-group) # get
addr-type : ipv4
route-method : wrr
persistence :
proximity-route : disable
FortiADC-VM (llb-link-group) # config link-member
FortiADC-VM (link-member) # edit 1
Add new entry '1' for node 624
FortiADC-VM (1) # get
gateway :
weight : 1
spillover-priority : 0
status : enable
FortiADC-VM (1) # set gateway llb-gateway
FortiADC-VM (1) # end