Search code examples
nettynio

Netty OIO or NIO


I have multi stages network infrastructure. Layer 1 has 8 servers receive data from 10000 clients every second. I'd like to write proxy layer with about 2 or 3 instances to transfer data from layer 1 to backend layer.

I found Netty quite convenient for me to write such a program like this. But I still confuse between NIO or OIO, because I only have 8 servers, meanwhile in document of Netty says that OIO for server has lower than 1000 connection, more than that should use NIO.

I'm afraid that using OIO will block the stream and make some messages delay. I need to response to the clients instantaneously after receive the request.

May anyone suggest me the solution, I'm new to network and Netty.


Solution

  • Most likely you want to use NIO. Only use OIO if you really need too :)