Thanks Willy, I appreciate you looking into it. Can you detail how this
new verb might work? From your description it sounds like it will be
just the total connections to a specific backend? Or will
it be more similar to be_sess_rate but for total connections rather
than rate? I am looking to do something like "total connections per host
header" with the idea that I can send 503s if a single host header is
flooding a backend.

-Joe


On Fri, 9 Oct 2009 22:52:38 +0200
Willy Tarreau <[email protected]> wrote:

> On Fri, Oct 09, 2009 at 11:08:09AM -0700, Joe Williams wrote:
> > 
> > I am attempting to limit the number of connections on a per host
> > header basis. Currently each host header has it's own ACL and
> > backend. This allows me to use maxconns and limit the number of
> > connections per host header even if the physical server is the same
> > in both backends.
> > 
> > ###
> > 
> > frontend http_proxy
> >   bind :8080
> > 
> >   acl test1 hdr(host) test1.localhost:8080
> >   
> >   acl test2 hdr(host) test2.localhost:8080
> >   
> >   use_backend test1 if test1
> >   
> >   use_backend test1 if test1
> >     
> > backend test1
> >   server test localhost:5984 maxconn 1000
> >   
> > backend test2
> >   server test localhost:5984 maxconn 1000
> > 
> > ###
> > 
> > What I am wanting to do is use a single backend and decide the
> > connections per host header in the frontend. I took a look at
> > dst_conn and connslots and I don't think they will work for this as
> > I am using a single frontend (dst_conn) and attempting to use a
> > single backend (connslots). The idea would be "if HOSTHEADER has
> > less than 1000 connections forward to SOMEBACKEND".
> > 
> > Is something like this possible?
> 
> I would have sworn there was something like that, but after checking
> the doc it appears I was wrong. I might have confused with
> be_sess_rate().
> 
> It's pretty simple to create a new ACL verb to match on the number of
> connections per backend, as it is for almost anything that appears on
> the stats page BTW. I'm adding that to the short-term TODO list.
> 
> Willy
> 
> 


-- 
Name: Joseph A. Williams
Email: [email protected]
Blog: http://www.joeandmotorboat.com/

Reply via email to