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

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

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 balance

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 acl far_usable nbsrv(far) ge 2

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 sys/types.h before netinet/tcp.h 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

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

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 file I see

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 not 404

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

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 o...@ans.pl Date: Mon, 12 Oct 2009 23:09:08 +0200 Subject: [MINOR] CSS HTML fun This patch makes stats page about

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 mi...@cavia.pp.ru: End tag for ul is optional according to really? Something new to me :) OMG, sorry, I am blind. Forget about that.

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 NOT to

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 /some-url HTTP/1.1 Host: host.pp.ru User-Agent:

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:

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 of header list. But according to wikipedia: http

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

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

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 errors

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

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

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. Imagine I have: compression algo gzip compression type

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

Re: [ANNOUNCE] haproxy-1.5-dev16

2012-12-26 Thread Dmitry Sivachenko
On 26.12.2012, at 1:03, Willy Tarreau w...@1wt.eu 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.

compress only if response size is big enough

2013-02-07 Thread Dmitry Sivachenko
Hello! It would be nice to add some parameter min_compress_size. 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.

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 trtrmi...@gmail.com wrote: Hello! It would be nice to add some parameter min_compress_size. So haproxy will compress HTTP response only if response size

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 /path/to/haproxy.conf: /tmp#

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 w...@1wt.eu 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 working, haproxy will dump core on start

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

Re: compile warning

2013-05-23 Thread Dmitry Sivachenko
On 23.05.2013, at 11:22, joris dedieu joris.ded...@gmail.com 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

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 fredhp...@hotmail.com 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 irq (I can’t tell you if it is “like on linux” or not though).

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

Re: ACL based on request parameter using POST method

2014-01-30 Thread Dmitry Sivachenko
On 30 янв. 2014 г., at 19:30, Baptiste bed...@gmail.com 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

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

Re: balance leastconn does not honor weight?

2014-03-07 Thread Dmitry Sivachenko
On 06 марта 2014 г., at 19:29, Dmitry Sivachenko trtrmi...@gmail.com 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. When I

Re: balance leastconn does not honor weight?

2014-03-07 Thread Dmitry Sivachenko
On 07 марта 2014 г., at 12:25, Willy Tarreau w...@1wt.eu wrote: Hi Dmitry, On Fri, Mar 07, 2014 at 12:16:32PM +0400, Dmitry Sivachenko wrote: On 06 ?? 2014 ??., at 19:29, Dmitry Sivachenko trtrmi...@gmail.com wrote: Hello! I am using haproxy-1.5.22. In a single backend

Re: balance leastconn does not honor weight?

2014-03-07 Thread Dmitry Sivachenko
On 07 марта 2014 г., at 13:02, Willy Tarreau w...@1wt.eu 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. Most products I've tested don't *even* do

Re: balance leastconn does not honor weight?

2014-03-07 Thread Dmitry Sivachenko
On 07 марта 2014 г., at 14:53, Baptiste bed...@gmail.com 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.

Re: Patch with some small memory usage fixes

2014-04-29 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 d.buss...@gmail.com wrote: Hi all, When building HAProxy using the Clang Static Analyzer, it found a few

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 eb...@exceliance.fr 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

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 trtrmi...@gmail.com wrote: Hello

Re: Some thoughts about redispatch

2014-05-11 Thread Dmitry Sivachenko
; - 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, Dmitry Sivachenko trtrmi...@gmail.com wrote: Hello, thanks for your efforts on stabilizing -dev version

Re: Some thoughts about redispatch

2014-05-26 Thread Dmitry Sivachenko
On 28 нояб. 2012 г., at 18:10, Dmitry Sivachenko trtrmi...@gmail.com 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, the last retry will go to another

Re: Some thoughts about redispatch

2014-05-28 Thread Dmitry Sivachenko
On 28 мая 2014 г., at 11:13, Willy Tarreau w...@1wt.eu wrote: Hi Dmitry, So worked a bit on this subject. It's far from being obvious. The problem is that at the moment where we decide of the 1s delay before a retry, we don't know if we'll end up on the same server or not. Thus I'm

Re: Some thoughts about redispatch

2014-05-28 Thread Dmitry Sivachenko
On 28 мая 2014 г., at 12:49, Willy Tarreau w...@1wt.eu wrote: On Wed, May 28, 2014 at 12:35:17PM +0400, Dmitry Sivachenko wrote: - otherwise, we redispatch starting on the first retry as you suggest. But then we have two possibilities for the delay before reconnecting. If the server farm

Re: Some thoughts about redispatch

2014-05-28 Thread Dmitry Sivachenko
On 28 мая 2014 г., at 13:06, Willy Tarreau w...@1wt.eu wrote: OK but then you make an interesting point with your very low timeout connect. What about using the min of timeout connect and 1s then ? Thus you can simply use your lower timeout connect as this new timeout. Would that be OK for

Re: Some thoughts about redispatch

2014-05-28 Thread Dmitry Sivachenko
On 28 мая 2014 г., at 11:13, Willy Tarreau w...@1wt.eu wrote: - otherwise, we redispatch starting on the first retry as you suggest. But then we have two possibilities for the delay before reconnecting. If the server farm has more than 1 server and the balance algorithm is not a hash

Re: [ANNOUNCE] haproxy-1.5-dev26 (and hopefully last)

2014-05-31 Thread Dmitry Sivachenko
On 29 мая 2014 г., at 3:04, Willy Tarreau w...@1wt.eu wrote: Yes it does but it doesn't change its verdict. The test is really bogus I think : const char fmt[] = blah; printf(fmt); = OK const char *fmt= blah; printf(fmt); = KO const char * const fmt =

Re: Some thoughts about redispatch

2014-06-16 Thread Dmitry Sivachenko
On 13 июня 2014 г., at 20:00, Willy Tarreau w...@1wt.eu wrote: Done! I've just pushed this. In the end I preferred not to apply this principle to leastconn since there are some situations where leastconn farms can be highly unbalanced (after a server restart) so killing the delay could

keep-alive on server side

2014-06-20 Thread Dmitry Sivachenko
Hello! Is it possible to use HTTP keep-alive between haproxy and backend even if client does not use it? Client closes connection, but haproxy still maintains open connection to backend (based on some timeout) and re-use it when new request arrives. It will save some time for new connection

Feature request: redispatch-on-5xx

2014-06-23 Thread Dmitry Sivachenko
Hello! One more thing which can be very useful in some setups: if backend server returns HTTP 5xx status code, it would be nice to have an ability to retry the same request on another server before reporting error to client (when you know for sure the same request can be sent multiple times

haproxy dumps core on reload

2014-08-02 Thread Dmitry Sivachenko
Hello, I am running haproxy-1.5.2 on FreeBSD-10. After some time of running, when I try to reload it (haproxy -sf oldpid) old process dumps core on exit. I experienced that with -dev21 and ignored in hope this is because of old snapshot. This happens only after some time of running, if I

number of usable servers

2014-08-20 Thread Dmitry Sivachenko
Hello! nbsrv() return the number of usable servers for the backend *excluding* servers marked as backup. Is there any way to get the number of usable servers for the backend *including* backup ones? Thanks!

Strange memory usage

2014-10-12 Thread Dmitry Sivachenko
Hello! I am using haproxy-1.5.4 on FreeBSD-10. Upon startup, it looks like this: PID USERNAME THR PRI NICE SIZERES STATE C TIMEWCPU COMMAND 8459 www 1 370 86376K 28824K CPU16 16 0:16 26.56% haproxy (about 80MB RES) After few days of running, it looks

Re: Strange memory usage

2014-10-13 Thread Dmitry Sivachenko
On 13 окт. 2014 г., at 14:37, Lukas Tribus luky...@hotmail.com wrote: Hi Dmitry, I am using haproxy-1.5.4 on FreeBSD-10. Upon startup, it looks like this: PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 8459 www 1 37 0 86376K 28824K CPU16 16 0:16 26.56% haproxy

Re: building haproxy with lua support

2015-03-17 Thread Dmitry Sivachenko
On 17 марта 2015 г., at 13:17, Thierry FOURNIER tfourn...@haproxy.com wrote: On Tue, 17 Mar 2015 08:38:23 +0100 Baptiste bed...@gmail.com wrote: On Tue, Mar 17, 2015 at 1:51 AM, Joe Williams williams@gmail.com wrote: List, I seem to be running into issues building haproxy with lua

Re: Balancing requests and backup servers

2015-02-27 Thread Dmitry Sivachenko
On 27 февр. 2015 г., at 2:56, Baptiste bed...@gmail.com wrote: On Thu, Feb 26, 2015 at 3:58 PM, Dmitry Sivachenko trtrmi...@gmail.com wrote: Hello! Given the following configuration backend BC option allbackups server s1 maxconn 30 check server s2 maxconn 30 check server s3

Re: Balancing requests and backup servers

2015-02-27 Thread Dmitry Sivachenko
On 27 февр. 2015 г., at 11:52, Baptiste bed...@gmail.com wrote: On Fri, Feb 27, 2015 at 9:02 AM, Dmitry Sivachenko trtrmi...@gmail.com wrote: On 27 февр. 2015 г., at 2:56, Baptiste bed...@gmail.com wrote: On Thu, Feb 26, 2015 at 3:58 PM, Dmitry Sivachenko trtrmi...@gmail.com wrote

Re: Question on distribution not according to backend weight

2015-05-08 Thread Dmitry Sivachenko
On 8 мая 2015 г., at 4:54, Frank Schubert f.schub...@gmail.com wrote: Hi, first of all let me thank you for an amazing piece of software. I like working with haproxy a lot! My problem: The weight setting for a backend seems to be ignored when the max concurrent session setting is

Re: Build failure of 1.6 and openssl 0.9.8

2015-10-22 Thread Dmitry Sivachenko
> On 22 окт. 2015 г., at 10:44, Willy Tarreau <w...@1wt.eu> wrote: > > Hello Dmitry, > > On Thu, Oct 22, 2015 at 10:40:45AM +0300, Dmitry Sivachenko wrote: >> 1.6.1 still does not build with OpenSSL < 1.0: >> >> src/ssl_sock.o: In function `ssl_sock_do

Re: Build failure of 1.6 and openssl 0.9.8

2015-10-22 Thread Dmitry Sivachenko
> On 19 окт. 2015 г., at 17:29, Willy Tarreau wrote: > > Hi Christopher, > > On Mon, Oct 19, 2015 at 03:05:05PM +0200, Christopher Faulet wrote: >> Damned! I generated a huge amount of disturbances with my paches! Really >> sorry for that. > > Shit happens sometimes. I had my

Re: Build failure of 1.6 and openssl 0.9.8

2015-10-22 Thread Dmitry Sivachenko
> On 22 окт. 2015 г., at 13:54, Marcus Rueckert <da...@web.de> wrote: > > On 2015-10-22 13:38:45 +0300, Dmitry Sivachenko wrote: >> I see this warnings with gcc-4.2.1 (shipped with FreeBSD-9), but no warnings >> with clang 3.6.1. >> I see a lot of such warnings

Re: Build failure of 1.6 and openssl 0.9.8

2015-10-22 Thread Dmitry Sivachenko
> On 22 окт. 2015 г., at 14:12, Marcus Rueckert <da...@web.de> wrote: > > On 2015-10-22 13:59:09 +0300, Dmitry Sivachenko wrote: >>> On 22 окт. 2015 г., at 13:54, Marcus Rueckert <da...@web.de> wrote: >>> >>> On 2015-10-22 13:38:45 +0300, D

Re: Build failure of 1.6 and openssl 0.9.8

2015-10-22 Thread Dmitry Sivachenko
> On 22 окт. 2015 г., at 13:14, Marcus Rueckert wrote: > > 3. i can not reproduce the strict alias warnings. > I see this warnings with gcc-4.2.1 (shipped with FreeBSD-9), but no warnings with clang 3.6.1. I see a lot of such warnings with gcc48, but it seems expected according

Re: Build failure of 1.6 and openssl 0.9.8

2015-10-22 Thread Dmitry Sivachenko
> On 22 окт. 2015 г., at 11:45, Willy Tarreau <w...@1wt.eu> wrote: > > On Thu, Oct 22, 2015 at 11:31:01AM +0300, Dmitry Sivachenko wrote: >> >>> On 22 ??. 2015 ??., at 10:44, Willy Tarreau <w...@1wt.eu> wrote: >>> >>> Hello Dmitry, >

Re: [patch] Enable USE_CPU_AFFINITY by default on FreeBSD

2015-11-04 Thread Dmitry Sivachenko
> On 04 Nov 2015, at 23:09, Renato Botelho wrote: > > Change is being used in pfSense and also was added to FreeBSD ports tree. > > Should I send a separate patch for 1.6 branch? > > Thanks > > <0001-Enable-USE_CPU_AFFINITY-by-default-on-FreeBSD.patch> I would also add

Re: About maxconn and minconn

2015-10-08 Thread Dmitry Sivachenko
> On 7 окт. 2015 г., at 16:18, Dmitry Sivachenko <trtrmi...@gmail.com> wrote: > > Hello, > > I am using haproxy-1.5.14 and sometimes I see the following errors in the log: > > Oct 7 08:33:03 srv1 haproxy[77565]: unix:1 [07/Oct/2015:08:33:02.428] > MT-front MT

Re: About maxconn and minconn

2015-10-08 Thread Dmitry Sivachenko
> On 8 окт. 2015 г., at 11:03, Baptiste wrote: > > Hi Dmitry, > > > > Now the question is why such situation. Simply because your queue > management is improperly setup (either increase minconn and or > decrease fullconn) and combined to a server which might be quite slow >

Re: About maxconn and minconn

2015-10-08 Thread Dmitry Sivachenko
> On 8 окт. 2015 г., at 3:51, Igor Cicimov > wrote: > > > The only thing I can think of is you have left net.core.somaxconn = 128, try > increasing it to 4096 lets say to match your planned capacity of 3000 > I forgot to mention that I am using FreeBSD, I

Re: About maxconn and minconn

2015-10-08 Thread Dmitry Sivachenko
n socket accept queue are not seen by haproxy and haproxy can't count this time and trigger timeouts. > > On Thu, Oct 8, 2015 at 5:22 AM, Dmitry Sivachenko <trtrmi...@gmail.com> wrote: > > > On 8 окт. 2015 г., at 3:51, Igor Cicimov <ig...@encompasscorporation.com> &

About maxconn and minconn

2015-10-07 Thread Dmitry Sivachenko
Hello, I am using haproxy-1.5.14 and sometimes I see the following errors in the log: Oct 7 08:33:03 srv1 haproxy[77565]: unix:1 [07/Oct/2015:08:33:02.428] MT-front MT_RU_EN-back/ 0/1000/-1/-1/1000 503 212 - - sQ-- 125/124/108/0/0 0/28 "POST /some/url HTTP/1.1" (many similar at one moment)

TCP_NODELAY in tcp mode

2015-08-27 Thread Dmitry Sivachenko
Hello, we have a client-server application which establish a long-living TCP connection and generates a lot of small request-response packets which need to be processed very fast. Setting TCP_NODELAY on sockets speed things up to about 3 times. Not I want to put a haproxy in the middle so it

Re: TCP_NODELAY in tcp mode

2015-08-28 Thread Dmitry Sivachenko
On 28 авг. 2015 г., at 12:12, Lukas Tribus luky...@hotmail.com wrote: Hello, The flag TCP_NODELAY is unconditionally set on each TCP (ipv4/ipv6) connections between haproxy and the server, and beetwen the client and haproxy. That may be true, however HAProxy uses MSG_MORE to disable

Re: TCP_NODELAY in tcp mode

2015-08-28 Thread Dmitry Sivachenko
On 28 авг. 2015 г., at 12:18, Lukas Tribus luky...@hotmail.com wrote: Use option http-no-delay [1] to disable Nagle unconditionally. This option requires HTTP mode, but I must use TCP mode because our protocol is not HTTP (some custom protocol over TCP) Ok, you may be hitting a bug.

Re: haproxy resolvers "nameserver: can't connect socket" (on FreeBSD)

2015-09-07 Thread Dmitry Sivachenko
> On 7 сент. 2015 г., at 9:36, Lukas Tribus wrote: > > > > Best would be to strace this, but this is Freebsd amd64, > so that doesn't work. Can you trace the syscalls with > the strace equivalent at least? It fails that way: socket(PF_INET,SOCK_DGRAM,17)

Re: haproxy resolvers "nameserver: can't connect socket" (on FreeBSD)

2015-09-07 Thread Dmitry Sivachenko
> On 7 сент. 2015 г., at 1:46, PiBa-NL wrote: > > Hi guys, > > Hoping someone can shed some light on what i might be doing wrong? > Or is there something in FreeBSD that might be causing the trouble with the > new resolvers options? > > Thanks in advance. > PiBa-NL >

Re: TCP_NODELAY in tcp mode

2015-09-08 Thread Dmitry Sivachenko
> On 30 авг. 2015 г., at 22:29, Willy Tarreau wrote: > > On Fri, Aug 28, 2015 at 11:40:18AM +0200, Lukas Tribus wrote: Ok, you may be hitting a bug. Can you provide haproxy -vv output? >>> >>> >>> What do you mean? I get the following warning when trying to use this

Re: halog Makefile

2015-09-08 Thread Dmitry Sivachenko
> On 8 сент. 2015 г., at 17:26, Dmitry Sivachenko <trtrmi...@gmail.com> wrote: > > Hello, > > Can you please apply the following patch to contrib/halog/Makefile not to > override $CC (on some systems compiler is called "cc", not "gcc"): &

About CPU usage

2015-09-10 Thread Dmitry Sivachenko
Hello, I have a haproxy-1.5.11 with a single frontend passing requests to a single backend in TCP mode (sample config). Application establishes several long-living tcp connections and sends a lot of small requests over them. In my test case I have 2 simultaneous TCP connections producing about

Re: TCP_NODELAY in tcp mode

2015-09-11 Thread Dmitry Sivachenko
> On 8 сент. 2015 г., at 18:33, Willy Tarreau <w...@1wt.eu> wrote: > > Hi Dmitry, > > On Tue, Sep 08, 2015 at 05:25:33PM +0300, Dmitry Sivachenko wrote: >> >>> On 30 ??. 2015 ??., at 22:29, Willy Tarreau <w...@1wt.eu> wrote: >>> >>

Address selection policy in dual-stack environments

2015-09-29 Thread Dmitry Sivachenko
Hello, in case when machine has both A and records, there is an address selection policy algorithm which determines which address to use first. https://www.freebsd.org/cgi/man.cgi?query=ip6addrctl=8 I use it in "prefer ipv4" form, to use ipv4 first when available. All programs like ssh

Re: Address selection policy in dual-stack environments

2015-09-30 Thread Dmitry Sivachenko
> On 29 сент. 2015 г., at 23:06, Willy Tarreau <w...@1wt.eu> wrote: > > On Tue, Sep 29, 2015 at 10:59:15PM +0300, Dmitry Sivachenko wrote: >>> I *think* that getaddrinfo() provides this. You can try to build by >>> adding USE_GETADDRINFO=1 to your make

Re: Linux or FreeBSD ?

2015-09-30 Thread Dmitry Sivachenko
> On 30 сент. 2015 г., at 16:05, Arnall wrote: > > Hi Eveyone, > > just a simple question, is FreeBSD a good choice for Haproxy ? > Our Haproxy runs under Debian for years, but the new IT want to put it under > FreeBSD. > Any cons ? > > Thanks. > Should be roughly

Re: Address selection policy in dual-stack environments

2015-10-01 Thread Dmitry Sivachenko
> On 30 сент. 2015 г., at 23:28, Willy Tarreau wrote: > > > I think that you did a good job and that you're perfectly right. I even > checked on one of my older systems and the text was the same in 2008. > > Could you please write a commit message describing the initial issue >

Re: Address selection policy in dual-stack environments

2015-09-29 Thread Dmitry Sivachenko
> On 29 сент. 2015 г., at 21:26, Willy Tarreau <w...@1wt.eu> wrote: > > Hi Dmitry, > > On Tue, Sep 29, 2015 at 08:08:51PM +0300, Dmitry Sivachenko wrote: >> Hello, >> >> in case when machine has both A and records, there is an address >> sele

Re: http-ignore-probes produces a warning in tcp frontend

2016-02-04 Thread Dmitry Sivachenko
> On 04 Feb 2016, at 07:04, Willy Tarreau <w...@1wt.eu> wrote: > > Hello Dmitry, > > On Thu, Jan 28, 2016 at 05:31:58PM +0300, Dmitry Sivachenko wrote: >> Hello, >> >> I have an option http-ignore-probes in defaults section. >> When I declare fronte

Re: Using operators in ACLs

2016-02-24 Thread Dmitry Sivachenko
> On 24 Feb 2016, at 14:07, Willy Tarreau <w...@1wt.eu> wrote: > > On Wed, Feb 24, 2016 at 01:36:39PM +0300, Dmitry Sivachenko wrote: >> I do have "mode http" (I intentionally put it here with a comment). >> Will it work only for tcp-mode frontend? >> O

Re: Using operators in ACLs

2016-02-24 Thread Dmitry Sivachenko
> On 24 Feb 2016, at 01:02, Willy Tarreau <w...@1wt.eu> wrote: > > Hi Dmitry, > > On Fri, Feb 19, 2016 at 05:58:47PM +0300, Dmitry Sivachenko wrote: >> Hello, >> >> I want to define ACL which will evaluate to true if a current number of >> connec

Using operators in ACLs

2016-02-19 Thread Dmitry Sivachenko
Hello, I want to define ACL which will evaluate to true if a current number of connections to a particular backend is greater than a number of usable servers in that backend multiplied on some constant: be_conn(BACK) > nbsrv(BACK) * N So far I came up with the following solution: frontend

Re: Incorrect counters in stats interface

2016-09-08 Thread Dmitry Sivachenko
> On 07 Sep 2016, at 23:12, David Birdsong wrote: > > Queue Cur is a gauge and so not representative of historical values. > > Queue Max of zero is telling though. > > In addition to queue timeout, there are other ways haproxy can synthesize an > http response on

Incorrect counters in stats interface

2016-09-07 Thread Dmitry Sivachenko
Hello, (sorry for reposting, but I do not see my e-mail in ML archive, so I assume it was blocked due to screenshots in attachments. I replace them with links now). I am using haproxy-1.6.9. In web stats interface, I mouse-over backend's Total Sessions counter (1728 in my case), and I see

About tune.vars.reqres-max-size

2016-09-21 Thread Dmitry Sivachenko
Hello, after reading documentation about tune.vars.global-max-size tune.vars.reqres-max-size tune.vars.sess-max-size tune.vars.txn-max-size I see no default values here. Can you clarify please? Also it is not obvious for me if tune.vars.reqres-max-size limit applies to every single

Re: selecting backend based in server's load

2016-09-19 Thread Dmitry Sivachenko
> On 19 Sep 2016, at 23:42, Dmitry Sivachenko <trtrmi...@gmail.com> wrote: > > Hello, > > imagine the following configuration: > > frontend F1 > use_backend BACKUP_B1 if B1_IS_FULL > default_backend B1 > > backend B1 > server s_i > ... >

srv_conn vs be_conn

2016-09-20 Thread Dmitry Sivachenko
Hello, I have few questions: 1) in documentation about srv_conn we have: --- Returns an integer value corresponding to the number of currently established connections on the designated server, possibly including the connection being evaluated. What does it mean

selecting backend based in server's load

2016-09-19 Thread Dmitry Sivachenko
Hello, imagine the following configuration: frontend F1 use_backend BACKUP_B1 if B1_IS_FULL default_backend B1 backend B1 server s_i ... server s_j backend BACKUP_B1 server b_i ... server b_j - frontend F2 use_backend BACKUP_B2 if B2_IS_FULL default_backend B2 backend B2 server s_k

Re: Incorrect counters in stats interface

2016-09-07 Thread Dmitry Sivachenko
> On 07 Sep 2016, at 21:10, PiBa-NL <piba.nl@gmail.com> wrote: > > Hi Dmitry, > Op 7-9-2016 om 15:54 schreef Dmitry Sivachenko: >> Hello, >> >> (sorry for reposting, but I do not see my e-mail in ML archive, so I assume >> it was blocked due to s

Re: Backend per-server rate limiting

2016-09-28 Thread Dmitry Sivachenko
> On 28 Sep 2016, at 10:49, Stephan Müller wrote: > > Hi, > > i want to configure a rate limit (say 100 http req/sec) for each backend > server like this: > > listen front > bind :80 > balance leastconn > server srv1 127.0.0.1:8000 limit 100 >

Re: lua support does not build on FreeBSD

2016-12-14 Thread Dmitry Sivachenko
> On 14 Dec 2016, at 16:24, David CARLIER wrote: > > Hi, > > I ve made a small patch for 1.8 branch though. Does it suit ? (ie I > made all the fields available, not sure if would be useful one day). > Well, I was not sure what this s6_addr32 is used for and if it is

lua support does not build on FreeBSD

2016-12-13 Thread Dmitry Sivachenko
Hello, I am unable to build haproxy-1.7.x on FreeBSD: cc -Iinclude -Iebtree -Wall -O2 -pipe -O2 -fno-strict-aliasing -pipe -fstack-protector -DFREEBSD_PORTS-DTPROXY -DCONFIG_HAP_CRYPT -DUSE_GETADDRINFO -DUSE_ZLIB -DENABLE_POLL -DENABLE_KQUEUE -DUSE_CPU_AFFINITY -DUSE_OPENSSL

Re: lua support does not build on FreeBSD

2016-12-23 Thread Dmitry Sivachenko
> On 23 Dec 2016, at 19:07, thierry.fourn...@arpalert.org wrote: > > Ok, thanks Willy. > > The news path in attachment. David, can you test the FreeBSD build ? > The patch is tested and validated for Linux. Yes, it does fix FreeBSD build. > > Thierry > > > On Fri, 23 Dec 2016 14:50:38

Re: Problems with haproxy 1.7.3 on FreeBSD 11.0-p8

2017-03-19 Thread Dmitry Sivachenko
> On 19 Mar 2017, at 14:40, Willy Tarreau wrote: > > Hi, > > On Sat, Mar 18, 2017 at 01:12:09PM +0100, Willy Tarreau wrote: >> OK here's a temporary patch. It includes a revert of the previous one and >> adds a condition for the wake-up. At least it passes all my tests, including

  1   2   >