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