How do I optimize failover speed?

In your cluster configuration file, (ego.cluster) set the following under "Parameters":

EXINTERVAL=5
HOST_INACTIVITY_LIMIT=2
RETRY_LIMIT=1
MASTER_INACTIVITY_LIMIT=1
PROBE_TIMEOUT=1
Note:

A faster failover speed may result in lower tolerance to potential network glitches.