Blog

Load balancing TCP servers using Malabarista

Malabarista (portuguese for “juggler”) is a java TCP load balancer built on top of Netty.

It’s an extremely simple project that creates ¬†between two endpoints, based on Netty’s TCP tunnel example. Different destination selection algorithms can be used and new ones easily plugged in.

Building :

git clone https://github.com/biasedbit/malabarista.git
cd src/ant
ant jar.loadbalancer

This will create Malabarista.jar in “target” folder.

Usage

Example 1: java -jar Malabarista.jar -b*:80 -t10.0.0.1:80 -t10.0.0.2:80 -t10.0.0.3:80 -sRR

Run the load balancer on all available NIC's on port 80 and redirect to hosts 10.0.0.1 through 3 using RoundRobin (RR) load balancing strategy. RoundRobin assingns every new incoming connection to the next target host.

Example 2: java -jar Malabarista.jar -b10.0.0.100:80 -t10.0.0.1:80 -t10.0.0.2:80 -sFAIR

Run the load balancer on 10.0.0.100 port 80 and redirect to hosts 10.0.0.1/2 using FAIR strategy. Fair strategy attempts to balance the number of connections between all target hosts.

Ref :- https://github.com/biasedbit/malabarista

Above method will help with load balancing TCP servers using Malabarista.

adminLoad balancing TCP servers using Malabarista
Share this post

Join the conversation