1

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?

Dean Hiller
  • 911
  • 4
  • 15
  • 35

2 Answers2

1

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.

TristanK
  • 9,073
  • 2
  • 28
  • 39
0

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.

squillman
  • 37,883
  • 12
  • 92
  • 146