Re: Debugging tool for HAProxy

From: Willy Tarreau <>
Date: Thu, 17 Apr 2008 22:03:43 +0200

On Thu, Apr 17, 2008 at 08:35:41AM -0700, Christoph Dorn wrote:
> > Well, I don't know, I've never used such a tool, so I don't really
> > know if it can provide any help. Also, I think that it could cause
> > a major performance hit, so I don't know if a lot of people would
> > use it.
> => Right. I guess the impact of this depends on which stage of your
> deployment it is used.

You mean if you're using it just at the beginning when performance is not a problem, right ? In this case, yes I can agree. Anyway, the added hooks should carefully be implemented so that they do not impact the performance when disabled.

> > Also, I'm wondering about something. While I understand what it can
> > bring to an application, I have more doubts in the case of a proxy,
> > because if you use the response headers to add your data, you are
> > limited to statistics you know before getting the data. An application
> > would know everything at this stage, but a proxy's useful statistics
> > are not limited to what is known at this stage. Maybe I'm missing
> > something ?
> => No. You are right. I never thought about that. I guess we need to
> invent response "footers" for this purpose :)

HTTP/1.1 already supports this, it's what's called "trailers". But your browser has to explicitly state that it supports them before you use them in a response. A trailer is simply a a header which you send after the end of the body, and before the next response. Seems scary (it is) but it's useful when you want to save your server from doing the same job twice. For instance, instead of reading a large file to compute its MD5 signature, then reading it again to send it, it's possible to read/send/sign on the fly, then report the signature after all data has been sent.

I have no idea about the browsers which support it though. Some proxies may even not like it at all.

> > But from what I see in your example, there are several headers
> > (X-FirePHP-Data-XXXXXX), or is it instead just one header
> > (X-FirePHP-Data) which starts with the numeric index ?
> => They are separate headers and if one log item becomes to large it can
> be split across multiple headers.

OK, that's a good idea.

Willy Received on 2008/04/17 22:03

This archive was generated by hypermail 2.2.0 : 2008/04/17 22:30 CEST