As part of the Resin 3.2.0 stress test, I loaded Resin with 25,000 comet clients for several hours.
The point of the test was to stress the socket/thread attachment and detachment code as well as well as any issues with large number of connections. And double-check any leaks of course.
The huge numbers of clients is possible because comet requests are normally idle, e.g. a chat application is just waiting for the next request. Since the request isn’t doing anything, Resin can release the thread and just hold the socket.
Because 25,000 requests takes up 25,000 connections and ServletRequest and ServletResponse objects, we needed to add a -Dcaucho.smallmem attribute to shrink the default buffer sizes. Normally, Resin’s buffers are 16k and each request uses several of these buffers. So 25k requests would need a few gigabits of memory just for the buffers. With -Dcaucho.smallmem, the buffer sizes are reduced.