Re: Some thoughts about redispatch

2014-05-26 Thread Dmitry Sivachenko
On 28 нояб. 2012 г., at 18:10, Dmitry Sivachenko wrote: > Hello! > > If haproxy can't send a request to the backend server, it will retry the same > backend 'retries' times waiting 1 second between retries, and if 'option > redispatch' is used, t

Re: Some thoughts about redispatch

2014-05-11 Thread Dmitry Sivachenko
si->err_type = SI_ET_CONN_ERR; si->state = SI_ST_TAR; - si->exp = tick_add(now_ms, MS_TO_TICKS(1000)); + si->exp = tick_add(now_ms, MS_TO_TICKS(0)); return 0; } return 0; On 12 мая 2014 г., at 0:31, Dmi

Re: Some thoughts about redispatch

2014-05-11 Thread Dmitry Sivachenko
Hello, thanks for your efforts on stabilizing -dev version, it looks rather solid now. Let me try to revive an old topic in hope to get rid of my old local patch I must use for production builds. Thanks :) On 28 нояб. 2012 г., at 18:10, Dmitry Sivachenko wrote: > Hello! > > I

Re: haproxy 1.5-dev24: 100% CPU Load or Core Dumped

2014-05-10 Thread Dmitry Sivachenko
On 07 мая 2014 г., at 18:24, Emeric Brun wrote: > > Hi All, > > I suspect FreeBSD to not support process shared mutex (supported in both > linux and solaris). > > I've just made a patch to add errors check on mutex init, and to fallback on > SSL private session cache in error case. Hello,

Re: Patch with some small memory usage fixes

2014-04-28 Thread Dmitry Sivachenko
Hello, > if (groups) free(groups); I think these checks are redundant, because according to free(3): -- If ptr is NULL, no action occurs. On 29 апр. 2014 г., at 3:00, Dirkjan Bussink wrote: > Hi all, > > When building HAProxy using the Clang Static Analyzer, it found a few cases > of invali

Re: balance leastconn does not honor weight?

2014-03-07 Thread Dmitry Sivachenko
On 07 марта 2014 г., at 14:53, Baptiste wrote: > Hi All, > > "When next request(s) arrive, server must to read missing pages back > from disk. It takes time. Server becomes very slow for some time. > I don't want it to be flooded by requests until it starts to respond > fast again. It looks

Re: balance leastconn does not honor weight?

2014-03-07 Thread Dmitry Sivachenko
On 07 марта 2014 г., at 13:02, Willy Tarreau wrote: > On Fri, Mar 07, 2014 at 01:01:04PM +0400, Dmitry Sivachenko wrote: >>>> Now it behaves almost this way but without "honoring specified weights". >>> >>> We cannot honnor both at the same time. Mo

Re: balance leastconn does not honor weight?

2014-03-07 Thread Dmitry Sivachenko
On 07 марта 2014 г., at 12:25, Willy Tarreau wrote: > Hi Dmitry, > > On Fri, Mar 07, 2014 at 12:16:32PM +0400, Dmitry Sivachenko wrote: >> >> On 06 ?? 2014 ??., at 19:29, Dmitry Sivachenko >> wrote: >> >>> Hello! >>> >>&g

Re: balance leastconn does not honor weight?

2014-03-07 Thread Dmitry Sivachenko
On 06 марта 2014 г., at 19:29, Dmitry Sivachenko wrote: > Hello! > > I am using haproxy-1.5.22. > > In a single backend I have servers with different weight configured: 16, 24, > 32 (proportional to the number of CPU cores). > Most of the time they respond very fast. &g

balance leastconn does not honor weight?

2014-03-06 Thread Dmitry Sivachenko
Hello! I am using haproxy-1.5.22. In a single backend I have servers with different weight configured: 16, 24, 32 (proportional to the number of CPU cores). Most of the time they respond very fast. When I use balance leastconn, I see in the stats web interface that they all receive approximate

Re: ACL based on request parameter using POST method

2014-01-30 Thread Dmitry Sivachenko
On 30 янв. 2014 г., at 19:30, Baptiste wrote: > Hu Dmitry, > > In Post, the parameters are in the body. > You may be able to match them using the payload ACLs (HAProxy 1.5 only). > Hello, I tried acl PARAM1 payload(0,500) -m sub test=1 use_backend BE1-back if PARAM1 and it does not match

ACL based on request parameter using POST method

2014-01-30 Thread Dmitry Sivachenko
Hello! (haproxy-1.5-dev21) Using urlp() I can match specific parameter value and dispatch request to different backends based on that value: acl PARAM1 urlp(test) 1 use_backend BE1-back if PARAM1 acl PARAM2 urlp(test) 2 use_backend BE2-back if PARAM2 It works if I specify that parameter using

Re: RES: RES: RES: RES: RES: RES: RES: RES: High CPU Usage (HaProxy)

2013-11-05 Thread Dmitry Sivachenko
On 05 нояб. 2013 г., at 19:33, Fred Pedrisa wrote: > > However, in FreeBSD we can't do that IRQ Assigning, like we can on linux. > (As far I know). > JFYI: you can assign IRQs to CPUs via cpuset -x (I can’t tell you if it is “like on linux” or not though).

Re: compile warning

2013-05-23 Thread Dmitry Sivachenko
On 23.05.2013, at 11:22, joris dedieu wrote: > > For my part I can't reproduce it. > > $ uname -a > FreeBSD mailhost2 9.1-RELEASE-p3 FreeBSD 9.1-RELEASE-p3 #0: Mon Apr 29 > 18:27:25 UTC 2013 > r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 > > $ cc -v > Using built-in

compile warning

2013-05-22 Thread Dmitry Sivachenko
Hello! When compiling the latest haproxy snapshot on FreeBSD-9 I get the following warning: cc -Iinclude -Iebtree -Wall -O2 -pipe -O2 -fno-strict-aliasing -pipe -DFREEBSD _PORTS-DTPROXY -DCONFIG_HAP_CRYPT -DUSE_GETADDRINFO -DUSE_ZLIB -DENABLE_POL L -DENABLE_KQUEUE -DUSE_OPENSSL -DUSE_PCRE

Re: haproy dumps core when unable to resolve host names

2013-03-15 Thread Dmitry Sivachenko
On 15.03.2013, at 15:54, Willy Tarreau wrote: > Hi Dmitry, > > On Fri, Mar 15, 2013 at 03:25:10PM +0400, Dmitry Sivachenko wrote: >> Hello! >> >> I am using haproxy-1.5-dev17. I use hostnames in my config file rather than >> IPs. >> If DNS is not work

haproy dumps core when unable to resolve host names

2013-03-15 Thread Dmitry Sivachenko
Hello! I am using haproxy-1.5-dev17. I use hostnames in my config file rather than IPs. If DNS is not working, haproxy will dump core on start or config check. How to repeat: Put some fake stuff in /etc/resolv.conf so resolver does not work. Run haproxy -c -f : /tmp# ./haproxy -c -f ./haproxy

Re: compress only if response size is big enough

2013-03-02 Thread Dmitry Sivachenko
Hello! What do you guys think? I meant something similar to nginx's gzip_min_length. On 07.02.2013, at 15:56, Dmitry Sivachenko wrote: > Hello! > > It would be nice to add some parameter . > So haproxy will compress HTTP response only if response size is bigger t

compress only if response size is big enough

2013-02-07 Thread Dmitry Sivachenko
Hello! It would be nice to add some parameter . So haproxy will compress HTTP response only if response size is bigger than that value. Because compressing small data can lead to size increase and is useless. Thanks.

max sessions rate on stat page

2012-12-27 Thread Dmitry Sivachenko
Hello! Every time I reload haproxy process, I see on stat page "max session rate" for backends and frontends 2-3 times higher than "current session rate". Even if I open stat page few seconds after reload, and it is 100% reproducible. Seems like haproxy calculates these numbers incorrect during

Re: [ANNOUNCE] haproxy-1.5-dev16

2012-12-26 Thread Dmitry Sivachenko
On 26.12.2012, at 1:03, Willy Tarreau wrote: >> > > This fix is still wrong, as it only accepts one add-header rule, so > please use the other fix posted in this thread by "seri0528" instead. > Thanks a lot! Works now.

Re: [ANNOUNCE] haproxy-1.5-dev16

2012-12-24 Thread Dmitry Sivachenko
Hello! After update from -dev15, the following stats listener: listen stats9 :30009 mode http stats enable stats uri / stats show-node stats show-legends returns 503/Service unavailable. With -dev15 it shows statistics page. On 24.12.2012, at 19:51, Willy Tarreau wrote:

unlink local sockets upon exit

2012-12-11 Thread Dmitry Sivachenko
Hello! Why haproxy does not unlink local sockets (stats socket, other local sockets if there are frontends bound to local unix socket) upon exit? Is there any special reason not to do it? Thanks!

Some thoughts about redispatch

2012-11-28 Thread Dmitry Sivachenko
Hello! If haproxy can't send a request to the backend server, it will retry the same backend 'retries' times waiting 1 second between retries, and if 'option redispatch' is used, the last retry will go to another backend. There is (I think very common) usage scenario when 1) all requests are inde

Re: Need more info on compression

2012-11-28 Thread Dmitry Sivachenko
On 24.11.2012 18:25, Willy Tarreau wrote: > Hi Dmitry, > > On Thu, Nov 22, 2012 at 08:03:26PM +0400, Dmitry Sivachenko wrote: >> Hello! >> >> I was reading docs about HTTP compression support in -dev13 and it is a bit >> unclear to me how it works. >> >

Re: -dev13 dumps core on reload

2012-11-22 Thread Dmitry Sivachenko
On 23.11.2012 11:18, Willy Tarreau wrote: > I'd be interested in knowing if your config enables compression, because > that's an area where we very recently introduced new pools, so there could > be a relation. > It does, but it does not matter: when I comment compression out it also dumps core.

Need more info on compression

2012-11-22 Thread Dmitry Sivachenko
Hello! I was reading docs about HTTP compression support in -dev13 and it is a bit unclear to me how it works. Imagine I have: compression algo gzip compression type text/html text/javascript text/xml text/plain in defaults section. What will haproxy do if: 1) backend server does NOT support co

Re: option accept-invalid-http-request

2012-10-24 Thread Dmitry Sivachenko
On 24.10.2012 19:13, Jonathan Matthews wrote: On 24 October 2012 16:03, Dmitry Sivachenko wrote: Hello! I am running haproxy-1.4.22 with option accept-invalid-http-request turned on (the default). Do you actually mean "off" here? Yes, sorry. It seems that haproxy su

option accept-invalid-http-request

2012-10-24 Thread Dmitry Sivachenko
Hello! I am running haproxy-1.4.22 with option accept-invalid-http-request turned on (the default). It seems that haproxy successfully validates requests with unencoded '%' characted in it: http://some.host.net/api/v1/do_smth?lang=en-ru&text=100%%20Pure%20Mulberry%20Queen (note unencoded %

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

Re: Dump of invalid requests

2012-10-20 Thread Dmitry Sivachenko
On 10/20/12 11:49 PM, Willy Tarreau wrote: Hello Dmitry, On Sat, Oct 20, 2012 at 10:13:47PM +0400, Dmitry Sivachenko wrote: Hello! I am using haproxy-1.4.22. Now I can see the last invalid request haproxy rejected with Bad Request return code with the following command: $ echo "show e

Dump of invalid requests

2012-10-20 Thread Dmitry Sivachenko
Hello! I am using haproxy-1.4.22. Now I can see the last invalid request haproxy rejected with Bad Request return code with the following command: $ echo "show errors" | socat stdio unix-connect:/tmp/haproxy.stats 1) The request seems to be truncated at 16k boundary. With very large GET requ

haproxy-1.4.20 crashes

2012-05-15 Thread Dmitry Sivachenko
Hello! I am using haproxy-1.4.20 on FreeBSD-9. It was running without any problems for a long time, but after recent changes in configuration it began to crash from time to time. GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU Gene

Re: X-Forwarded-For header

2011-03-25 Thread Dmitry Sivachenko
On Thu, Mar 24, 2011 at 09:12:46PM +0100, Willy Tarreau wrote: > Hello Dmitry, > > On Thu, Mar 24, 2011 at 05:28:13PM +0300, Dmitry Sivachenko wrote: > > Hello! > > > > With "option forwardfor", haproxy adds X-Forwarded-For header at the end > >

X-Forwarded-For header

2011-03-24 Thread Dmitry Sivachenko
Hello! With "option forwardfor", haproxy adds X-Forwarded-For header at the end of header list. But according to wikipedia: http://en.wikipedia.org/wiki/X-Forwarded-For and other HTTP proxies (say, nginx) there is standard format to specify several intermediate IP addresses: X-Forwarded-For: cli

X-Forwarded-For and option http-server-close

2011-03-21 Thread Dmitry Sivachenko
Hello! We are using haproxy version 1.4. We are trying to setup HTTP mode backend with support of HTTP keep-alive between clients and haproxy. For that reason we add "option http-server-close" in backend configuration. But we also want to pass real client IP address in X-Forwarded-For header. For

Re: haproxy-1.4.3 and keep-alive status

2010-04-26 Thread Dmitry Sivachenko
On Mon, Apr 26, 2010 at 03:41:03PM +0200, Cyril Bontй wrote: > Hi Dmitry, > > Le lundi 26 avril 2010 13:57:12, Dmitry Sivachenko a йcrit : > > When I put that server behind haproxy (version 1.4.4) I see the following: > > > > > > 1) GET HTTP/1.1 > > Host:

Re: haproxy-1.4.3 and keep-alive status

2010-04-26 Thread Dmitry Sivachenko
On Thu, Apr 08, 2010 at 11:58:25AM +0200, Willy Tarreau wrote: > > 3) I have sample configuration running with option http-server-close and > > without option httpclose set. > > > > I observe the following at haproxy side: > > > > Request comes: > > > > GET / HTTP/1.1 > > Host: host.pp.ru > > U

haproxy-1.4.3 and keep-alive status

2010-04-08 Thread Dmitry Sivachenko
Hello! I am tasting version 1.4.3 of haproxy and I am getting a bit confused with HTTP keep-alive support status. 1) Is server-side HTTP keep-alive supported at all? The existence of option http-server-close makes me beleive that it is enabled unless that option is used. 2) Is it true that clien

Re: [ANNOUNCE] haproxy 1.4-dev5 with keep-alive :-)

2010-01-12 Thread Dmitry Sivachenko
On Mon, Jan 11, 2010 at 09:08:03PM +0100, Willy Tarreau wrote: > > > I mean I want client connecting to haproxy NOT to use keep-alive, > > but to utilize keep-alive between haproxy and backend servers. > > Hmmm that's different. There are issues with the HTTP protocol > itself making this extreme

Re: [ANNOUNCE] haproxy 1.4-dev5 with keep-alive :-)

2010-01-11 Thread Dmitry Sivachenko
On Mon, Jan 04, 2010 at 12:13:49AM +0100, Willy Tarreau wrote: > Hi all, > > Yes that's it, it's not a joke ! > > -- Keep-alive support is now functional on the client side. -- > Hello! Are there any plans to implement server-side HTTP keep-alive? I mean I want client connecting to haproxy N

Re: [PATCH] [MINOR] CSS & HTML fun

2009-10-13 Thread Dmitry Sivachenko
On Tue, Oct 13, 2009 at 02:16:12PM +0200, Benedikt Fraunhofer wrote: > Hello, > > 2009/10/13 Dmitry Sivachenko : > > > End tag for is optional according to > > really? Something new to me :) > OMG, sorry, I am blind. Forget about that.

Re: [PATCH] [MINOR] CSS & HTML fun

2009-10-13 Thread Dmitry Sivachenko
On Mon, Oct 12, 2009 at 11:39:54PM +0200, Krzysztof Piotr Oledzki wrote: > >From 6fc49b084ad0f4513c36418dfac1cf1046af66da Mon Sep 17 00:00:00 2001 > From: Krzysztof Piotr Oledzki > Date: Mon, 12 Oct 2009 23:09:08 +0200 > Subject: [MINOR] CSS & HTML fun > > This patch makes stats page about 30% sm

Re: [PATCH 1/2] [MEDIUM] Collect & show information about last health check

2009-09-07 Thread Dmitry Sivachenko
On Sat, Sep 05, 2009 at 07:00:05PM +0200, Willy Tarreau wrote: > However, I found that it was hard to understand the status codes in > the HTML stats page. Some people are already complaining about columns > they don't trivially understand, but here I think that status codes > are close to cryptic.

Re: redispatch optimization

2009-08-31 Thread Dmitry Sivachenko
On Mon, Aug 31, 2009 at 03:39:35PM +0200, Krzysztof Oledzki wrote: > > PS: another important suggestion is to make that delay tunable > > parameter (like timeout.connect, etc), rather than hardcode > > 1000ms in code. > > Why would you like to change the value? I found 1s very well chosen. In our

redispatch optimization

2009-08-31 Thread Dmitry Sivachenko
Hello! If we are running with 'option redispatch' and 'retries' parameter set to some positive value, the behaviur is as follows: ### In order to avoid immediate reconnections to a server which is restarting, a turn-around timer of 1 second is applied before a retry occurs.

Re: Backend Server UP/Down Debugging?

2009-08-31 Thread Dmitry Sivachenko
On Sun, Aug 30, 2009 at 04:58:16PM +0200, Krzysztof Oledzki wrote: > > > On Sun, 30 Aug 2009, Willy Tarreau wrote: > > > On Sun, Aug 30, 2009 at 04:18:58PM +0200, Krzysztof Oledzki wrote: > >>> I think you wanted to put HCHK_STATUS_L57OK here, not OKD since we're > >>> in the 2xx/3xx state and n

Re: TCP log format question

2009-08-28 Thread Dmitry Sivachenko
> On Thu, Aug 27, 2009 at 06:39:51AM +0200, Willy Tarreau wrote: > Hmmm dontlog-normal only works in HTTP mode. > BTW, the manual explicitly states that 'option dontlog-normal' works in TCP mode. See section 8.2.2 "TCP Log format": # Successful connections will not be logged i

Re: Backend Server UP/Down Debugging?

2009-08-27 Thread Dmitry Sivachenko
On Thu, Aug 27, 2009 at 08:45:23AM +0200, Krzysztof Oledzki wrote: > > On Wed, Aug 26, 2009 at 02:00:42PM -0700, Jonah Horowitz wrote: > >> I???m watching my servers on the back end and occasionally they flap. > >> I???m wondering if there is a way to see why they are taken out of > >> service.

Re: TCP log format question

2009-08-27 Thread Dmitry Sivachenko
On Thu, Aug 27, 2009 at 06:39:51AM +0200, Willy Tarreau wrote: > I'm seeing that you have both "tcplog" and "httplog". Since they > both add a set of flags, the union of both is enabled which means > httplog to me. I should add a check for this so that tcplog disables > httplog. > > > In my log fi

TCP log format question

2009-08-26 Thread Dmitry Sivachenko
Hello! I am running haproxy-1.4-dev2 with the following configuration (excerpt): global log /var/run/loglocal0 user www group www daemon defaults log global modetcp balance roundrobin maxconn 2000 option abort

Compilation of haproxy-1.4-dev2 on FreeBSD

2009-08-24 Thread Dmitry Sivachenko
Hello! Please consider the following patches. They are required to compile haproxy-1.4-dev2 on FreeBSD. Summary: 1) include before 2) Use IPPROTO_TCP instead of SOL_TCP (they are both defined as 6, TCP protocol number) Thanks! --- src/backend.c.orig 2009-08-24 14:49:04.0 +0400 +++ s

Re: Question about TCP balancing

2009-08-06 Thread Dmitry Sivachenko
On Thu, Aug 06, 2009 at 12:03:25AM +0200, Willy Tarreau wrote: > On Wed, Aug 05, 2009 at 12:01:34PM +0400, Dmitry Sivachenko wrote: > > On Wed, Aug 05, 2009 at 06:30:39AM +0200, Willy Tarreau wrote: > > > frontend my_front > > > acl near_usable nbsrv(near) ge 2 > &

Re: Question about TCP balancing

2009-08-05 Thread Dmitry Sivachenko
On Wed, Aug 05, 2009 at 06:30:39AM +0200, Willy Tarreau wrote: > frontend my_front > acl near_usable nbsrv(near) ge 2 > acl far_usable nbsrv(far) ge 2 > use_backend near if near_usable > use_backend far if far_usable > # otherwise error > > backend near > bal

Re: Question about TCP balancing

2009-08-04 Thread Dmitry Sivachenko
Hello! Thanks for clarification. I have another question then (trying to solve my problem in a different way). I want to setup the following configuration. I have 2 sets of servers (backends): let call one set NEAR (n1, n2, n3) and another set FAR (f1, f2, f3). I want to spread incoming request

Question about TCP balancing

2009-08-03 Thread Dmitry Sivachenko
Hello! I am trying to setup haproxy 1.3.19 to use it as TCP load balancer. Relevant portion of config looks like: listen test 0.0.0.0:17000 mode tcp balance roundrobin server srv1 srv1:17100 check inter 2 server srv2 srv2:17100 check inter 2 ser

<    1   2