mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	Cache the size and the do bit whenever someone asked for it. We can probably add more: PASS BenchmarkStateDo-4 100000000 11.9 ns/op BenchmarkStateSize-4 5000000 265 ns/op ok github.com/miekg/coredns/middleware 2.828s PASS BenchmarkStateDo-4 1000000000 2.86 ns/op BenchmarkStateSize-4 500000000 3.10 ns/op ok github.com/miekg/coredns/middleware 5.032s This PR also includes some testing cleanups as well.
loadbalance
loadbalance acts as a round-robin DNS loadbalancer by randomizing A and AAAA records in the
message. See Wikipedia about the pros and cons
on this setup.
It will take care to sort any CNAMEs before any address records.
Syntax
loadbalance [policy]
- policyis how to balance, the default is "round_robin"
Examples
loadbalance round_robin