Re: Some thoughts about redispatch

2014-05-28 Thread Dmitry Sivachenko
On 28 мая 2014 г., at 11:13, Willy Tarreau 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 >no

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

2014-05-31 Thread Dmitry Sivachenko
On 29 мая 2014 г., at 3:04, Willy Tarreau 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 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 result in

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 set

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 wit

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 ) 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 reload it

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 l

Re: Strange memory usage

2014-10-13 Thread Dmitry Sivachenko
On 13 окт. 2014 г., at 14:37, Lukas Tribus 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 >> >> (about

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) Co

Re: About maxconn and minconn

2015-10-08 Thread Dmitry Sivachenko
> On 7 окт. 2015 г., at 16:18, Dmitry Sivachenko 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_RU_EN-back/ 0/1000/-1/-1/1000

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 > to answer leading

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 don't think it has similar sysctl

Re: About maxconn and minconn

2015-10-08 Thread Dmitry Sivachenko
t seen by haproxy and haproxy can't count this time and trigger timeouts. > > On Thu, Oct 8, 2015 at 5:22 AM, Dmitry Sivachenko wrote: > > > On 8 окт. 2015 г., at 3:51, Igor Cicimov > > wrote: > > > > > > The only thing I can think of is you have lef

Re: About maxconn and minconn

2015-10-17 Thread Dmitry Sivachenko
> On 13 окт. 2015 г., at 18:47, Willy Tarreau wrote: > > Hi Dmitry, > > sorry for the delay, I really didn't have time to analyse the config > you sent me. > > A few points below : > > On Wed, Oct 07, 2015 at 04:18:20PM +0300, Dmitry Sivachenko wrote: &g

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 hours of fame wi

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 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_create_cert'

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 wrote: > > On Thu, Oct 22, 2015 at 11:31:01AM +0300, Dmitry Sivachenko wrote: >> >>> On 22 ??. 2015 ??., at 10:44, Willy Tarreau wrote: >>> >>> Hello Dmitry, >>> >>> On Th

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 to comments i

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 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 with gcc48, but it

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 wrote: > > On 2015-10-22 13:59:09 +0300, Dmitry Sivachenko wrote: >>> On 22 окт. 2015 г., at 13:54, Marcus Rueckert wrote: >>> >>> On 2015-10-22 13:38:45 +0300, Dmitry Sivachenko wrote: >>>>

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 USE_GETADDRINFO by de

http-ignore-probes produces a warning in tcp frontend

2016-01-28 Thread Dmitry Sivachenko
Hello, I have an option http-ignore-probes in defaults section. When I declare frontend in "tcp" mode, I get the following warning: [WARNING] 027/172718 (18281) : config : 'option http-ignore-probes' ignored for frontend 'MYTEST-front' as it requires HTTP mode. In defaults section I have other

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 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 frontend in

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 FRO

Re: Using operators in ACLs

2016-02-24 Thread Dmitry Sivachenko
> On 24 Feb 2016, at 01:02, Willy Tarreau 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 >> connections to a particu

Re: Using operators in ACLs

2016-02-24 Thread Dmitry Sivachenko
> On 24 Feb 2016, at 14:07, Willy Tarreau 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? >> Or should I use

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 HTT

Re: Incorrect counters in stats interface

2016-09-07 Thread Dmitry Sivachenko
> On 07 Sep 2016, at 21:10, PiBa-NL 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 screenshots in attachments

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 behalf of the backend server.

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: selecting backend based in server's load

2016-09-19 Thread Dmitry Sivachenko
> On 19 Sep 2016, at 23:42, Dmitry Sivachenko wrote: > > 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 > > b

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 "including

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 reques

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 > server srv2 127.0.0.2:8000 li

Balancing requests and backup servers

2015-02-26 Thread Dmitry Sivachenko
Hello! Given the following configuration backend BC option allbackups server s1 maxconn 30 check server s2 maxconn 30 check server s3 maxconn 30 check server b1 maxconn 30 check backup server b2 maxconn 30 check backup imagine that s1, s2 and s3 have 30 active sessions and (tcp) checks suc

Re: Balancing requests and backup servers

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

Re: Balancing requests and backup servers

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

Re: building haproxy with lua support

2015-03-17 Thread Dmitry Sivachenko
> On 17 марта 2015 г., at 13:17, Thierry FOURNIER wrote: > > On Tue, 17 Mar 2015 08:38:23 +0100 > Baptiste wrote: > >> On Tue, Mar 17, 2015 at 1:51 AM, Joe Williams wrote: >>> List, >>> >>> I seem to be running into issues building haproxy with lua support using >>> HEAD. Any thoughts? >>>

Re: Question on distribution not according to backend weight

2015-05-08 Thread Dmitry Sivachenko
> On 8 мая 2015 г., at 4:54, Frank Schubert 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 reached. I was

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 ba

Re: TCP_NODELAY in tcp mode

2015-08-28 Thread Dmitry Sivachenko
> On 28 авг. 2015 г., at 12:12, Lukas Tribus 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 and > e

Re: TCP_NODELAY in tcp mode

2015-08-28 Thread Dmitry Sivachenko
> On 28 авг. 2015 г., at 12:18, Lukas Tribus 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. Can

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

2015-09-06 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 > > haproxy -f /var/haprox

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)= 4 (0x4) connect

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 >>> option in tc

halog Makefile

2015-09-08 Thread Dmitry Sivachenko
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"): --- Makefile.orig 2015-09-08 17:15:37.423168000 +0300 +++ Makefile2015-09-08 17:14:57.938196000 +0300 @@ -1,7 +1,7 @@ EBTREE_DIR = ../../

Re: halog Makefile

2015-09-08 Thread Dmitry Sivachenko
> On 8 сент. 2015 г., at 17:26, Dmitry Sivachenko 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"): > > --- Makefile.or

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 wrote: > > Hi Dmitry, > > On Tue, Sep 08, 2015 at 05:25:33PM +0300, Dmitry Sivachenko wrote: >> >>> On 30 ??. 2015 ??., at 22:29, Willy Tarreau wrote: >>> >>> On Fri, Aug 28, 2015 at 11:40:18

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&sektion=8 I use it in "prefer ipv4" form, to use ipv4 first when available. All programs like

Re: Address selection policy in dual-stack environments

2015-09-29 Thread Dmitry Sivachenko
> On 29 сент. 2015 г., at 21:26, Willy Tarreau 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 >> selection policy algo

Re: Address selection policy in dual-stack environments

2015-09-30 Thread Dmitry Sivachenko
> On 29 сент. 2015 г., at 23:06, Willy Tarreau 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 makefile. It's not enabled

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 the same I think.

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 > and copying you

Fix haproxy build on recent FreeBSD

2024-02-28 Thread Dmitry Sivachenko
tch to fix that.Please consider including it into the tree.Thanks. patch-src_tools.c Description: Binary data Begin forwarded message:From: Brooks Davis Subject: Re: About libc/libsys splitDate: 28 February 2024, 21:59:36 GMT+3To: Dmitry Sivachenko The attached patch is a more correct solution.  haproxy i

<    1   2