Code Review Request: 8014254: Selector in HttpServer introduces a 1000 ms delay when using KeepAlive

Kurchi Hazra kurchi.subhra.hazra at oracle.com
Wed May 8 16:06:10 PDT 2013



Hi,

    com.sun.net.httpServer uses a selector to get notified about interesting
events (such as arrival of a new connection, or data available to read
on an existing connection when using keep-alive), but imposes a timeout of
1000 ms on the select() operation. Although this is not a problem when the server uses a
ThreadPool with more than one thread, but for a single threaded server, this timeout
gives rise to a bottleneck and should be reduced to a lower value.

I have proposed 200 ms for the timeout here, but if anyone has preference for a greater
or lower value, I am open to that too.

Bug:http://bugs.sun.com/view_bug.do?bug_id=8014254  (To appear)
Webrev:http://cr.openjdk.java.net/~khazra/8014254/webrev.00/

  Thanks,
- Kurchi






More information about the net-dev mailing list