HAProxy 1.8.21: One CPU core stuck at 100%

2019-10-13 Thread Amin Shayan
Hello,

I've several installations with different config and usage on 1.8.21 and no
problem so far. I found one installation on a cluster of 6 servers, which
all of them had one cpu core stuck at 100% and Idle_pct lower than 10.
I've played with nproc and nbthread and other values with no luck so
upgraded from 1.8.21 to 1.8.21-ba3abe-12 and it was the same.
After comparing other installations with this one found that this is the
only cluster with allow-0rtt enabled. removed allow-0rtt from bind options
and it didn't happen in last 10 days!

Hope it helps to have more stable 1.8.22 :)

Sincerely,
Amin Shayan


Re: HTTP version log format for http2

2019-01-16 Thread Amin Shayan
Hi Willy,

Thanks for the workaround and explanation. Works as expected.

Sincerely,
Amin Shayan


On Wed, Jan 16, 2019 at 6:15 PM Willy Tarreau  wrote:

> Hi Amin,
>
> On Mon, Dec 31, 2018 at 05:23:17PM +0100, Amin Shayan wrote:
> > Hi guys,
> >
> > I'm trying to get clients request http version and it seems %HV which is
> > the last field of %r works fine for http/0.9,1.0,1.1. However I get
> > http/1.1 on logs for http2 requests.
> >
> > Using HAProxy 1.8.16, Is there still below limitation?
> >
> >   - no trivial way to report HTTP/2 in the logs. I'm using a sample
> > fetch function reporting the on-wire format as 1 or 2 for now. I
> > considered replacing "HTTP/1.1" with "HTTP/2.0" in the logs but
> > that's inaccurate since we really process "1.1" so it might be
> > confusing to those dealing with regex which don't seem to match,
> > and in addition "HTTP/2.0" is not the correct version string, the
> > correct one is "HTTP/2". But writing this without the dot and the
> > minor version is going to break some log processing tools. Thus I
> > was thinking about having some optional fields that are supposed
> > to be easy to use. Note that we had the same issue with SSL long
> > ago, ending with "~" after the frontend's name in the logs...
> > Better avoid this for H2. Ideas are welcome.
>
> Yes that's true for 1.8. However there is a sample fetch function called
> "fc_http_major" which returns the major protocol number on the frontend
> connection (1 for 0.9-1.1, 2 for 2.0). You could thus add something like
> this to your log-format :
>
>... HTTP/%[fc_http_major]
>
> Hoping this helps,
> Willy
>


HTTP version log format for http2

2018-12-31 Thread Amin Shayan
Hi guys,

I'm trying to get clients request http version and it seems %HV which is
the last field of %r works fine for http/0.9,1.0,1.1. However I get
http/1.1 on logs for http2 requests.

Using HAProxy 1.8.16, Is there still below limitation?

  - no trivial way to report HTTP/2 in the logs. I'm using a sample
fetch function reporting the on-wire format as 1 or 2 for now. I
considered replacing "HTTP/1.1" with "HTTP/2.0" in the logs but
that's inaccurate since we really process "1.1" so it might be
confusing to those dealing with regex which don't seem to match,
and in addition "HTTP/2.0" is not the correct version string, the
correct one is "HTTP/2". But writing this without the dot and the
minor version is going to break some log processing tools. Thus I
was thinking about having some optional fields that are supposed
to be easy to use. Note that we had the same issue with SSL long
ago, ending with "~" after the frontend's name in the logs...
Better avoid this for H2. Ideas are welcome.

Sincerely,
Amin Shayan