Created on
07-01-2021
12:02 AM
Edited on
11-11-2024
11:59 PM
By
Jean-Philippe_P
Description
This article describes how to configure and validate HA failover due to memory utilization.
The new feature is included in FortiOS 7.0.0 onward and 7.2.0 onward (but not available in 6.4.x) to allow HA failover due to memory utilization.
In the scenario where the existing master’s memory utilization exceeds the threshold configured by the administrator for a specific amount of time.
Note:
The value used is a demonstration purpose, a higher threshold shall be configured in a production environment to prevent frequent failover of the HA master.
Important :
Override must be disabled on BOTH Primary and Secondary. Otherwise, there will be another failover immediately based on priority and the old primary will become master again with high memory usage:
Primary unit selection with override enabled.
Scope
FortiGate.
Solution
Initial Configuration.
In the existing environment, an HA pair with an A-P setup is configured with FortiOS 7.0.0. As visible from the following print screen, FortiGate with hostname Kancil-kvm39 is selected as the master as it was configured with higher priority:

To demonstrate memory-based failover based on this scenario, the following parameters are used for testing purposes:
set memory-based-failover enable
set memory-failover-threshold 62 <-- The memory usage threshold to trigger a memory-based failover, in percentage (0 - 95, 0 = use the conserve mode threshold, default = 0).
set memory-failover-sample-rate 1
set memory-failover-flip-timeout 6
end
If both FortiGates memory utilization is above the threshold (62% in this example), no failover will be triggered.
Verification.
To verify that memory-based HA failover is working, turn on the debug message for hatalk with the following command:
diagnose debug enable <-- A message indicating that mem-failover-flag changed will be shown in the debug messages:
