Using Netty

rajks rajks at
Tue May 12 20:46:21 EDT 2009


I was looking at various NIO frameworks and I am inclined to use Netty for
this. My basic testing of the sample applications customized to do some
research was impressive.

I just wanted to get inputs from the forum and the author to see if this
will suit for my project.

Planning to implement all servers using Netty including back end
communication using Netty.

Requirement is to have a distributed set of front end servers (stateless).
The front end server will receive requests in HTTP (rest API) and has two
major activities. One to talk to a back end DB_SERVER (embedded db) to
read/write metadata and the second one is read/write to NFS storage the
content. We will have the following operations - create, get (get metaonly,
get meta+content), update (metaonly), delete. 

Though both DB and NFS operations (db and NFS read/writes) could create
performance issues, the db bottleneck is more I am worried about. The front
end server will be Netty NIO HTTP based.

Should I implement the DB server also as Netty NIO HTTP based and use the
Netty NIO HTTP client as means to communicate between front end servers and
db servers. NOTE: each front end server will be communicating with many
back-end DB servers. We would like to have PERSISTENT connections with some
limit per host;

In this scenario case I will have to wait for each http response before I
can push more requests on the same connection ( is my assumption correct as
I am not sure if Netty http client allows sending more requests on the same
connection before a response to a previous one has been received).

Or Should I use a different protocol say like a BINARY protocol and build
the DB servers based on this protocol. I see Netty has many protocol codecs.
With this model will I be able to push more requests in pipeline to the DB
server. I may have to use some sort of request ID's to associate the request
and response - isn't it;

Which approach is scalable and have performance benefits with Netty or is
there a better way to exploit Netty. Can I use the Netty client in teh front
end server to distribute the requests to back-end DB server on a set of
persistent connections.

Does Netty handle by default uploading of big files by N number of
concurrent sessions or do we need to do something in the server side after
each MessageReceived event to say suspend read so that IO does not read
until the every chunk is written to the disk. after this resume read again.
Does suspend and resume reads affect performance;

Also is this taken care of automatically by using the
OrderedMemoryAwareExcecutor as I see some topics in this forum recommending
to use the OrderedMemoryAwareExcecutor to handle the memory issue and as
well for high latency back-end operations.

Thanks in advance for taking some of you valuable time to respond. This will
help me to convince some people to go with Netty --- :) you know how this
works when anything new is brought in :)

View this message in context:
Sent from the Netty User Group mailing list archive at

More information about the netty-users mailing list