[dnsdist] server policy to failover to another pool
justin.valentini at oracle.com
Wed Oct 4 21:05:43 UTC 2017
I'm trying to create a Lua server policy to use the least outstanding
policy on one pool but send traffic to another pool if none of the
servers in the first pool are up.
Here's my Lua code which is *not* working:
function useLocalBindAsLastResort(servers, dq)
primaryServer = leastOutstanding.policy(getPoolServers("primary"), dq)
return leastOutstanding.policy(getPoolServers("secondary"), dq)
The problem seems to be with the conditional as it never seems to hit
the secondary pool, even when I test it by manually setting all servers
in the primary pool to DOWN. I'm not quite sure what the check needs to
look like though. Thoughts?
More information about the dnsdist