Warmup Handshake Timeouts

"이희승 (Trustin Lee)" trustin at gmail.com
Wed Aug 25 22:40:46 EDT 2010


Hi,

NIO does not have socket read timeout.  Maybe you could configure
something in the OS level, but yeah it's a better idea to decrease the
time taken for handshakes.

If your client often re-establishes the connection, you could reuse the
SSL session by specifying peerHost and peerPort when you create a
SSLEngine from SSLContext.

If that is not the case, the solution becomes more tricky - SSLEngine
needs to be created in a separate thread pool and all incoming traffic
should be buffered until the SSLHandler is inserted into the pipeline.
There's also risk related with sudden spike in memory consumption as you
expected.

HTH,
Trustin

On 08/24/2010 10:28 PM, mrochon wrote:
> 
> Hi Trustin, performance testing is going very well on our Netty server. We're
> handling ~100k clients per cluster node, very nice.
> 
> One thing we have had to work around so far is masses of handshake
> connections happening when the server is idle.
> 
> Basically when we get around 1k simultaneous connects and ssl handshakes the
> server sometimes can not complete a handshake fast enough (around 0.5% of
> the time).
> 
> Basically when the server has been idle for a while and we get a flood of
> connects the JVM cannot spin up threads in the thread pool fast enough to
> complete the handshake before the socket read timeout occurs.
> 
> I have increased the number of idle threads we keep around but I would not
> like to scale in that manner, as it could take resources away from tasks
> that are designed to eat up idle cpu time.
> 
> Basically I was looking for a way to increase the socket read timeout
> (SO_TIMEOUT) on the child sockets to give myself a little more time for
> server warmup (I think I can bring this down to < 0.05% with a very modest
> increase in timeout).
> 
> Any chance we can get that in?

-- 
what we call human nature in actuality is human habit
http://gleamynode.net/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 293 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20100826/86d0ac94/attachment.bin 


More information about the netty-users mailing list