Netty options for real-time distribution of small messages to a large number of clients?

Posted by user439407 on Stack Overflow See other posts from Stack Overflow or by user439407
Published on 2012-09-24T12:49:52Z Indexed on 2012/09/25 9:37 UTC
Read the original article Hit count: 285

Filed under:
|
|
|

I am designing a (near) real-time Netty server to distribute a large number of very small messages to a large number of clients across the internet. In internal, go as fast as you can testing, I found that I could do 10k clients no sweat, but now that we are trying to go across the internet, where the latency, bandwidth etc varies pretty wildly we are running into the dreaded outOfMemory issues, even with 2 gigs of RAM.

I have tried various workarounds(setting the socket stack sizes smaller, setting high and low water marks, cancelling things that are too old), and they help a little, but they seem to only help a little bit. What would some good ways to optimize Netty for sending large #s of small messages without significant delays? Also, the bulk of the message only consists of one kind of message that I don't particularly care if it doesn't arrive. I would use UDP but because we don't control the client, thats not really a possibility. Is it possible to set a separate timeout solely for this kind of message without affecting the other messages?

Any insight you could offer would be greatly appreciated.

© Stack Overflow or respective owner

Related posts about java

Related posts about real-time