You are correct, 60 seconds is not long.  Just long enough to exceed my NFS
caching on the backend.

The reason for wanting to use hdr(host) is because this will make better
use of the resources in my cluster (I have thousands of domains/web
applications on this cluster).

The reason I was originally trying to stick based on 'src' was an attempt
to avoid the above mentioned problem.  But that doesn't work as hdr(host)
will cause it to want to start on the same node all the time.

The reason I tried roundrobin with a stick on hdr(host) was to get better
initial distribution, but that is completely counteracted by the fact that
once a session is in progress, the rest follow exactly as I should have
expected.

What I am hoping for is the behavior you get when filling an ice tray.  you
can start running water into just one of the cubes and once it is full, it
gracefully spills into the adjacent cubes without spilling over the sides.
 This continues until all cubes are full and then if you leave the water
on, all cubes become full and the entire ice tray begins to overflow.

I can try they config you suggest and I have no doubts that it will work
just fine, it just won't provided me with the resource affinity that I am
looking for.

Hope that all makes sense.


On Tue, Jan 21, 2014 at 1:17 PM, PiBa-NL <[email protected]> wrote:

> Hi Michael,
>
> Seems like you keep wanting to use the hdr(host), can i ask why?
> You seem to explain you just want to stick 'src' to a 'server'.. So why
> configure hdr(host) ?
>
> Can you try this config? (ps 60 seconds isnt verry long..)
>
>
> listen http
>   balance roundrobin
>   stick-table type ip size 1000000 expire 60s
>   stick on src
>   server www01 127.0.0.1 check observe layer7
>   server www02 127.0.0.2 check observe layer7
>   server www03 127.0.0.3 check observe layer7
>
> Greets PiBa-NL
>
> Michael Johnson - MJ schreef op 21-1-2014 21:57:
>
>  Is there a way to limit the number of sticky connections to a single
>> server?
>> I would like to have all traffic to a given virtual host tend to end up
>> on the same backend server, but also allow the traffic to spread to
>> multiple servers if more than say 50 connections are already stuck to a
>> given server.  I do need sessions from individual ips to stay stuck, just
>> new sessions from new ips to stick to a different host.  I've considered a
>> few options, but none of them seem to work.
>>
>> The first option I tried was:
>>
>> hash-type consistent
>> listen http
>>   balance hdr(host)
>>   stick-table type ip size 1000000 expire 60s
>>   stick on src
>>   server www01 127.0.0.1 check observe layer7
>>   server www02 127.0.0.2 check observe layer7
>>   server www03 127.0.0.3 check observe layer7
>>
>> The problem with this is that all requests for 'host' seem to always
>> route to the same backend node unless it fails out entirely and then it all
>> moves to another single node.  Perhaps that shouldn't surprise me, but it
>> did.
>>
>> I then considered this setup:
>>
>> listen http
>>   balance roundrobin
>>   stick-table type ip size 1000000 expire 60s
>>   stick on hdr(host)
>>   server www01 127.0.0.1 check observe layer7
>>   server www02 127.0.0.2 check observe layer7
>>   server www03 127.0.0.3 check observe layer7
>>
>> This also doesn't work and seems to result in basically the same thing as
>> the first.
>>
>> I've been reading through the docs, and I can't seem to come up with any
>> way to do what I am trying to accomplish.  I'm guessing that is because
>> there is not.  But I figured I would throw this out to the list before I
>> scrap my plan and take a different route.  Thanks!
>>
>> --
>> Michael Johnson - MJ
>>
>
>


-- 
Michael Johnson - MJ

Reply via email to