> I would appreciate some suggestions or pointers as to where to look
> for, to increase a java server's ability to accept a huge number of
[quoted text clipped - 20 lines]
>
> I have tried using NIO too. It doesn't seem to work.
The backlog indicates the size of the queue of waiting connections. I'd
think that 400 should be more than large enough for most uses. But the
real question is probably what you're doing with the connections when
they arrive. Are you handing them off *immediately* to some other
thread, thereby allowing the thread with the ServerSocket to check for
the next one, etc? The longer it takes to hand it off and come back to
the accept() call, the more connection requests will get dumped.
= Steve =

Signature
Steve W. Jackson
Montgomery, Alabama
shanky001@yahoo.com - 17 Feb 2006 05:05 GMT
Steve,
Thanks a lot. That suggestion helped. Though the connections were being
handled by a different thread (eg. SocketHandler), the whole process
was taking a few milliseconds. I just changed it so that, the
connection is immediately dumped into a queue and there is a separate
thread that takes connections of the queue and creates the actual
socket handling thread (SocketHandler).
Thanks once again.