tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Esmond Pitt" <>
Subject RE: Handling requests when under load - ACCEPT and RST vs non-ACCEPT
Date Wed, 07 Nov 2012 23:27:26 GMT

Hi Esmond
>> That wouldn't have any different effect to not calling accept() at all 
>> in blocking mode
> Clearly there is a difference.

There isn't a difference. All that deregistering OP_ACCEPT does is prevent
the application from calling accept(). It has exactly the same effect as
thread-starving the accepting thread in blocking mode. I have written books
on Java networking and I do know about this. Your 3-line program allows > 1
connection at a time because of the backlog queue, as I have been
explaining, and when the backlog queue fills up, as it does when the
application doesn't call accept() fast enough, or at all, you get
platform-dependent behaviour. There is nothing you can do about this in Java
or indeed in C either. A program that created a ServerSocketChannel, didn't
register it for OP_ACCEPT, and then called select(), would behave in exactly
the same way.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message