RE: HTTP2 use_backend with hdr(host)

2023-11-24 Thread Jason Grammenos
1131 jason.gramme...@agilitypr.com<mailto:jason.gramme...@agilitypr.com> agilitypr.com<https://agilitypr.com/> Learn new PR tips from our free resources<https://www.agilitypr.com/resources/>. From: Jason Grammenos Sent: Friday, November 24, 2023 2:42 PM To: haproxy@formilux.org Subj

HTTP2 use_backend with hdr(host)

2023-11-24 Thread Jason Grammenos
apigateway_preprod_web bind *:8443 ssl crt /etc/ssl/private/redacted.pem crt /etc/ssl/private/ log global mode http use_backend apigateway_preprod_web_back if { hdr(host) -i apigateway.internal } default_backend no_proxy backend apigateway_preprod_web_back mode http option httpchk GET

Re: [PATCH] BUG/MINOR: cfgparse: Fail if the strdup() for `rule->be.name` for `use_backend` fails

2021-01-05 Thread Willy Tarreau
On Sun, Jan 03, 2021 at 10:54:43PM +0100, Tim Duesterhus wrote: > This patch fixes GitHub issue #1024. Merged, thanks! Willy

[PATCH] BUG/MINOR: cfgparse: Fail if the strdup() for `rule->be.name` for `use_backend` fails

2021-01-03 Thread Tim Duesterhus
This patch fixes GitHub issue #1024. I could track the `strdup` back to commit 3a1f5fda109fc56ae127d03eaf34ce027c9542e1 which is 1.9-dev8. It's probably not worth the effort to backport it across this refactoring. This patch should be backported to 1.9+. --- src/cfgparse-listen.c | 4 1

Re: using use_backend rules with map files

2016-03-25 Thread Thierry FOURNIER
Hi, When use_backend is choosed, the evaluation of other use_backend conditions stops. Your configuration just miss a test like this: acl test_path path,map_beg(/etc/haproxy/path2backends.map) -m bool true use_backend bk_%[path,map_beg(/etc/haproxy/path2backends.map)] if test_path

Re: 'acl' and 'use_backend' in defaults section?

2015-04-09 Thread Baptiste
/haproxy/haproxy.cfg:60] : 'acl' not allowed in 'defaults' section. Apr 7 19:05:49 haproxy-test haproxy-systemd-wrapper: [ALERT] 096/190549 (20038) : parsing [/etc/haproxy/haproxy.cfg:62] : 'use_backend' not allowed in 'defaults' section. Apr 7 19:05:49 haproxy-test haproxy-systemd-wrapper

'acl' and 'use_backend' in defaults section?

2015-04-07 Thread Florin Andrei
/haproxy/haproxy.cfg:62] : 'use_backend' not allowed in 'defaults' section. Apr 7 19:05:49 haproxy-test haproxy-systemd-wrapper: [ALERT] 096/190549 (20038) : parsing [/etc/haproxy/haproxy.cfg:63] : 'use_backend' not allowed in 'defaults' section. Apr 7 19:05:49 haproxy-test haproxy-systemd-wrapper

[PATCH] BUG/MINOR: config: don't propagate process binding for dynamic use_backend

2014-10-02 Thread Cyril Bonté
A segfault was reported with the introduction of the propagate_processes() function. It was caused when a use_backend rule was declared with a dynamic name, using a log-format string. The backend is not resolved during the configuration, which lead to the segfault. The patch prevents the process

Re: use_backend map failing me

2014-09-22 Thread Thierry FOURNIER
On Fri, 19 Sep 2014 16:09:32 +0200 Klavs Klavsen k...@vsen.dk wrote: Thomas Heil said the following on 09/19/2014 03:15 PM: [CUT] Maybe this is somewhat better -- use_backend bk_%[hdr(host),lower,map(/etc/haproxy/haproxy-backends.map)] if TRUE -- because its case

use_backend map failing me

2014-09-19 Thread Klavs Klavsen
Hi, I'm running haproxy01 and trying to make this new map feature work, but I get this error: [ALERT] 261/141604 (29621) : Proxy 'cachebackend': unable to find required use_backend: 'bk_%[hdr(host),map(/etc/haproxy/haproxy-backends.map)]'. My config is: frontend cachebackend bind 127.0.0.1:80

Re: use_backend map failing me

2014-09-19 Thread Klavs Klavsen
dooh.. point to correct file and things work.. :) Klavs Klavsen said the following on 09/19/2014 02:18 PM: Hi, I'm running haproxy01 and trying to make this new map feature work, but I get this error: [ALERT] 261/141604 (29621) : Proxy 'cachebackend': unable to find required use_backend

Re: use_backend map failing me

2014-09-19 Thread Baptiste
On Fri, Sep 19, 2014 at 3:09 PM, Klavs Klavsen k...@vsen.dk wrote: dooh.. point to correct file and things work.. :) Hi, I like your config :) Baptiste

Re: use_backend map failing me

2014-09-19 Thread Thomas Heil
Hi, On 19.09.2014 15:12, Baptiste wrote: On Fri, Sep 19, 2014 at 3:09 PM, Klavs Klavsen k...@vsen.dk wrote: dooh.. point to correct file and things work.. :) Hi, I like your config :) Baptiste Maybe this is somewhat better -- use_backend bk_%[hdr(host),lower,map(/etc/haproxy

Re: use_backend map failing me

2014-09-19 Thread Klavs Klavsen
Thomas Heil said the following on 09/19/2014 03:15 PM: [CUT] Maybe this is somewhat better -- use_backend bk_%[hdr(host),lower,map(/etc/haproxy/haproxy-backends.map)] if TRUE -- because its case insensitive about the hostname. Thank you for that very valuable tip

Re: use_backend

2014-06-18 Thread Willy Tarreau
On Wed, May 28, 2014 at 02:15:47PM +0200, Steven Van Ingelgem wrote: How many entries can I add in 1 acl? Because I splitted 1 of the acls up in 14 lines, with each line about 40 items. I think I did it so a human could still read the configuration file, but does that matter for HAProxy? The

use_backend

2014-05-28 Thread Steven Van Ingelgem
goto_server2 hdr_beg(host) -i def. alc goto_test_server src 1.2.3.4 use_backend TestServer if goto_test_server and ( goto_server1 or goto_server2 ) use_backend Server1 if goto_server1 or goto_server2 This would redirect my own IP still to the errors if the server

Re: use_backend

2014-05-28 Thread Baptiste
be: acl goto_server1 hdr_beg(host) -i abc. acl goto_server2 hdr_beg(host) -i def. alc goto_test_server src 1.2.3.4 use_backend TestServer if goto_test_server and ( goto_server1 or goto_server2 ) use_backend Server1 if goto_server1 or goto_server2

Re: use_backend

2014-05-28 Thread Steven Van Ingelgem
be: acl goto_server1 hdr_beg(host) -i abc. acl goto_server2 hdr_beg(host) -i def. alc goto_test_server src 1.2.3.4 use_backend TestServer if goto_test_server and ( goto_server1 or goto_server2 ) use_backend Server1 if goto_server1 or goto_server2

Re: use_backend

2014-05-28 Thread Baptiste
to redirect my own request (based on IP) to 1 specific server. Optimally this would be: acl goto_server1 hdr_beg(host) -i abc. acl goto_server2 hdr_beg(host) -i def. alc goto_test_server src 1.2.3.4 use_backend TestServer if goto_test_server

Re: suppress reqrep / use_backend warning

2014-04-13 Thread Cyril Bonté
Hi Patrick, Le 08/04/2014 23:04, Patrick Hemmer a écrit : Would it be possible to get an option to suppress the warning when a reqrep rule is placed after a use_backend rule? [WARNING] 097/205824 (4777) : parsing [/var/run/hapi/haproxy/haproxy.cfg:1443] : a 'reqrep' rule placed after

Re: suppress reqrep / use_backend warning

2014-04-13 Thread Patrick Hemmer
*From: *Cyril Bonté cyril.bo...@free.fr *Sent: * 2014-04-13 11:15:26 E *To: *Patrick Hemmer hapr...@stormcloud9.net *CC: *haproxy@formilux.org *Subject: *Re: suppress reqrep / use_backend warning Hi Patrick, Le 08/04

suppress reqrep / use_backend warning

2014-04-08 Thread Patrick Hemmer
Would it be possible to get an option to suppress the warning when a reqrep rule is placed after a use_backend rule? [WARNING] 097/205824 (4777) : parsing [/var/run/hapi/haproxy/haproxy.cfg:1443] : a 'reqrep' rule placed after a 'use_backend' rule will still be processed before. I prefer keeping

Re: [PATCH] proxy: support use_backend with dynamic names

2014-04-02 Thread Willy Tarreau
to 24ms earlier). The usage 'use_backend bk_%[hdr(Host)] if TRUE' works for my use-case but originally I was wondering if one could do a map based lookup for the backend. As posted here : http://stackoverflow.com/questions/22025412/how-to-use-thousands-of-backends-in-haproxy

Re: [PATCH] proxy: support use_backend with dynamic names

2014-04-01 Thread Steven Le Roux
- Original Message - From: Steven Le Roux ste...@le-roux.info To: Rajat Chopra rcho...@redhat.com Cc: haproxy haproxy@formilux.org Sent: Monday, March 31, 2014 4:04:55 PM Subject: Re: [PATCH] proxy: support use_backend with dynamic names Hi ! Since I experienced the same behaviour

Re: [PATCH] proxy: support use_backend with dynamic names

2014-03-31 Thread Willy Tarreau
report that it works great! I have been able to route 150k backends with this and the latency added because of the dynamic lookup is in order of microseconds (compared to 24ms earlier). The usage 'use_backend bk_%[hdr(Host)] if TRUE' works for my use-case but originally I was wondering

Re: [PATCH] proxy: support use_backend with dynamic names

2014-03-31 Thread Thomas Heil
it and today I got a chance to test out this patch. I report that it works great! I have been able to route 150k backends with this and the latency added because of the dynamic lookup is in order of microseconds (compared to 24ms earlier). The usage 'use_backend bk_%[hdr(Host)] if TRUE' works for my

Re: [PATCH] proxy: support use_backend with dynamic names

2014-03-31 Thread Bertrand Jacquin
about it and today I got a chance to test out this patch. I report that it works great! I have been able to route 150k backends with this and the latency added because of the dynamic lookup is in order of microseconds (compared to 24ms earlier). The usage 'use_backend bk_%[hdr(Host

Re: [PATCH] proxy: support use_backend with dynamic names

2014-03-31 Thread Steven Le Roux
of microseconds (compared to 24ms earlier). The usage 'use_backend bk_%[hdr(Host)] if TRUE' works for my use-case but originally I was wondering if one could do a map based lookup for the backend. As posted here : http://stackoverflow.com/questions/22025412/how-to-use-thousands-of-backends

Re: [PATCH] proxy: support use_backend with dynamic names

2014-03-31 Thread Rajat Chopra
: [PATCH] proxy: support use_backend with dynamic names Hi ! Since I experienced the same behaviour with a similar configuration, don't you have a huge startup time due to the ACL parsing ? -- Steven Le Roux Le 28 mars 2014 01:59, Rajat Chopra rcho...@redhat.com a écrit : Hi

Re: [PATCH] proxy: support use_backend with dynamic names

2014-03-29 Thread Willy Tarreau
Hi Rajat, On Fri, Mar 28, 2014 at 07:40:45PM -0400, Rajat Chopra wrote: Haproxy 1.5 and earlier cut the lines in words around spaces, so above your expression does not work because it's split in two. Just remove the space before map and it will do exactly what you need. Also I think

Re: [PATCH] proxy: support use_backend with dynamic names

2014-03-28 Thread Willy Tarreau
this patch. I report that it works great! I have been able to route 150k backends with this and the latency added because of the dynamic lookup is in order of microseconds (compared to 24ms earlier). Thanks for the performance measurement. The usage 'use_backend bk_%[hdr(Host)] if TRUE

Re: [PATCH] proxy: support use_backend with dynamic names

2014-03-28 Thread Rajat Chopra
with thousands of servers, one per host) ? We could then imagine something like this : frontend foo use_backend bk_%[hdr(host),map(host_to_backend.map)] bk_host_xxx server 1 ... server 2 ... bk_virtual_hosted use-server srv_%[hdr(host),map(host_to_server.map

Re: [PATCH] proxy: support use_backend with dynamic names

2014-03-27 Thread Rajat Chopra
with this and the latency added because of the dynamic lookup is in order of microseconds (compared to 24ms earlier). The usage 'use_backend bk_%[hdr(Host)] if TRUE' works for my use-case but originally I was wondering if one could do a map based lookup for the backend. As posted here : http

Re: [PATCH] proxy: support use_backend with dynamic names

2014-03-26 Thread Willy Tarreau
to backend and instead use generic and dynamic switching when a sane parameter can be used from user request using the logformat logic. For example when we have a backend farm dedicated to each 'Host: ' http-header, it's pain in the ass to have to declare the backend and the relevant use_backend

[PATCH] proxy: support use_backend with dynamic names

2014-03-23 Thread Bertrand Jacquin
user request using the logformat logic. For example when we have a backend farm dedicated to each 'Host: ' http-header, it's pain in the ass to have to declare the backend and the relevant use_backend. With the proposed solution, you first need to declare a dynamic use_backend as the following

Re: use_backend condition-processing

2013-07-01 Thread bjun...@gmail.com
I'm using 1.4.24. I've tested some cases in the meantime, but these tests don't give a clear answer. Anybody an idea ? 2013/6/26 bjun...@gmail.com bjun...@gmail.com Hi folks, i've a question regarding use_backend and how conditions are processed. My Example: frontend

Re: use_backend condition-processing

2013-07-01 Thread Willy Tarreau
Hi, On Wed, Jun 26, 2013 at 11:20:49AM +0200, bjun...@gmail.com wrote: Hi folks, i've a question regarding use_backend and how conditions are processed. My Example: frontend http_in_01 bind 1.2.3.4:80 log global option httplog capture

use_backend condition-processing

2013-06-26 Thread bjun...@gmail.com
Hi folks, i've a question regarding use_backend and how conditions are processed. My Example: frontend http_in_01 bind 1.2.3.4:80 log global option httplog capture request header Host len 32 capture request header User-Agent len 200 reqidel ^X

help on http post use_backend when dst port is 8080

2013-03-27 Thread qyf128
Hi, All Can anyone help me about haproxy use_backend doesn't work if dst port is 8080, protocol is POST when using 'if HTTP'. The problem is that I want to balance my gateway http traffic to one program (which can proxy traffic, listen on 127.0.0.1:4800). And I write my haproxy.cfg

AW: use_backend: brackets/grouping not accepted in condition

2013-03-22 Thread Christian Ruppert
Hi Baptiste, it is IMHO not really clear that brackets are for anonymous ACLs only. Wouldn't it make sense to support it for use_backend as well? It just makes things easier in my opinion. Mit freundlichen Grüßen, Christian Ruppert Christian Ruppert

Re: use_backend: brackets/grouping not accepted in condition

2013-03-22 Thread Bryan Talbot
On Fri, Mar 22, 2013 at 2:47 AM, Christian Ruppert c.rupp...@babiel.comwrote: Hi Baptiste, it is IMHO not really clear that brackets are for anonymous ACLs only. Wouldn't it make sense to support it for use_backend as well? Those two are not mutually exclusive: you can use them

AW: use_backend: brackets/grouping not accepted in condition

2013-03-22 Thread Christian Ruppert
else to allow one to group the rules instead of writing multiple use_backend lines? For small stuff, like in my example, it would make it slightly “easier”. use_backend if somecondition (foo or bar) vs. use_backend if someconditoon foo use_backend if someconditoon bar Mit freundlichen

use_backend: brackets/grouping not accepted in condition

2013-03-21 Thread Christian Ruppert
Hi Guys, I just tried to simplify some rules and I noticed that brackets {} doesn't work with use_backend while it works fine with default_backend. That doesn't work: use_backend backend_test if request_domain1 { allowed_ip_foo or allowed_ip_bar } That works: use_backend backend_test

Re: use_backend: brackets/grouping not accepted in condition

2013-03-21 Thread Baptiste
Hi Christian, Brackets are for anonymous ACLs only. You seem to use named ACLs with brackets so it can't work. Either you do as you said: use_backend backend_test if request_domain1 allowed_ip_foo or request_domain1 allowed_ip_bar Or with 2 use_backend: use_backend backend_test

Re: problem with sort of caching of use_backend with socket.io and apache

2012-11-29 Thread david rene comba lareu
frontend all 0.0.0.0:80 timeout client 5000 default_backend www_backend acl is_soio url_dom(host) -i socket.io #if the request contains socket.io acl is_chat hdr_dom(host) -i chaturl #if the request comes from chaturl.com use_backend chat_backend if is_chat is_soio backend www_backend

Re: problem with sort of caching of use_backend with socket.io and apache

2012-11-28 Thread david rene comba lareu
#if the request comes from chaturl.com use_backend chat_backend if is_chat is_soio backend www_backend balance roundrobin option forwardfor # This sets X-Forwarded-For timeout server 5000 timeout connect 4000 server server1 localhost:6060 weight 1 maxconn 1024 check #forwards to apache2 backend

Re: problem with sort of caching of use_backend with socket.io and apache

2012-11-28 Thread Baptiste
#if the request contains socket.io acl is_chat hdr_dom(host) -i chaturl #if the request comes from chaturl.com use_backend chat_backend if is_chat is_soio backend www_backend balance roundrobin option forwardfor # This sets X-Forwarded-For timeout server 5000 timeout connect 4000 server server1

Re: problem with sort of caching of use_backend with socket.io and apache

2012-11-24 Thread Willy Tarreau
chaturl.com use_backend chat_backend if is_chat is_soio backend www_backend balance roundrobin option forwardfor # This sets X-Forwarded-For timeout server 5000 timeout connect 4000 server server1 localhost:6060 weight 1 maxconn 1024 check #forwards to apache2 backend chat_backend balance

Re: multiple conditions in use_backend

2012-11-13 Thread Kron
Thank`s a lot! It really works.Shame on me)) Thank you once again and have a nice day! 13.11.2012, 12:23, "Cyril Bonté" cyril.bo...@free.fr:Hi,Le 13/11/2012 09:10, Kron a écrit : Hello to everyone! I have a problem with configuring haproxy with multiple conditions in "us

use_backend complex rules

2010-08-03 Thread Gerardo Corro
Hi HA people, I had a simple use_backend rule that works: acl req_xxx_path path_beg /xxx acl req_yyy_path path_beg /yyy use_backend rule-csp if req_xxx_path or req_yyy_path However I need to make it more complex, it has to filter two possible domains, so I defined these conditions: acl

Re: use_backend complex rules

2010-08-03 Thread Hervé COMMOWICK
Hi, And is implicit so you can (x t) or (d f) Hervé. On Tue, 3 Aug 2010 05:47:20 -0500 Gerardo Corro rob_gar_...@hotmail.com wrote: Hi, Thanks for your email, however and conditions don't work. Is there a workaround? Is there a way to group conditions like if ( x and t) or (d or f)

Re: Problem with keep-alive and use_backend

2010-04-27 Thread Cyril Bonté
Hi, Le mardi 27 avril 2010 13:14:14, Kari Lavikka a écrit : Ok, I actually found something under thread haproxy-1.4.3 and keep-alive status. By default, tunneling is used. Exactly ! The solution would be option http-server-close but Jetty doesn't play nicely. Well thanks anyway :)