On Tue, 22 Mar 2011 08:35:38 -0400, David Guertin wrote:
On 2011-03-21 19:38, Amos Jeffries wrote:
"if site A is up, redirect to site A, but if it's
down, redirect to site B."

Is there any way to do this? Is squid the correct tool for this?
Would a different redirector that squidGuard be a better choice?


Using a redirector for this is not a good choice. Redirectors only pass a URL to Squid to inform the client to try there. It is up to the redirector to test

Thanks for the help. I've been sort of been coming to this conclusion
as I learn my way around Squid. It looks like your reply was cut off.
What would be a better alternate strategy? The remote site is a bunch
of database-driven forms with confidential data, which we are not able to store securely (which is why they are off-site in the first place). Would it be a better idea (or possible) to cache the forms, even if we
do not cache the data?

Thanks,
Dave

Yes there was more on that reply...

Thepreferred alternative is cache_peer link(s) to the origin server(s) or app(s). Squid 'tests" these during each connection setup and can failover between several of them or 'DIRECT' Internet DNS details as needed.

Usage is detailed under reverse-proxy where they are commonly used:
http://wiki.squid-cache.org/ConfigExamples/Reverse/BasicAccelerator

NP: This will also make available the "proxy-only" flag on the cache_peer line. Which prevents squid storing anything fetched from there without bothering about fancy cache rules.

FWIW, by default Squid does not cache the body portion of POST requests. So if they are doing normal forms the data will not be cached. The empty form page is a GET so may be cached if they let it. Whether the reply page after submission is cacheable depends on what 3xx status code and HTTP headers they respond with.


Amos


Reply via email to