On 10/14/2013 09:15 PM, zipped wrote:
> I need to setup a reverse proxy as follows. I have a master web server that
> has the superset of my website/database, server A. I also have another
> website that would have a subset of my website/database, server B. I need a
> proxy server that can send all requests to the subset server, B. Then based
> on the response from that request either return the response to the client
> or forward the request higher to server A. This would be analogous to
> having a world wide corporate website and a regional website where most of
> the data requested from a specific area is on the regional website but there
> are a few occasions when the world wide corporate site must be queried.
>
> So in this scenario the request goes to proxy, then to server B, something
> is written to the request response indicating the request was not
> successfully found on server B. Then the request is forwarded up higher to
> server A and sent back to the client.
>
> The other possible scenario would be the request goes to the proxy, then to
> server B, the request is found and returned to the client with no further
> need for server A.
>
> Is this possible with squid without modifying the source?
I think it is possible, provided the negative response from server B
matches Squid response re-forwarding criteria documented at
http://wiki.squid-cache.org/SquidFaq/InnerWorkings?#When_does_Squid_re-forward_a_client_request.3F
The last few bullets in that long list are especially important in your
case. Please keep in mind that the list items document cases when Squid
will _not_ re-forward a request. You may want to convert the last two
bullets into positive cases to decide which response status codes you
should test with.
In addition to an appropriate response from server B, you will need to
configure server B and server A to be cache_peers of your reverse proxy
and make sure server B is used as the first choice. See cache_peer in
squid.conf.documented or at
http://www.squid-cache.org/Doc/config/cache_peer/
HTH,
Alex.
Received on Tue Oct 15 2013 - 19:44:23 MDT
This archive was generated by hypermail 2.2.0 : Fri Oct 18 2013 - 12:00:07 MDT