Search squid archive

Re: origin server status check before forwarding requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 18 Sep 2011 18:48:12 +0530, Deepak Rao wrote:
Hi,

I am using squid in reverse proxy mode. So far, we were using
cache_peer and cache_peer_access to forward the request to origin
server, and there were 2 origin servers configured for load balance
and HA. Squid checks the health of these origin servers before
forwarding the request to one i.e., if one of the origin server is
down, all the requests landed up on the 'live' server, thus ensuring
no request is failed.

Now, we have a requirement to rewrite the request url (and hostname in the url) before forwarding the request to origin server. Hence, we are
using url_rewrite_program instead of cache_peer*. Is there a way to
achieve the 'health check and only then forward' feature inherent in
cache_peer configuration, in case of url_rewrite too?

Thanks,
Deepak


Yes. Use both re-write and cache_peer. All re-write does is create a duplicate request with different URL line to be sent to the server, instead of passing the original request out.

You may not need to wade through the performance overhead involved with re-write. Look at whether your suqid supports the forcedomain= option on cache_peer. This will avoid the need to clone the whole request. You will still encounter all the other problems re-write has with embedded URLs and internal hostnames being sent out to the client.

Amos


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux