Chapter 12 Load Balancing for FortiOS 5.0 : Configuring load balancing : Load balancing overview : Real servers : Adding real servers
  
Adding real servers
To add a real server from the web‑based manager go to Firewall Objects > Load Balance > Real Server.
Virtual Server
Select the virtual server that will send sessions to this real server.
IP Address
Enter the IP address of the real server.
Port
Enter the port number on the destination network to which the external port number is mapped.
Weight
Enter the weight value of the real server. The higher the weight value, the higher the percentage of connections the server will handle. A range of 1‑255 can be used. This option is available only if the associated virtual server’s load balance method is Weighted.
Max Connections
Enter the limit on the number of active connections directed to a real server. A range of 1-99999 can be used. If the maximum number of connections is reached for the real server, the FortiGate unit will automatically switch all further connection requests to another server until the connection number drops below the specified limit.
Setting Maximum Connections to 0 means that the FortiGate unit does not limit the number of connections to the real server.
HTTP Host
Enter the HTTP header for load balancing across multiple real servers. This feature is used for load balancing HTTP host connections across multiple real servers using the host’s HTTP header to guide the connection to the correct real server, providing better load balancing for those specific connections.
Mode
Select a mode for the real server.
To add a real server from the CLI you configure a virtual server and add real servers to it. For example, to add three real servers to a virtual server that load balances UDP sessions on port 8190 using weighted load balancing. For each real server the port is not changed. The default real server port is 0 resulting in the traffic being sent the real server with destination port 8190. Each real sever is given a different weight. Servers with higher weights have a max-connections limit to prevent too many sessions from being sent to them.
config firewall vip
edit Vserver-UDP-1
set type server-load-balance
set server-type udp
set ldb-method weighted
set extip 172.20.120.30
set extintf wan1
set extport 8190
set monitor ping-mon-1
config realservers
edit 1
set ip 10.31.101.30
set weight 100
set max-connections 10000
next
edit 2
set ip 10.31.101.40
set weight 100
set max-connections 10000
next
edit 3
set ip 10.31.101.50
set weight 10
end
end