coredns/middleware/loadbalance
Miek Gieben 8555716046 Cleanups and tests (#272)
For some reasons there was a dnsserver/middleware.go that defined
the middleware handlers. This code was a repeat from
middleware/middleware.go. Removed dnsserver/middleware.go and replaced
all uses of dnsserver.Middleware with middleware.Middleware.

Added dnsserver/address_test.go to test the zone normalization (and to
improve the test coverage). The deleted file will also improve the test
coverage :)
2016-09-19 11:26:00 +01:00
..
handler.go Cache (#126) 2016-04-19 11:13:24 +01:00
loadbalance.go Some tiny changes and new benchmark test function (#136) 2016-04-26 20:45:29 +01:00
loadbalance_test.go Cleanup: put middleware helper functions in pkgs (#245) 2016-09-07 11:10:16 +01:00
README.md Update README.md 2016-08-22 14:25:19 -07:00
setup.go Cleanups and tests (#272) 2016-09-19 11:26:00 +01:00

loadbalance

loadbalance acts as a round-robin DNS loadbalancer by randomizing the order of A and AAAA 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 is "round_robin"

Examples

loadbalance round_robin