On Wed, Aug 05, 2009 at 12:01:34PM +0400, Dmitry Sivachenko wrote:
> On Wed, Aug 05, 2009 at 06:30:39AM +0200, Willy Tarreau wrote:
> > frontend my_front
> >     acl near_usable nbsrv(near) ge 2
> >     acl far_usable  nbsrv(far)  ge 2
> >     use_backend near if near_usable
> >     use_backend far  if far_usable
> >     # otherwise error
> > 
> > backend near
> >     balance roundrobin
> >     server near1 1.1.1.1 check
> >     server near2 1.1.1.2 check
> >     server near3 1.1.1.3 check
> > 
> > backend far
> >     balance roundrobin
> >     server far1  2.1.1.1 check
> >     server far2  2.1.1.2 check
> >     server far3  2.1.1.3 check
> > 
> 
> Aha, I already came to such a solution and noticed it works only
> in HTTP mode.
> Since I actually do not want to parse HTTP-specific information,
> I want to stay in TCP mode (but still use ACL with nbsrv).
> 
> So I should stick with 1.4 for that purpose, right?

exactly. However, keep in mind that 1.4 is development, and if
you upgrade frequently, it may break some day. So you must be
careful.

> Or does HTTP mode acts like TCP mode unless I actually use
> something HTTP-specific?
> In other words, will the above configuration (used in HTTP mode)
> actually try to parse HTTP headers (and waste cpu cycles for that)?

It will try to parse an HTTP request and will send a 400 bad request
as soon as the request does not match the HTTP protocol. So you'll
be out of luck if it's not HTTP.

Willy


Reply via email to