2011/7/12 Willy Tarreau <[email protected]>

> On Tue, Jul 12, 2011 at 10:42:31AM +0200, Damien Hardy wrote:
> > 2011/7/12 Willy Tarreau <[email protected]>
> >
> > >
> > > Then you can use the errorfile method : you send your request to a
> > > backend without any server (which will produce an error 503) and you
> > > use "errorfile 503 /path/to/file" to return this file instead of the
> > > error 503. Some people use this to serve a few static files.
> > >
> >
> > If it reply 200 it could be the good thing
>
> The file is HTTP and not HTML, so you put the status code you want in
> it with whatever header you like.
>
> > > > Maybe haproxy could send the well know tiny "transparent pixel" on
> > > > demand without even go through caching servers. #featurerequest :)
> > >
> > > I'm not sure what well known method you're speaking about. However,
> > > the "return" feature is planned in the roadmap in order to be able
> > > to return static contents or a specific file. It's just not implemented
> > > yet.
> > >
> >
> > This is exactly the feature I was thinking (transparent pixel is a
> classic
> > small resources used to make design fit well or getting some stats via
> logs
> > like google analitics or xity tags)
> > called with an html img tag it works even when javascript is disabled :)
>
> OK I did not understand you were talking about that.
>
> Regards,
> Willy
>
>
I have done some tests.
The errorfile 503 directive on empty backend do the job from the client
point of view but to be very perfect I would like there is no 503 error code
in my haproxy logs.

Jul 12 15:11:41 ip6-localhost haproxy[16185]:
10.147.28.20:49423[12/Jul/2011:15:11:41.362] varnish tag/<NOSRV>
0/-1/-1/-1/0 503 190 - - SC--
0/0/0/0/0 0/0 {vhost||Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101
Firefox/5.0} "GET
/stat?action=view&resources=123+456+789(&session=423)(&[email protected])
HTTP/1.1"

Thank you,

Waiting for the "return" feature.

Regards,

-- 
Damien

Reply via email to