Netty and scalation

ljohnston johnstlr at yahoo.co.uk
Thu Oct 6 04:32:31 EDT 2011


You could build a very simple load balancer with minor modifications to the 
http://docs.jboss.org/netty/3.2/xref/org/jboss/netty/example/proxy/package-summary.html
proxy  example. You could change 
http://docs.jboss.org/netty/3.2/xref/org/jboss/netty/example/proxy/HexDumpProxyPipelineFactory.html
HexDumpProxyPipelineFactory  to contain a list of remote host addresses
rather than a single address and simply round robin through them each time a
new connection comes in. Remember to synchronise access to the list in
getPipeline.

Obviously this doesn't address concerns such as
 - should connections from a particular host always go to the same backend
server.
 - do you need to replicate some kind of session state on the backend server
 - are all your backend servers identical all do you need some mechanism of
managing how many connections each one can handle.

Alternatively maybe see if there is an off the shelf load balancer you can
use (linux probably has several) or a hardware load balancer.

Cheers
Lee


--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-and-scalation-tp6864512p6865226.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list