search cancel

How to failover to other forwarding host based on health check


Article ID: 173188


Updated On:


ProxySG Software - SGOS


You have policy that uses forwarding host and you need to implement redundancy to  avoid single point of failure (SPOF).

In situation when health check fails for one forwarding host, proxy will fail over and use alternative uniform resource locator (URL) or IP address in other forwarding host.


You have already one forwarding host configured "forwarding1", add another one and give it a similar name, for instance "forwarding2"

1. Create additional forwarding host


Alias: "forwarding2"

Host: IP address or URL

Depending on service type, select appropriate port number.

Now you have two forwarding host "forwarding1" and "forwarding2", verify if health check is ok for both of them:

>statistics>Health Checks> 

You should see "fwd.forwarding1" and "fwd.forwarding2" health checks.


2. Create forwarding rule


;;;;;;;;If first "forwarding1" health check is OK, use it;;;;;;;;
    "is_healthy.fwd.forwarding1"=yes forward("forwarding1") forward.fail_open(no)   

;;;;;;;;If first "forwarding1" health check is FAILED, forward to "forwarding2";;;;;;;;
    "is_healthy.fwd.forwarding1"=no forward("forwarding2") forward.fail_open(no)