Chapter 9 High Availability : HA and load balancing : Load balancing overview
  
Load balancing overview
In active-active HA, the FGCP uses a technique similar to unicast load balancing in which the primary unit is associated with the cluster HA virtual MAC addresses and cluster IP addresses. The primary unit is the only cluster unit to receive packets sent to the cluster.
An active‑active HA cluster consists of a primary unit that processes communication sessions and one or more subordinate units that also process communication sessions. The primary unit receives all sessions and load balances sessions for security policies with UTM enabled to all cluster units. Communication between the cluster units uses the actual cluster unit MAC addresses.
Processing UTM sessions can be CPU and memory-intensive, load balancing UTM traffic may result in an active-active cluster having higher throughout than an active-passive cluster or a standalone FortiGate unit because resource-intensive UTM processing is distributed among all cluster units.
You can also enable the load-balance-all CLI keyword to have the primary unit load balance all TCP sessions. Load balancing TCP sessions is less likely to improve throughput because of extra overhead required for load balancing. So load‑balance‑all is disabled by default.
You can also enable the load-balance-udp CLI keyword to have the primary unit load balance all UDP sessions. Load balancing UDP sessions will also increase overhead so it is disabled by default.
During active-active HA load balancing operation, when the primary unit receives the first packet of a UTM session (or a TCP session if load‑balance-all is enabled or a UDP session of load-balance-udp is enabled) the primary unit uses the configured load balancing schedule to determine the cluster unit that will process the session. The primary unit stores the load balancing information for each active load balanced session in the cluster load balancing session table. Using the information in this table, the primary unit can then forward all of the remaining packets in each session to the appropriate cluster unit. The load balancing session table is synchronized among all cluster units.
ICMP, multicast, and broadcast sessions are never load balanced and are always processed by the primary unit. VoIP, IM, P2P, IPsec VPN, HTTPS, SSL VPN, HTTP multiplexing, SSL offloading, WAN optimization, explicit web proxy, and WCCP sessions are also always processed only by the primary unit.
In addition to load balancing, active-active HA also provides device and link failover protection similar to active-passive HA. If the primary unit fails, a subordinate unit becomes the primary unit and resumes operating the cluster. See “Device failover” and “Link failover (port monitoring or interface monitoring)” for more information.
Active-active HA provides the same session failover protection as active-passive HA See “Session failover (session pick-up)” more information about FortiGate session failover and its limitations.
Active-active HA also maintains as many UTM sessions as possible after a failover by continuing to process the UTM sessions that were being processed by the cluster units that are still operating. See “Active-active HA subordinate units sessions can resume after a failover” for more information. Active‑passive HA does not support maintaining UTM sessions after a failover.