Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We are wanting to have a primary "test" http proxy that we are doing some unique stuff with. We want this proxy to be the primary so using WPAD we would want to deliver this as the primary to always use and the other one as the secondary(two hostnames). Will this work or will browsers randomly choose one of the two and load balance.

I thought of maybe returning one DNS entry and then putting two ips in that DNS and having the order sent back to browsers always being the same which would work but I heard sometimes firefox keeps trying to use the failed entry in DNS on every request where IE actually switches and keeps using secondary from then on.(I guess I could try one step further of hearbeating to the 1st proxy and changing the DNS entry....yuck on work I didn't want to have to do though).

any way to do this with just WPAD?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Generally, if your WPAD returns something like:

"PROXY Testproxy:8080; PROXY Backup:8080; DIRECT"

A browser will try to establish a connection to the first one in the list only, and if the connection fails, move to the next in the ordered list.

See also the wikipedia entry.

With the DNS solution you've described, the client might not care that there are two IPs associated with one name; if it's tried the name, it'll give up on it after that.

And each browser can have subtly different behaviour with the above line. If you don't want to use an HTTP load balancer to provide failover, it's basically WPAD or DNS, and DNS is a suckier way of doing it.

DNS might cause something akin to "load balancing" behaviour, but using an ordered list in WPAD shouldn't. The failover behaviour might be sticky, or might be ugly, but closing the browser is usually enough to reset it.

share|improve this answer

The DNS solution you propose is called DNS Round Robin and will not give you what you desire. For every resolution request you could get either IP as the primary in the response. It's considered a [very] poor-man's load balancing and is not a solution for failover.

You'll want to put your test server in as the first in the list like you mention and as TristanK illustrates.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.