* Clean up tests logging This cleans up the travis logs so you can see the failures better. Older tests in tests/ would call log.SetOutput(ioutil.Discard) in a haphazard way. This add log.Discard and put an `init` function in each package's dir (no way to do this globally). The cleanup in tests/ is clear. All plugins also got this init function to have some uniformity and kill any (future) logging there in the tests as well. There is a one-off in pkg/healthcheck because that does log. Signed-off-by: Miek Gieben <miek@miek.nl> * bring back original log_test.go Signed-off-by: Miek Gieben <miek@miek.nl> * suppress logging here as well Signed-off-by: Miek Gieben <miek@miek.nl> |
||
---|---|---|
.. | ||
handler.go | ||
loadbalance.go | ||
loadbalance_test.go | ||
log_test.go | ||
OWNERS | ||
README.md | ||
setup.go | ||
setup_test.go |
loadbalance
Name
loadbalance - randomize the order of A, AAAA and MX records.
Description
The loadbalance will act as a round-robin DNS loadbalancer by randomizing the order of A, AAAA, and MX records in the answer.
See Wikipedia about the pros and cons on this setup. It will take care to sort any CNAMEs before any address records, because some stub resolver implementations (like glibc) are particular about that.
Syntax
loadbalance [POLICY]
- POLICY is how to balance, the default, and only option, is "round_robin".
Examples
Load balance replies coming back from Google Public DNS:
. {
loadbalance round_robin
forward . 8.8.8.8 8.8.4.4
}