Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netty performance

Is there any real difference to the performance when you use Netty and if you don't use it in an application with tens of thousand of connections?

like image 930
M4rk Avatar asked Feb 28 '11 17:02

M4rk


2 Answers

Not really, a good reason to use Netty is to improve the reliability of the connections and leave you to code what the connection does rather than worry about the details of everything which can go wrong. (Often only comes by finding out the hard way)

Netty may help you scale over 1K connections. However if you don't need so many connections you might find that simple code performs best.

like image 143
Peter Lawrey Avatar answered Nov 13 '22 03:11

Peter Lawrey


Not really, as Peter noted.

However, I've found that Netty also offers a very nice API for building a server. Although there is a bit of a learning curve to the API, it's well made and creating a new server can be trivial. It's also quite efficient code-wise, so you would have very little code, if you have a simple protocol and implementation.

This is ONLY if you are building a server for something other than HTTP. If you are talking about an HTTP web application, go with the tried an true. Apache for straight HTML pages, Tomcat if you need Servlets.

like image 35
rfeak Avatar answered Nov 13 '22 02:11

rfeak