DNS Priority Loadbalancing
- Give the 2 A records for proxy different TTLs
- e.g. proxy1 has a ttl of 600 and proxy2 a ttl of 1200
- proxy2 is the big box, proxy1 the smaller box
Why will this give priorities ? Well clients that resolve proxy and use proxy1 will refetch the proxy record after 600 seconds. And thus making use of this proxy for a minimum of 600 seconds. The same is true for proxy2 but this proxy will be used for a minimum of 1200 seconds. As the selection of A record for proxy is almost random, this will provide some sort of prioritizing.
I've configured this setup for our proxy round-robin setup and will see the results tomorrow as all customers start bashing our proxy servers. I'll keep you posted!
It seems the current TTL settings of 600 for proxy1 and 1200 for proxy2 don't have the desired effect. Loadbalancing seems almost 50/50 at the moment. I have now adjusted the TTL's to 600 for proxy1 and 3600 for proxy2. Tomorrow evening I'll have more info if this approach is effective.
Ok, using TTL's for DNS prioritizing does NOT work. Our proxies are both evenly loaded (approx 5% difference). So using TTL's for DNS priority loadbalancing will not work in practice. I'll write a new article summarizing this issue after I get back home.