Re: Dump of invalid requests

2012-10-21 Thread Dmitry Sivachenko

On 10/21/12 12:06 AM, Willy Tarreau wrote:

On Sun, Oct 21, 2012 at 12:01:10AM +0400, Dmitry Sivachenko wrote:

As I wrote in my original e-mail, I use tune.bufsize=32768.  I did not
tweak tune.maxrewrite though.
I will try to decrease maxrewrite to 1024 and see if 'show errors' will
dump more that 16k of URL.

I don't fully understand it's meaning though.
If I need to match up to 25k size requests using reqrep directive, will
tune.bufsize=32768 and tune.maxrewrite=1024 be enough for that?

Yes. The max request that can be read at once is bufsize-maxrewrite. And
since maxrewrite defaults to bufsize/2, I think you were limited to 16k
which is in the same range as your request.




Please consider the following patch for configuration.txt to clarify 
meaning of

bufsize, maxrewrite and the size of HTTP request which can be processed.

Thanks.

--- configuration.txt.orig  2012-08-14 11:09:31.0 +0400
+++ configuration.txt   2012-10-21 18:08:01.0 +0400
@@ -683,6 +683,8 @@
   statistics, and values larger than default size will increase memory 
usage,
   possibly causing the system to run out of memory. At least the 
global maxconn
   parameter should be decreased by the same factor as this one is 
increased.
+  If HTTP request is larger than tune.bufsize - tune.maxrewrite, 
haproxy will

+  return HTTP 400 (Bad Request) error.

 tune.chksize number
   Sets the check buffer size to this size (in bytes). Higher values 
may help

@@ -4346,8 +4348,8 @@
  # replace www.mydomain.com with www in the host name.
  reqirep ^Host:\ www.mydomain.com   Host:\ www

-  See also: reqadd, reqdel, rsprep, section 6 about HTTP header
-manipulation, and section 7 about ACLs.
+  See also: reqadd, reqdel, rsprep, tune.bufsize, section 6 about
+HTTP header manipulation, and section 7 about ACLs.


 reqtarpit  search [{if | unless} cond]



Re: How to run Haproxy on multiple CPU core

2012-10-21 Thread Thomas Heil
Hi,

On 21.10.2012 17:04, freak 16 wrote:
 Hi all,

 How can I run Haproxy on multiple cores? My objective is to run
 Haproxy such that it can service large no of connections (say, in five
 or six digit  figures eg 1, 5, 10) at a time (per sec).

1 up to 10 should be possible on the right hardware, also with
nbproc = 1. How did you run you performance benchmark?

 Will that require any special configuration m/c? I have 8 core m/c
 (Desktop). Should I need to change my Haproxy host m/c?

Of course.
 Right now my haproxy is not able to serve more than 500 conn/sec
 with total no of 50 conn. Is this a issue with haproxy or the host
 m/c?


Thats very few. Please try to unload all firewall related modules and
try again. Have a look at the cpu usage HAProxy consumes and
try running with nbproc =1.

 Thnx

cheers
thomas