Is there a simple Load Balancer app for development environment on Windows?

3

Does there exist a simple Load Balancer app for development on Windows? I am running a pair of JBoss 5.x instances in a cluster on a single machine. Normally , this configuration is load balanced by a nice hardware load balancer but I am wondering if there is a simple piece of software to enable load balancing in my Eclipse dev environment.

Basically, for example, I want a load balancer running on port 11111 that round-robins between the 2 clustered JBoss instances on ssl ports 8443 and 8543 . (or http port if thats not possible)

I know that Glassfish has a built-in load balancer but I can't use Glassfish.

One idea I have is to try to setup a separate instance of Tomcat with the "balancer" web app. Im trying that now... not sure if it will work... and its a complicated setup and I wish there was something really easy.

djangofan

Posted 2010-01-20T01:05:24.440

Reputation: 2 459

This would be better off on http://serverfault.com

– Sasha Chedygov – 2010-01-20T01:31:06.673

Answers

2

You could use Apache HTTP Server with the mod_proxy_balancer module.

Snark

Posted 2010-01-20T01:05:24.440

Reputation: 30 147

4

You can use use Nginx

Install nginx and add config file:

http {
  upstream myproject {
    server 127.0.0.1:8000;
    server 127.0.0.1:8001;
  }

  server {
    listen 80;
    server_name localhost;
    location / {
      proxy_pass http://myproject;
    }
  }
}

Onbayev Kanat

Posted 2010-01-20T01:05:24.440

Reputation: 51

0

Instead of load balancing between ports, why not bind each instance to a specific loopback IP address. The whole 127.0.0.0/8 network is loopback (not just 127.0.0.1). If you configure your processes to bind to 127.0.0.2 and 127.0.0.3 (or whatever you want) then you can do IP round robin. This can be done with DNS if you wish.

You could also write a wrapper that binds to an IP/port and will randomly forward the connection to one of the servers, and just pass the data through.

Tyler Szabo

Posted 2010-01-20T01:05:24.440

Reputation: 521