Ah, shoot, I forgot to mention that I'm running that ab test on ten boxes in
parallel, so actual concurrency level is 10x what ab spits out. That's why I
put "1500" above the one that had a concurrency of 150.

Sorry for the confusion.

I'm currently looking into keepalive stuff, going with a simpler config:

listen main *:80
    mode http
    balance roundrobin
    option http-server-close
    server  api1 api1:80 check
    server  api2 api2:80 check
    server  api3 api3:80 check
    server  api4 api4:80 check

It sounds like http-server-close makes the client -> haproxy connection stay
open, but haproxy -> app server close between requests. It doesn't really
make sense to me why that would be faster than keeping them all open all the
time, but yes, I should examine my logs and figure out where the holdup is.

I feel like we're getting close! Thank you so much for your help!



On Sun, Jan 30, 2011 at 5:05 AM, Willy Tarreau <w...@1wt.eu> wrote:

> On Sat, Jan 29, 2011 at 04:01:33PM -0700, Sean Hess wrote:
> > Unfortunately, the results are almost exactly the same with haproxy 1.4
> and
> > those changes you recommended. I'm so confused...
>
> Your numbers indicate a big problem somewhere :
>
>  Concurrency Level: 200
>  Requests per second: 176.56 [#/sec] (mean)
>  Time per request: 1132.776 [ms] (mean)
>
> That's much too slow, you should get approximately 100-200 times that.
>
> What do the logs say ? They will report details about where each request
> spends time (connection, headers, response, ...).
>
> One thing that could happen would be that the server ignores the
> "Connection: close" header and maintains the connection opened for
> 1 second. With 1.4, you'd better use "option http-server-close"
> and remove "option httpclose". This option actively closes the
> server-side connection and does not depend on the server's will
> to comply with the request.
>
> Regards,
> Willy
>
>

Reply via email to