On Wed, Jul 28, 2010 at 05:51:18PM -0700, Bryan Talbot wrote: > I'm trying to figure out what _exactly_ the CD termination code means. The > docs says: > > CD The client unexpectedly aborted during data transfer. This can be > caused by a browser crash, by an intermediate equipment between the > client and haproxy which decided to actively break the connection, > by network routing issues between the client and haproxy, or by a > keep-alive session between the server and the client terminated > first > by the client. > > > Does this mean that clients MUST have not received some of the data or > could a client have received all of the data from the response?
it means that the client closed the response socket before all data was consumed. > What's an unexpected abortion vs a normal termination? An unexpected abortion is when the system reports a socket error while there were still some data to send in the buffer. A normal termination is when there is no error and that all pending data were sent before the client closed. > I have a client (windows using a MS xml library to make http requests) > which always ends up with CD-- terminations, but the software seems to > work properly otherwise. It is possible that this client only needs something at the very beginning of the response and that it aborts connections once it gets what it needs. This is what happens with health checks too if too large objects are sent in response. From a protocol point of view this can be seen as dirty, but if the client does not need anything else, it results in cheaper network use because less data get transferred. If you're sure to see this for every request, it would be nice to get a capture of a full request/response from both sides to see what it looks like (use tcpdump -s0 to get full packets). I suspect that you'll see an RST packet coming from the client to haproxy while haproxy is sending data. Regards, Willy

