I have tested tomcat specific clustering
with apache mod_jk
and mod_proxy
on ubuntu local VMs for our website high availability
and load balancing
. The real servers are hosted by Rackspace cloud
server provider. I tested tomcat clustering with 1 load balancer and 2 web servers. As single load balancer is again a single point of failure
, I'm trying to add one more LB as slave.
In Rackspace there is an option Load Balancers
and here is the link which guides how setting up load balancer which I am not sure to setup because of some doubts as I never did this before anytime.
Could anybody recommend me step-by-step what I should and what I shouldn't with only necessary resource avoiding unnecessary costs?
The following are the things which I'm not sure and requesting someone who is already using Rackspace help me out here in setting up load balancing:
I want to add atleast 4 machines, 2 as web servers, 1 as load balancer server and one more as Failover load balancer server. I think I can add new machines from the Rackspace Load Balancer option?
I just heard that one could cut down the cost of static IPs by setting up the cluster in LAN assigning private ip address to cluster computers and thus I can cut down bandwidth costs too. Is it really possible to join cluster computers in a LAN in Rackspace?
As far as I know I will point the domain name(website name) to the Load Balancer in the DNS where the domain is registered and both the LBs should have Static Public IP assigned(i'm thinking I'm right here). As I already said I want to add one more LB to avoid single point of failure, Is there any option in Rackspace where I can point the website domain to both the LBs so that only one is active and if active fails, it should point to another LB(similar to
ip failover
) so that I can make it zero-down-time website?.
I request if possible if anybody give me step-by-step list on how to do them in Rackspace with your own recommendations on what I should and shouldn't.
Thank you in advance!
EDIT: 1
I heard Rackspace offers to share an ip
between computers, is that so?, then I can use this option. I will specify public/shared ip as virtual ip by eth0:0
in the network interface file on both the load balancers. Do you really think it works flawless even if specified the public ip as virtual ip with eth0:0 interface without any interruption?
EDIT: 2
I was thinking the setup like all the computer(web servers & load balancers) in a LAN(in Rackspace) with some network(192.168.x.x
) using eth0
interface. For load balancers, for the interface eth0:0
or eth1
, a public ip is shared between LBs and mod_proxy & mod_jk on LBs redirect them to web servers as they could be in same network(192.168.x.x).
After some analysis I realized that I could not directly access the web servers for testing from my place as they don't have the public ip assigned and so again I thought of adding some proxy redirection like ProxyPass /web1 http://web1-ip-here
on the LBs to access the web servers with share public ip or site domain name(I think it redirects as all the servers are in lan). But again to update or to install some packages on web servers, need internet connection. I am again wondering if there is an option to connect web server to WAN with single public ip on LBs and if so if it works with no issue. Else I have to use public ip for web servers each.
First off, why do you need 4 machines when you can use only 2. You can set up load balancer on the same machines you are planning to use as webservers. Next, you can buy a so-called "shared IP" from Rackspace and set up Heartbeat to manage it. I've tried this setup the on Rackspace cloud and it worked pretty well. I used HAProxy as a balancer and I highly recommend you to use it too, it's quite easy to configure.
Two good options work here:
1: Hardware-based Load Balancing as Rackspace Service
Very recently Rackspace added its load balancing service and for plain web forwarding this is going to be your more reliable and cost-effective bet. from your account management panel, you can get to the load balancing options under Hosting -> Load Balancing
2: Software-based Load Balancing with Failover
You can of course set up two servers for load balancing and use software like HAProxy to round-robin incoming traffic. This will require you to pay for and maintain both servers as well as an extra cost for an extra public IP address to share between them.
The servers don't actually "share" the IP address - the "master" controls it and is the public point of contact for your load balancing. The two machines are linked together via heartbeat monitoring, and if the "slave" server detects the "master" is not responding, it will bind the public IP address and become the master.
Rackspace has an article where they describe the process for setting up the heartbeat load balancing solution on their web site here: http://www.rackspace.com/knowledge_center/index.php/IP_Failover_-_Setup_and_Installing_Heartbeat
According to RS support a RS LoadBalancer can handle up 150,000 connections. They are actually multiple (i'd guess virtual) machines with a public facing IP. From our experience they have a pretty good uptime and they are very easy to set up and shutdown. One major drawback I find in using RS LBs is they don't do SSL termination (yet).