[dnsdist] Round-robin inside preferred pool with another pool as backup

Chris lists at shthead.net
Tue Sep 19 14:00:23 UTC 2017


Hi,

> - How would we achieve the load balancing behavior above? Will we have 
> to write our own load balancing code in Lua, or is there some existing 
> configurations we can use?

I wrote a lua script to do this already: 
https://github.com/sysadminblog/dnsdist-configs/blob/master/orderedLeastOutstanding.lua

So with the above script, as an example you have the following setup:

AZ 1:
server1
server2
server3

AZ 2:
server4
server5
server6

Using that script, as an example you could do this:

On the dnsdist instance(s) in AZ 1, you would add the server1/2/3 
backends with a priority of 1. You would add server4/5/6 with a priority 
of 2. On the dnsdist instance(s) in AZ 2 you would add the server4/5/6 
backends with a priority of 1, server1/2/3 backends with a priority of 2.

Normal behavior would result in the requests being load balanced to the 
servers with a priority of 1, if those three servers are down then the 
requests would then be load balanced to the servers with a priority of 2.



More information about the dnsdist mailing list