Re: Question about substring match (*_sub)

2021-01-22 Thread Илья Шипицин
the following usually works for performance profiling. 1) setup work stand (similar to what you use in production) 2) use valgrind + callgrind for collecting traces 3) put workload 4) aggregate using kcachegrind most probably you were going to do very similar things already :) сб, 23 янв.

Question about substring match (*_sub)

2021-01-22 Thread Aleksandar Lazic
Hi. I would like to take a look into the substring match implementation because of the comment there. http://git.haproxy.org/?p=haproxy.git;a=blob;f=src/pattern.c;h=8729769e5e549bcd4043ae9220ceea440445332a;hb=HEAD#l767 "NB: Suboptimal, should be rewritten using a Boyer-Moore method." Now

Re: Proxy protocol unique id and idle connection

2021-01-22 Thread Amaury Denoyelle
Tim Düsterhus wrote: > Amaury, > Am 21.01.21 um 16:40 schrieb (Amaury Denoyelle): > > I have a question for you on the case of the proxy protocol. One of > > these special parameters to identify a connection is the content of the > > proxy protocol block. However, this breaks the following

Re: HTTP/2 streams - how they're balanced?

2021-01-22 Thread Willy Tarreau
Hi Maksim, On Thu, Jan 21, 2021 at 09:27:33PM +0300, ?? ? wrote: > Hi! > > Can anyone please explain or point out in the documentation how streams in > HTTP/2 connection are balanced? Like any other HTTP stream. There's no relation between H2 streams. There was already no relation

Re: HTTP/2 streams - how they're balanced?

2021-01-22 Thread Максим Куприянов
Thank you, Willy! I will take a try with a new version if it could help :) пт, 22 янв. 2021 г. в 11:43, Willy Tarreau : > Hi Maksim, > > On Thu, Jan 21, 2021 at 09:27:33PM +0300, ?? ? wrote: > > Hi! > > > > Can anyone please explain or point out in the documentation how streams > in

Re: [PATCH 1/1] BUG/MINOR: lua: define _GNU_SOURCE for LLONG_MAX

2021-01-22 Thread Willy Tarreau
On Thu, Jan 21, 2021 at 09:14:07PM +, Bertrand Jacquin wrote: > Lua requires LLONG_MAX defined with __USE_ISOC99 which is set by > _GNU_SOURCE, not necessarely defined by default on old compiler/glibc. (...) Applied, thanks! Willy

Re: [PATCH 1/1] MINOR: lua: remove unused variable

2021-01-22 Thread Willy Tarreau
On Thu, Jan 21, 2021 at 07:14:46PM +, Bertrand Jacquin wrote: > hlua_init() uses 'idx' only in openssl related code, while 'i' is used > in shared code and is safe to be reused. This commit replaces the use of > 'idx' with 'i' (...) Ah you're right, I also met this one one. Now applied,

Re: [PATCH] improve ssl guarding by switching to macro SSL_CLIENT_HELLO_CB instead of openssl version

2021-01-22 Thread Илья Шипицин
ping вт, 19 янв. 2021 г. в 23:24, Илья Шипицин : > Any update on this? > > On Mon, Jan 18, 2021, 3:56 PM Илья Шипицин wrote: > >> we can do nasty thing. >> SSL_CLIENT_HELLO_CB is not defined for BoringSSL, we can (in >> openssl-compat.h) check whether BoringSSL is used and define that macro. >>

Re: [PATCH] improve ssl guarding by switching to macro SSL_CLIENT_HELLO_CB instead of openssl version

2021-01-22 Thread William Lallemand
You could define a HAVE_SSL_* macro like it's done elsewhere in the code, for example "HAVE_SSL_CLIENT_HELLO_CB". On Fri, Jan 22, 2021 at 06:59:58PM +0500, Илья Шипицин wrote: > ping > > вт, 19 янв. 2021 г. в 23:24, Илья Шипицин : > > > Any update on this? > > > > On Mon, Jan 18, 2021, 3:56 PM

[ANNOUNCE] haproxy-2.4-dev6

2021-01-22 Thread Willy Tarreau
Hi, HAProxy 2.4-dev6 was released on 2021/01/22. It added 88 new commits after version 2.4-dev5. These last two weeks have been pretty annoying with a number of regressions popping up into 2.4-dev and slipping into older versions. Most of them are not serious but still, they did affect some

Re: Great content ideas for your blog

2021-01-22 Thread Stella Evans
Hello Haproxy Editorial Team, I hope you are doing well. I believe you might have a busy schedule, just checking in to see if you received my last email about the guest post collaboration. I'd really like to hear what you think. Regards, Stella -Original Message- Hello

Re: [PATCH] improve ssl guarding by switching to macro SSL_CLIENT_HELLO_CB instead of openssl version

2021-01-22 Thread Илья Шипицин
updated patch attached пт, 22 янв. 2021 г. в 19:16, William Lallemand : > You could define a HAVE_SSL_* macro like it's done elsewhere in the > code, for example "HAVE_SSL_CLIENT_HELLO_CB". > > > On Fri, Jan 22, 2021 at 06:59:58PM +0500, Илья Шипицин wrote: > > ping > > > > вт, 19 янв. 2021 г. в

Re: [PATCH] improve ssl guarding by switching to macro SSL_CLIENT_HELLO_CB instead of openssl version

2021-01-22 Thread William Lallemand
On Sat, Jan 23, 2021 at 12:23:01AM +0500, Илья Шипицин wrote: > updated patch attached > Thanks, merged. -- William Lallemand

[PATCH 1/6] MINOR: contrib/prometheus-exporter: better output of Not-a-Number

2021-01-22 Thread William Dauchy
Not necessarily mandatory but I saw a few prometheus client parsing only `NaN`. Also most librarries do output `NaN` Signed-off-by: William Dauchy --- contrib/prometheus-exporter/service-prometheus.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 4/6] MINOR: contrib/prometheus-exporter: use fill_be_stats for backend dump

2021-01-22 Thread William Dauchy
use `stats_fill_be_stats` when possible to avoid duplicating code; make use of field selector to get the needed field only. the only difference is on `haproxy_backend_downtime_seconds_total` as stats.c is testing `px->srv`. This behaviour is present since commit

[PATCH 0/6] backend and server stats reuse

2021-01-22 Thread William Dauchy
Hi Christopher, This is a new series which follows the work done on frontend side. It starts with two minor patches which are more comestic; then it addresses backend and servers. I made sure to not reproduce the same mistake for the default case you just fixed on frontends. There is probably a

[PATCH 3/6] MEDIUM: stats: allow to select one field in `stats_fill_be_stats`

2021-01-22 Thread William Dauchy
prometheus approach requires to output all values for a given metric name; meaning we iterate through all metrics, and then iterate in the inner loop on all objects for this metric. In order to allow more code reuse, adapt the stats API to be able to select one field or fill them all otherwise.

[PATCH 5/6] MEDIUM: stats: allow to select one field in `stats_fill_sv_stats`

2021-01-22 Thread William Dauchy
prometheus approach requires to output all values for a given metric name; meaning we iterate through all metrics, and then iterate in the inner loop on all objects for this metric. In order to allow more code reuse, adapt the stats API to be able to select one field or fill them all otherwise.

[PATCH 6/6] MINOR: contrib/prometheus-exporter: use fill_sv_stats for server dump

2021-01-22 Thread William Dauchy
use `stats_fill_sv_stats` when possible to avoid duplicating code. the following metrics have a change of behaviour: haproxy_server_limit_sessions haproxy_server_queue_limit haproxy_server_check_failures_total haproxy_server_check_up_down_total haproxy_server_downtime_seconds_total

[PATCH 2/6] CLEANUP: stats: improve field selection for frontend http fields

2021-01-22 Thread William Dauchy
while working on backend/servers I realised I could have written that in a better way and avoid one extra break. This is slightly improving readiness. also while being here, fix function declaration which was not 100% accurate. this patch does not change the behaviour of the code. Signed-off-by:

[PATCH] BUILD: ssl: guard SSL_CTX_set_msg_callback with SSL_CTRL_SET_MSG_CALLBACK macro

2021-01-22 Thread Илья Шипицин
Hello, another ssl guard patch Ilya From f39f9f69e29570fa43d7db5a0f08ee9395b98d50 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Sat, 23 Jan 2021 00:50:59 +0500 Subject: [PATCH] BUILD: ssl: guard SSL_CTX_set_msg_callback with SSL_CTRL_SET_MSG_CALLBACK macro --- src/ssl_sock.c | 2 +- 1

[PATCH] spelling fix

2021-01-22 Thread Илья Шипицин
Hello, just one fix. Ilya From adc25a39161a95fe6dba7c4a1c723fba223dca82 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Sat, 23 Jan 2021 02:11:59 +0500 Subject: [PATCH] CLEANUP: assorted typo fixes in the code and comments This is 16th iteration of typo fixes --- src/cache.c | 2 +- 1