Re: Tune HAProxy in front of a large k8s cluster

2019-02-21 Thread Baptiste
On Wed, Feb 20, 2019 at 3:14 PM Joao Morais wrote: > > > > Em 20 de fev de 2019, à(s) 03:30, Baptiste escreveu: > > > > Hi Joao, > > > > I do have a question for you about your ingress controller design and > the "chained" frontends, summarized below: > > * The first frontend is on tcp mode

Re: Tune HAProxy in front of a large k8s cluster

2019-02-20 Thread Jarno Huuskonen
Hi, On Wed, Feb 20, Baptiste wrote: > I would use a variable instead of a header: > http-request set-var(req.myvar) req.hdr(host),concat(,path) Nitpicking here: AFAIK this won't work as is, because concat expects a variable

Re: Tune HAProxy in front of a large k8s cluster

2019-02-20 Thread Baptiste
On Wed, Feb 20, 2019 at 3:25 PM Joao Morais wrote: > > > > Em 20 de fev de 2019, à(s) 02:51, Igor Cicimov < > ig...@encompasscorporation.com> escreveu: > > > > > > On Wed, 20 Feb 2019 3:39 am Joao Morais > Hi Willy, > > > > > Em 19 de fev de 2019, à(s) 01:55, Willy Tarreau escreveu: > > > > >

Re: Tune HAProxy in front of a large k8s cluster

2019-02-20 Thread Joao Morais
> Em 20 de fev de 2019, à(s) 02:51, Igor Cicimov > escreveu: > > > On Wed, 20 Feb 2019 3:39 am Joao Morais Hi Willy, > > > Em 19 de fev de 2019, à(s) 01:55, Willy Tarreau escreveu: > > > > use_backend foo if { var(req.host) ssl:www.example.com } > > > This is a nice trick that I’m

Re: Tune HAProxy in front of a large k8s cluster

2019-02-20 Thread Joao Morais
> Em 20 de fev de 2019, à(s) 03:30, Baptiste escreveu: > > Hi Joao, > > I do have a question for you about your ingress controller design and the > "chained" frontends, summarized below: > * The first frontend is on tcp mode binding :443, inspecting sni and doing a > triage; >There is

Re: Tune HAProxy in front of a large k8s cluster

2019-02-19 Thread Baptiste
Hi Joao, I do have a question for you about your ingress controller design and the "chained" frontends, summarized below: * The first frontend is on tcp mode binding :443, inspecting sni and doing a triage; There is also a ssl-passthrough config - from the triage frontend straight to a tcp

Re: Tune HAProxy in front of a large k8s cluster

2019-02-19 Thread Baptiste
I would use a variable instead of a header: http-request set-var(req.myvar) req.hdr(host),concat(,path) Baptiste

Re: Tune HAProxy in front of a large k8s cluster

2019-02-19 Thread Igor Cicimov
On Wed, 20 Feb 2019 3:39 am Joao Morais Hi Willy, > > > Em 19 de fev de 2019, à(s) 01:55, Willy Tarreau escreveu: > > > > use_backend foo if { var(req.host) ssl:www.example.com } > > > This is a nice trick that I’m planning to use with dynamic use_backend. I > need to concat host (sometimes

Re: Tune HAProxy in front of a large k8s cluster

2019-02-19 Thread Joao Morais
Hi Willy, > Em 19 de fev de 2019, à(s) 01:55, Willy Tarreau escreveu: > > use_backend foo if { var(req.host) ssl:www.example.com } > This is a nice trick that I’m planning to use with dynamic use_backend. I need to concat host (sometimes ssl_fc_sni) and path. The question is: how do I

Re: Tune HAProxy in front of a large k8s cluster

2019-02-18 Thread Willy Tarreau
Hi Joao, On Mon, Feb 18, 2019 at 09:31:39PM -0300, Joao Morais wrote: > > > > Em 16 de fev de 2019, à(s) 03:16, Willy Tarreau escreveu: > > > > If you have some time to run some extra tests, it would be nice to rebuild > > haproxy with "ARCH_FLAGS=-pg", run it again, stop it using kill -USR1

Re: Tune HAProxy in front of a large k8s cluster

2019-02-18 Thread Joao Morais
> Em 16 de fev de 2019, à(s) 03:16, Willy Tarreau escreveu: > > If you have some time to run some extra tests, it would be nice to rebuild > haproxy with "ARCH_FLAGS=-pg", run it again, stop it using kill -USR1 (not > ctrl-C), and run "gprof haproxy gmon.out". It will show the number of calls

Re: Tune HAProxy in front of a large k8s cluster

2019-02-18 Thread Joao Morais
> Em 16 de fev de 2019, à(s) 03:16, Willy Tarreau escreveu: > > If you have some time to run some extra tests, it would be nice to rebuild > haproxy with "ARCH_FLAGS=-pg", run it again, stop it using kill -USR1 (not > ctrl-C), and run "gprof haproxy gmon.out". It will show the number of calls

Re: Tune HAProxy in front of a large k8s cluster

2019-02-18 Thread Joao Morais
> Em 16 de fev de 2019, à(s) 03:16, Willy Tarreau escreveu: > > If you have some time to run some extra tests, it would be nice to rebuild > haproxy with "ARCH_FLAGS=-pg", run it again, stop it using kill -USR1 (not > ctrl-C), and run "gprof haproxy gmon.out". It will show the number of calls

Re: Tune HAProxy in front of a large k8s cluster

2019-02-18 Thread Joao Morais
> Em 16 de fev de 2019, à(s) 03:16, Willy Tarreau escreveu: > > If you have some time to run some extra tests, it would be nice to rebuild > haproxy with "ARCH_FLAGS=-pg", run it again, stop it using kill -USR1 (not > ctrl-C), and run "gprof haproxy gmon.out". It will show the number of calls

Re: Tune HAProxy in front of a large k8s cluster

2019-02-18 Thread Joao Morais
> Em 16 de fev de 2019, à(s) 03:16, Willy Tarreau escreveu: > > If you have some time to run some extra tests, it would be nice to rebuild > haproxy with "ARCH_FLAGS=-pg", run it again, stop it using kill -USR1 (not > ctrl-C), and run "gprof haproxy gmon.out". It will show the number of calls

Re: Tune HAProxy in front of a large k8s cluster

2019-02-18 Thread Joao Morais
> Em 16 de fev de 2019, à(s) 03:16, Willy Tarreau escreveu: > > If you have some time to run some extra tests, it would be nice to rebuild > haproxy with "ARCH_FLAGS=-pg", run it again, stop it using kill -USR1 (not > ctrl-C), and run "gprof haproxy gmon.out". It will show the number of calls

Re: Tune HAProxy in front of a large k8s cluster

2019-02-18 Thread Joao Morais
> Em 16 de fev de 2019, à(s) 03:16, Willy Tarreau escreveu: > > If you have some time to run some extra tests, it would be nice to rebuild > haproxy with "ARCH_FLAGS=-pg", run it again, stop it using kill -USR1 (not > ctrl-C), and run "gprof haproxy gmon.out". It will show the number of calls

Re: Tune HAProxy in front of a large k8s cluster

2019-02-15 Thread Willy Tarreau
On Fri, Feb 15, 2019 at 08:35:58PM -0200, Joao Morais wrote: > This is just theory - and 5 digits starts on 1 =) . The problem is the > " if " multiplied by 3000 or so. > Moving everything to the backend or a map is a really big step forward. I > suspect my frontend will have about 10 lines

Re: Tune HAProxy in front of a large k8s cluster

2019-02-15 Thread Joao Morais
> Em 15 de fev de 2019, à(s) 19:22, Aleksandar Lazic > escreveu: > > Am 15.02.2019 um 22:11 schrieb Joao Morais: >> >> Hey Aleks, this made my day. Thank you for remember me that map exist and a >> big thank you to The Author of map, map_beg and map_reg converters! Time to >> achieve a 5

Re: Tune HAProxy in front of a large k8s cluster

2019-02-15 Thread Aleksandar Lazic
Am 15.02.2019 um 22:11 schrieb Joao Morais: > >> Em 15 de fev de 2019, à(s) 08:43, Aleksandar Lazic >> escreveu: >> >> Hi Joao. >> >> Am 15.02.2019 um 11:15 schrieb Joao Morais: >>> >>> Hi Aleks, sure. Regarding the config, it has currently about 4k lines >>> only in the largest frontend

Re: Tune HAProxy in front of a large k8s cluster

2019-02-15 Thread Joao Morais
> Em 15 de fev de 2019, à(s) 08:43, Aleksandar Lazic > escreveu: > > Hi Joao. > > Am 15.02.2019 um 11:15 schrieb Joao Morais: >> >> Hi Aleks, sure. Regarding the config, it has currently about 4k lines only >> in the largest frontend because of the number of hostnames and paths being >>

Re: Tune HAProxy in front of a large k8s cluster

2019-02-15 Thread Aleksandar Lazic
Hi Joao. Am 15.02.2019 um 11:15 schrieb Joao Morais: > > >> Em 15 de fev de 2019, à(s) 07:44, Aleksandar Lazic >> escreveu: >> >> Hi Joao. >> >> Am 15.02.2019 um 10:21 schrieb Joao Morais: >>> >>> Hi list, I'm tuning some HAProxy instances in front of a large kubernetes >>> cluster. The

Re: Tune HAProxy in front of a large k8s cluster

2019-02-15 Thread Joao Morais
> Em 15 de fev de 2019, à(s) 07:44, Aleksandar Lazic > escreveu: > > Hi Joao. > > Am 15.02.2019 um 10:21 schrieb Joao Morais: >> >> Hi list, I'm tuning some HAProxy instances in front of a large kubernetes >> cluster. The config has about 500 hostnames (a la apache/nginx virtual >> hosts),

Re: Tune HAProxy in front of a large k8s cluster

2019-02-15 Thread Aleksandar Lazic
Hi Joao. Am 15.02.2019 um 10:21 schrieb Joao Morais: > > Hi list, I'm tuning some HAProxy instances in front of a large kubernetes > cluster. The config has about 500 hostnames (a la apache/nginx virtual > hosts), 3 frontends, 1500 backends and 4000 servers. The first frontend is on > tcp mode

Tune HAProxy in front of a large k8s cluster

2019-02-15 Thread Joao Morais
Hi list, I'm tuning some HAProxy instances in front of a large kubernetes cluster. The config has about 500 hostnames (a la apache/nginx virtual hosts), 3 frontends, 1500 backends and 4000 servers. The first frontend is on tcp mode binding :443, inspecting sni and doing a triage; the second