On Mon, 2014-02-24 at 11:59 +0000, sebb wrote: ...
> > Sadly, this just does not seem to work well with Java classic (blocking) > > I/O model. We, as a project, have been battling this problem for over 10 > > years as far as I remember. Sometimes small requests can fully written > > into some kind of internal output buffer even though the underlying > > connection is no longer valid. I/O exception is thrown only on the > > subsequent read attempt. > > I'd forgotten that - long time since I worked on raw TCP. > > Did you ever experiment with disabling Nagle's algorithm? > Just curious. > Nagle's is off by default. I have never tried running any extensive tests with Nagle's on. From a performance standpoint Nagle's is likely to be massively more expensive than the stale connection check, though. > > > >> For example after sending the first line of the request, would it be > >> possible to somehow check if the connection has been dropped? > >> And could this be done without compromising the performance? > >> > > > > It would hardly be any different than the stale check used presently. > > In which case, is is possible to implement a conditional stale check? > e.g. every n requests or after a certain idle time? > That should reduce the overhead considerably. > It is certainly possible, but the check would likely need to be performed by the connection manager (which may not necessarily be such a bad idea). Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
