Remy Maucherat wrote:
Filip Hanik - Dev Lists wrote:
I wrote a blog entry on how one of our connectors was developed the challenges you face doing that.
Its not super technical as I'm saving the juicy details for ApacheCon

And since no one reads my blog, I'll let you guys get it from here :)

http://blog.covalent.net/roller/covalent/entry/20070308

And what about the APR connector (assuming you increase the pollerSize to an appropriate value, since it's "only" 8000 by default) ?
That will be in the next blog, this time I only wanted to compare NIO connector, as the coding of it gets complex since you have to "force" blocking IO on a non blocking API.

There is an area of the AprEndpoint that needs to be fixed before it happens though, currently the "Acceptor" thread in APR does this
     long socket = Socket.accept(serverSock);
     if (!processSocketWithOptions(socket)) {
         Socket.destroy(socket);
     }

The processSocketWithOptions is a blocking call, hence you wont be able to acccept new connections as long as your worker threads are all busy. 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.

I'll attempt a patch that you can review, unless you wanna jump on it directly.

I will contact you before I run the test to make sure I got everything configured, I see But before ApacheCon I will have those numbers, as in my presentation I will focus on APR and NIO, the old connector is not of that much interest anymore :)

Filip

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

Reply via email to