2016-03-23 15:57:48 +00:00
|
|
|
# loadbalance
|
|
|
|
|
|
|
|
|
|
`loadbalance` acts as a round-robin DNS loadbalancer by randomizing A and AAAA records in the
|
|
|
|
|
message. See [Wikipedia](https://en.wikipedia.org/wiki/Round-robin_DNS) about the pros and cons
|
|
|
|
|
on this setup.
|
|
|
|
|
|
2016-08-22 07:47:03 +01:00
|
|
|
It will take care to sort any CNAMEs before any address records, because some stub resolver
|
|
|
|
|
implementation (like glibc) can't handle that.
|
2016-03-26 09:53:40 +00:00
|
|
|
|
2016-03-23 15:57:48 +00:00
|
|
|
## Syntax
|
|
|
|
|
|
|
|
|
|
~~~
|
|
|
|
|
loadbalance [policy]
|
|
|
|
|
~~~
|
|
|
|
|
|
2016-03-26 09:53:40 +00:00
|
|
|
* `policy` is how to balance, the default is "round_robin"
|
2016-03-23 15:57:48 +00:00
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
|
|
~~~
|
|
|
|
|
loadbalance round_robin
|
|
|
|
|
~~~
|