VMware Virtual Appliances Community
VMTN_Admin
Enthusiast
Enthusiast

Hercules Load Balancer Virtual Appliance

http://www.vmware.com/vmtn/appliances/directory/300

A tiny but mighty tcp load balancer

Reply
0 Kudos
186 Replies
Matt_Ghantous
Contributor
Contributor

Well there are probably hundreds of ways this could be done more elegantly, but this is how I set up vrrpd:

Edit /etc/init.d/pen on both load balancers

VIRTUAL_ADDR="192.168.0.30"

.....

start)

/bin/vrrpd -n -i eth0 -v 1 $VIRTUAL_ADDR

.....

stop)

killall vrrpd

......

Now you got two loadbalancers listening on virtual address 192.168.0.30. If one goes down, not an issue, you have fail over! So now you have failover at the load balancer level as well as failover at your host server level. Call that paranoia! But if your services need to be 24/7 it is just an extra measure of reliability.

\- Matt

PS.

vi and vim (Vi-Improved) are almost completely different editors. Prabhakar probably put vi in the distro because it is a smaller package, and suitable to fit our needs. If you are looking for a good editor with syntax highlighting for just about everything, you should take a look at vim. It runs on Windows as well. Vim is a pain to learn at first, but most people who learn it never switch back.

Message was edited by:

Matt Ghantous

Reply
0 Kudos
prabhakar
Contributor
Contributor

I added vi to the appliance as it is a very small package that is ideal when you are trying to save space, and it does its job very well. But Vim is what you should really use for editing. The new version has a tabbed interface and autocomplete. It is very nice. Takes some getting used to, but will be very worthwile.

Smiley Happy

-prabhakar

Reply
0 Kudos
pencer
Contributor
Contributor

I'm nearly there!

I've put the following in both my LB's pen scripts:

...

VSERVER=192.168.0.30

...

/bin/pen -C $CONTROLPORT -X -l $LOGFILE -p $PIDFILE $LBSERVER $SERVER1 $SERVER2

/sbin/vrrpd -n -i eth0 -v 1 $VSERVER

After vrrpd is started on either/both servers I can ping 192.168.0.30 but when I browse to https://192.168.0.30 I get a page cannot be displayed error?

Reply
0 Kudos
Matt_Ghantous
Contributor
Contributor

in the line

/bin/pen -C $CONTROLPORT -X -l $LOGFILE -p $PIDFILE $LBSERVER $SERVER1 $SERVER2

try just putting 443 (no ip) for $LBSERVER and see if that works... I think it should.

Reply
0 Kudos
pencer
Contributor
Contributor

Thats done the trick. Thanks to Matt and prabhakar for all your help.

My first virtual clustered load balanced appliances will soon be serving our NHS trust staff!

Reply
0 Kudos
prabhakar
Contributor
Contributor

Very cool.

-prabhakar

Reply
0 Kudos
prabhakar
Contributor
Contributor

Updated the appliance to use the latest kernel - 2.6.17.7 .

You can download it from :

http://istanbul.sourceforge.net.

-prabhakar

Reply
0 Kudos
cdakers
Contributor
Contributor

I have the two of the latest release running in VMWare Server on W2k as fault tolerant load balancers for several web server appliances and it is working great.

Where can I edit the text that is displayed at the end of the boot sequence, just before the login prompt? I would like to edit the instructions there, as they are incorrect in my configuration. I would also like to add some additional text.

Thanks for your help! Keep up the great work.

Reply
0 Kudos
Matt_Ghantous
Contributor
Contributor

I think you want to edit /etc/issue

Reply
0 Kudos
cdakers
Contributor
Contributor

Thanks, that helps. What I really want to edit is the text that says "You can access the help page that details......". I thought I saw the file when I was poking around, but can't seem to find it now.

Reply
0 Kudos
Matt_Ghantous
Contributor
Contributor

Well what happens is /etc/init.d/S99helpmsg gets executed last (hence 99) and that finally execute /bin/hercules which echos out "You can access the help page that details......"

So two possible options for you are:

1.) rm /etc/init.d/S99* and then edit /etc/issue

2.) edit /bin/hercules

Reply
0 Kudos
XRayCharlie15
Contributor
Contributor

Hello,

I've downloaded the Hercules-1.3-esx3.zip from the sourceforge site and started it up.

I saw mention of vrrpd being added to it but it does not appear to be present in the /bin directory.

Where would I find vrrpd?

Regards

Reply
0 Kudos
CPM
Contributor
Contributor

Does anyone know the connection limit to hercules, also does anyone also know if hercules creates log files which might max out the hard drive?

Thanks in advance.

Chris

Reply
0 Kudos
prabhakar
Contributor
Contributor

The vrrpd binary is not in the bin folder. It is probably in one of the sbin folders. I am not at my laptop right now, but i will check and let you know for sure.

Reply
0 Kudos
prabhakar
Contributor
Contributor

Apologies for the delay in replying to some of the recent postings. I have been very busy with work, as we have a major release in two weeks, and a trade show demo. I am planning on updating the hercules and hermes appliances, and also have some other ideas for enhancements to them.

thanks for checking out these appliances and for your feedback.

-prabhakar

Reply
0 Kudos
prabhakar
Contributor
Contributor

I am not aware of any connection limit. There are log files that are created in /var/log, but i have not run into the case where they become large enough to max out the hard drive.

Reply
0 Kudos
Matt_Ghantous
Contributor
Contributor

Prabhakar, good working with you and congrats on the Honorable Mention Status for Hercules and the Communitiy Choice Prize for Hermes. I'll have to check that one out!

Reply
0 Kudos
prabhakar
Contributor
Contributor

Thank you Matt. And a big thanks for your help in the esx versions.

-prabhakar

Reply
0 Kudos
Matt_Ghantous
Contributor
Contributor

Has anyone got Hercules balancing Microsoft IIS servers? If so, what is your setup?

Doing an official test with Hercules in our data center!

Here's my setup with 4 virtual machines on ESX 3:

LB01 and LB02 sharing a VRRP IP address to balance two IIS web servers, WEBSERVER01 and WEBSERVER02.

I got that going and I hope to have WEBSERVER01 and WEBSERVER02 serving web content from same physical volume on our SAN.

Kind of fumbling around in the darnkess with the windoze stuff and trying to mirror IIS, but I'll let you know how it goes! Smiley Happy

Reply
0 Kudos
prabhakar
Contributor
Contributor

Havent worked much with IIS, and everytime I did work with it, it was extremely frustrating. So i havent tried any of this with IIS. But you seem to be making great progress, and we would love to hear how your experiments go.

Smiley Happy

prabhakar

Reply
0 Kudos