Filip Hanik - Dev Lists wrote:

The processSocketWithOptions is a blocking call, hence you wont be able to acccept new connections as long as your worker threads are all busy.

Not entirely true.

What we need to do, is set the socket options, then simply add the socket to the poller waiting for a read event, the poller will assign it a worker thread when one is available and the socket has data to be read.

This was one of the major improvements I just did in the NIO connector. otherwise you can't accept connections fast enough and they will get dropped.


Basically you simulate the OS socket implementation pending connections
queue (backlog) on the OSI layer 7 instead depending on the layer 5
provided by the OS.

The only beneficiary for that would be lab test environment where you
have a lots of burst connections, then a void, then a connection burst
again (not an real-life situation thought). The point is that no matter
how large your queue is (and how it's done) if the connection rate is
higher then a processing rate, your connections will be rejected at some
point. So, it's all about tuning.

Regards,
Mladen.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to