Reverse Proxy Question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Reverse Proxy Question

David Seltzer
Hi Everyone,

I'm running Squid 2.6Stable13 on Fedora Core 6.

I'm using squid as a reverse proxy for a pool of web servers, but I have a few questions about the setup.

At the moment my config for the servers looks like this:

cache_peer app2 parent 8080 0 no-query originserver round-robin weight=1
cache_peer app1 parent 8080 0 no-query originserver round-robin weight=4

My first question is: Does the weight parameter affect the way that MISS requests are passed on?
My experiments lead me to believe the answer is yes, but I'm not quite sure how. Does this example mean that app2 should get 1/4th of the hits or 1/5th of the hits?

My second question, is: Should I be using CARP instead? I've had no luck in trying to get it to work, and the only reason I can
think of is that maybe CARP doesn't apply in a situation where I'm not using ICP between servers.

Thanks very much!

-Dave
Reply | Threaded
Open this post in threaded view
|

Re: Reverse Proxy Question

Henrik Nordström
tor 2007-05-24 klockan 17:56 -0400 skrev David Seltzer:

> At the moment my config for the servers looks like this:
>
> cache_peer app2 parent 8080 0 no-query originserver round-robin weight=1
> cache_peer app1 parent 8080 0 no-query originserver round-robin weight=4

Ok.

> My first question is: Does the weight parameter affect the way that MISS requests are passed on?
> My experiments lead me to believe the answer is yes, but I'm not quite sure how. Does this example mean that app2 should get 1/4th of the hits or 1/5th of the hits?

yes.

> My second question, is: Should I be using CARP instead? I've had no luck in trying to get it to work, and the only reason I can
> think of is that maybe CARP doesn't apply in a situation where I'm not using ICP between servers.

Squid only implements inter-array CARP forwarding, not intra-array CARP
forwarding. As a result it's only usable in forwarding requests to an
array of caches, not for optimizing the forwarding within an array of
caches.

But it is possible to build a two-layer structure on the same servers,
by running a non-caching CARP frontend layer connecting to the caching
Squids.

But it's not much related to forwarding of requests to the origin
servers. Here weighted round-robin is probably the best unless you need
to keep session state on the servers..

Regards
Henrik

signature.asc (316 bytes) Download Attachment