Traffic is routed for Master failover gateway in case of any outage experienced in a primary gateway, so if the primary gateway is suspected to timeout, not reachable etc so in that case the messages are routed to Master failover gateway.
Navigate to Administration >> general settings >> Manage General settings and set your any one of the gateways as MASTER FAILOVER, please note its a global setting to define a failover gateway having A to Z connectivity, traffic is routed for failover gateway in case of any outage experienced in a primary gateway.
Any Premium or existing Gateway that is identified to have more stable and reliable TCP connection with SMPP Gateway can be selected as a Failover Gateway