config global-load-balance virtual-server-pool
The virtual server pool configuration defines the set of virtual servers that can be matched in DNS resource records, so it should include, for example, all the virtual servers that can be answers for DNS requests to resolve www.example.com.
You also specify the key parameters of the global load balancing algorithm, including proximity options, status checking options, load balancing method, and weight.
The DNS response is an ordered list of answers. Virtual servers that are unavailable are excluded. Available virtual servers are ordered based on the following priorities:
- Geographic proximity
- Dynamic proximity
- Weighted round robin
A client that receives DNS response with a list of answers tries the first and only proceeds to the next answers if the first answer is unreachable.
Before you begin:
- You must have created the global load balance server configuration and you must know the names of the virtual servers that have been populated in that configuration.
- You must have read-write permission for global load balancing settings.
After you have created a virtual server pool configuration object, you can specify it global load balancing host configuration.
Syntax
config global-load-balance virtual-server-pool
edit <name>
set check-server-status {enable|disable}
set check-virtual-server-existence {enable|disable}
set preferred {None | GEO | GEO-ISP | RTT | Least-Connections | Connection-Limit | Bytes-Per-Second | Server-Performance}
set alternate {None | GEO | GEO-ISP | RTT | Least-Connections | Connection-Limit | Bytes-Per-Second | Server-Performance}
set load-balance-method wrr
config member
edit <No.>
set backup {enable|disable}
set server <datasource>
set server-member-name <string>
set weight <integer>
next
end
next
end
config global-load-balance virtual-server-pool
edit "vsp1"
set preferred Connection-Limit
set preferred Bytes-Per-Second
next
end
check-server-status |
Enable/disable polling of the local FortiADC SLB. If the server is unresponsive, its virtual servers are not selected for DNS answers. |
check-virtual-server-existence |
Enable/disable checks on whether the status of the virtual servers in the virtual server list is known. Virtual servers with unknown status are not selected for DNS answers. |
preferred |
The preferred schedule method for this virtual server pool. |
alternate |
The alternate schedule method for this virtual server pool. |
load-balance-method |
Only weighted round-robin is supported. |
Note: The preferred method will be used first when scheduling a DNS query in a virtual server pool. If the preferred method is selected GEO/GEO-ISP and the configured GEO IP/ISP can't match source IP of DNS query, then alternate method will be used. Also, when the preferred method is set to None, the alternate method will be used. When the preferred and the alternate methods are both set to None or do not match any of the result, the load-balance-method WRR will be used to schedule by default. |
|
preferred Connection-Limit |
Scheduling is done according to the current connection number of each virtual server in the virtual-server-pool members and each virtual server's configured connection-limit value. |
preferred Bytes-Per-Second |
If the BPS method is used, the virtual server with the least throughput should be the answer responded by GLB. |
config member |
|
backup |
Enable to designate the pool as a backup member of the group. All backup members are inactive until all main members are down. |
server |
Specify a global server load balancing servers configuration object. |
server-member-name |
Specify the name of the virtual server that is in the servers virtual server list configuration. |
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-255. |
Example
FortiADC-VM # config global-load-balance virtual-server-pool
FortiADC-VM (virtual-server~p) # edit pool_test
Add new entry 'pool_test' for node 2858
FortiADC-VM (pool_test) # get
preferred : NONE
check-server-status : disable
check-virtual-server-existence: disable
load-balance-method : wrr
FortiADC-VM (pool_test) # set preferred GEO-ISP
FortiADC-VM (pool_test) # config member
FortiADC-VM (member) # edit 1
Add new entry '1' for node 2864
FortiADC-VM (1) # get
server :
server-member-name :
weight : 1
backup : disable
FortiADC-VM (1) # set server neighbor1
FortiADC-VM (1) # set server-member-name vs-1
FortiADC-VM (1) # set weight 2
FortiADC-VM (1) # next
FortiADC-VM (member) # edit 2
Add new entry '2' for node 2864
FortiADC-VM (2) # set server neighbor1
FortiADC-VM (2) # set server-member-name vs-2
FortiADC-VM (2) # next
FortiADC-VM (member) # edit 3
Add new entry '3' for node 2864
FortiADC-VM (3) # set server neighbor2
FortiADC-VM (3) # set server-member-name vs-3
FortiADC-VM (3) # set weight 2
FortiADC-VM (3) # next
FortiADC-VM (member) # edit 4
Add new entry '4' for node 2864
FortiADC-VM (4) # set server neighbor2
FortiADC-VM (4) # set server-member-name vs-4
FortiADC-VM (4) # end
FortiADC-VM (pool_test) # end
config global-load-balance virtual-server-pool
edit "vsp1"
set preferred GEO
set alternate RTT
next
end