Yes, I can. It's actually what I've decided to do in order to not have to recompile haproxy and redeploy it on all the machines that will be running the configuration. Since my configuration is being built by a perl script, readability of the generated configuration was less of an issue for me.
This however comes to another question: is there a priority to the and and or clauses in the use_backend directive?
acl host_site_23 hdr(host) -i www.example.com acl host_site_24 hdr(host) -i www.example.fr acl static_site_23 path_beg /static
Would this be evaluated as "www.example.com/static" or "www.example.fr", or as being "www.example.com/static" or "www.example.fr/static", or not unless I added the implicit and of static_site_23 to each "host*" acl like this:
use_backend example_static_backend if static_site_23 host_site_23 or static_site_23 host_site_24
My goal is to have the same site available through completely different domain names, but with the same functionality in terms of forwarding to a separate backend for static content. At the same time, I do realize that I would have to always have the more specific use_backend directives for static content first, and then the others.
In the current setup, we have all possible different sites, and all the different domain names for the sites, under the same frontend.
In the future, I'm expecting that dividing each "site" into it's own backend on a different port, using use_backend directives only for the special paths that redirect to specific backends and using the default_backend directive may be a wiser choice, especially since the config is generated by a script.
> -----Original Message-----
> From: Willy Tarreau [mailto:w#1wt.eu]
> Sent: July 16, 2008 12:47 PM
> To: Mathieu Trudel
> Cc: haproxy#formilux.org
> Subject: Re: Design decisions: MAX_LINE_ARGS in
> On Tue, Jul 15, 2008 at 10:08:28PM -0400, Mathieu Trudel wrote:
> > Hi,
> > I'm running into a problem with HAProxy parsing my configuration,
> > includes fairly complicated and long ACLs for redirecting to
> > backends. I've looked on the website and mailing list archive, but
> > couldn't find anything.
> > So, haproxy fails to parse my configuration because of the size of
> > use_backend directive. I've noted that increasing MAX_LINE_ARGS in
> > include/common/defaults.h to 128, for example, fixes the problem,
> > I'm wondering if there is a specific performance or other reason for
> > setting the line arguments limit at 64?
> no, you can push it as long as you want. We have arbitrarily limited
> to a small value because long lines don't look much manageable and
> be a bit discouraged. Can't you cut your lines into multiple
> statements ?
Received on 2008/07/16 19:12
This archive was generated by hypermail 2.2.0 : 2008/07/16 19:15 CEST