Once we start load balancing the servers I will need all requests containing this keyword in the URL to point to the correct Squid Server and that Squid Server will be set to talk to the correct App Server which talks to the Oracle DB that handles those types of requests. Is this something that can be done proxy.pac? How would this be accomplished? Doesn't a regex match have to match a whole URL not just a keyword?
Thanks, Nick
Henrik Nordstrom wrote:
On Tue, 10 Feb 2004, Nick wrote:
Hello, I am fairly new to Squid and have a few questions about how I can redirect certain URLS.
Either with a redirector helper, or by denying access to the URLs in http_access and then redirect the request with deny_info. Assuming you want to redirect the client to another URL than requested.
We have 2 squid servers that handle our sites, right now we have some
sites pointing to one server and the other sites pointing to the other.
Ok.
I would like to load balance the 2 servers but need to direct all
traffic the contains a certain word in the URL to one server. Is this
possible?
It is not easily done in such manner that the client hits the correct proxy immediately, but you can always set up peering between the two to forward requests to the correct proxy.
If you are using a proxy.pac script then this is quite trivial. Just regex match on the requested URL and if a match found return the correct proxy.
For what reason do you want to do this?
Another question I have is what is the best way to load balance squid. Round Robin or using something like the Super Proxy script? All of our
sites point to our Cisco GSS and the GSS directs all requests to the
correct Squid Server.
Hmm.. are you talking about a normal Internet proxy, or a reverse proxy / accelerator infront of certain web servers?
I would like to use load balancing in the GSS but that would mean we
aren't guaranteed that each page will go to the same Squid Server.
Depends on the load balancing method used.
If I use the Super Proxy it wouldn' it mean that requests still might go
to wrong server, but then be redirected to the server that originally
cached the page?
If you use a proxy.pac script then the script can freely select which proxy or proxies to use based on any criteria you can dream up. It is however limited to Internet proxy setups only ans is not applicable to reverse proxy / accelerator setups.
Regards Henrik
