Solved

Using Rackspace load balancer for website high availability

Posted on 2011-09-02
22
1,658 Views
Last Modified: 2012-05-12
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. Single load balancer is again a single point of failure.

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 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!
0
Comment
Question by:Thyagaraj03
  • 15
  • 7
22 Comments
 
LVL 78

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 36477222
they don't have to be public ip's they can be private if on the same network as the load balancer the web browser will only ever see the load balancer ip. Possibly vpn'd by the load balancer if on different network.

Question where will you put the 2nd load balancer? and how will it know to be active? you will need another utility to check on the health of the primary load balancer and to switch the ip's to bring the 2nd load balancer online (again you still have a single point of failure) have you checked amazon's offerings and pricing?

ip switcher -- load balancer -- server 1 / server 2 ...
       |
       |         -- load balancer 2 -- server1 / server 2 ...
0
 

Author Comment

by:Thyagaraj03
ID: 36478037
they don't have to be public ip's they can be private
I was thinking all the computers will be in LAN and apart from this with 2 public ips each for the Load balancers. If no public IP then it won't be accessible globally. Oh.. I think you mean to say only one public ip is enough to be shared?. Ah.. I am again confused here that what if I want to host one more website in the same cluster(we've many sites). Is might be possible pointing website domains to more than one server(load balancers) having assigned a public ip address to the load balancers each?. I need your help here again, please!
Question where will you put the 2nd load balancer? and how will it know to be active?
Doesn't cloud providers(Rackspace) have any technique to do ip failover in case the primary server is down?. I don't know much of cloud servers and so no idea of amazon but my office uses Rackspace cloud provider. If no way to do ip failover from Rackspace, I should use the heartbeat for failover and before that I should check how doing it. Of course if it's again SPOF if primary server fails and I was thinking I'll get the primary server back to working!
0
 

Author Comment

by:Thyagaraj03
ID: 36478057
For the first Quote: I mean to say either IP Failover or Round Robin as I have we have more than one site hosting?
0
 

Author Comment

by:Thyagaraj03
ID: 36480815
any updates?
0
 
LVL 78

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 500 total points
ID: 36481332
ip failover and round robin are two different things.

Load balancing is having 2 or more identical servers that will use some form of round robin to handle requests.  the nameserver for the web site points to the balancer and the balancer has the list of servers to send the requests to and on receipt of the the answers routes them to the requester.

ip failover means that if a request isn't answered in an appropriate length of time it sends the request to another server in its list.

Ip failover server would have to be placed before the load balancer. i.e.

0
 

Author Comment

by:Thyagaraj03
ID: 36482097
thanks for the clarification!.

- 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?

- I heard Rackspace offers to share an ip between computers, is that so? in this case should I mention that shared public ip in network interfaces on both the LBs? may be as virtual ip(eth0:0)?
0
 
LVL 78

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 500 total points
ID: 36482269
How does it cut down bandwidth? If you host the website yourself then you can use DFS for high availability of the content.  is the website generating enough traffic that it is overwhelming the current server?
0
 

Author Comment

by:Thyagaraj03
ID: 36482322
No, not for myself, with one public ip shared between load balancers and pointing all the site domains(DNS) to this shared public ip. Is this possible?. If possible I can cut down number of public ip costs and their bandwith.
0
 

Author Comment

by:Thyagaraj03
ID: 36495057
I was thinking the setup like all the computer(web servers & load balancers) in a LAN 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 and mod_proxy & mod_jk on load balancers 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 as they don't have the public ip assigned and again I thought of adding some like 'ProxyPass /web1 http://web1-ip-here' on the LBs. But again to update or to install some packages on web server, 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 it works with no issue. Else I have to use public ip for web servers
0
 

Author Comment

by:Thyagaraj03
ID: 36512055
Ok, web servers has public ip address each and is it possible having no public ip assigned to LBs but a  shared public ip between them along with internal ip(private)?.
0
 
LVL 78

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 500 total points
ID: 36514393
lets start from scratch: what is rackspace doing for the company now?  Why do you need rackspace at all?

If you do it over the internet you will need a static ip to your servers for each server in your load balancing cluster that rackspace will as your website dns endpoint will then round robin between these static ip's each server will have an identical copy of the website.

so in rackspace you have 2 or more nodes that are identically configured with your website.. using private ip's you connect them to the load balancer and if you want you can add an EXTERNAL public ip (static) to another copy of your website that resides on your server or more..
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:Thyagaraj03
ID: 36516589
Yeah got it!. One thing I want to know if i'ts possible. That is, I share an public ip between LBs, doest it require another static public for each LB?. In Rackspace, by default a public & a private ip is assigned to servers I am thinking if it's possible to ommit public ip assigned for LBs? so that I can avoid 2 public ip cost on LBs and share a single public ip between LBs. And I can access the LBs or point site domain name to this shared ip.

Please let me know if it's possible to avoid default public ip on LBs, else I've to pay for 2 public ips(on LBs) along with shared ip.

0
 

Author Comment

by:Thyagaraj03
ID: 36516598
what is rackspace doing for the company now?  Why do you need rackspace at all?

For hosting some of their web sites(jsp) and are slowly growing and I have to setup HA and LB cluster for apache-tomcat and mysql so as to have our sites highly available with zero down time.
0
 

Author Comment

by:Thyagaraj03
ID: 36516610
That may not be the answer for using Rackspace as I forgot to say the main point that I'm from India basically where power cut is common especially in our area and some times for longer ours though having inverters. And to avoid maintenance, hardware charges,.. our company is using cloud servers.
0
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
ID: 36520388
a generator and ups's may be a more cost effective situation. In North America we take reliable electricity as a given.
0
 

Author Comment

by:Thyagaraj03
ID: 36520928
Yeah got it!. One thing I want to know if i'ts possible. That is, I share an public ip between LBs, doest it require another static public for each LB?. In Rackspace, by default a public & a private ip is assigned to servers I am thinking if it's possible to ommit public ip assigned for LBs? so that I can avoid 2 public ip cost on LBs and share a single public ip between LBs. And I can access the LBs or point site domain name to this shared ip.
0
 

Author Comment

by:Thyagaraj03
ID: 36566447
Hello anybody!
0
 
LVL 78

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 500 total points
ID: 36569856
can you show me a diagram of what you said in post 36520928?

Your DNS setting for www.example.com can only point to 1 ip address at at time and may take up to 24 hours to replicate if you change that address
Normally this will be a public IP unless on the intranet pointing to the load balancer which will use private ip address's to round robin the destination web servers

adding a second load balancer to the mix is overkill as there is no way you can reference it from your dns unless it is maybe www1.example.com
are your name servers also located on rackspace? ns1.example.com could point to LB1 and ns2.example.com could point to LB2
Untitled.png
0
 

Author Comment

by:Thyagaraj03
ID: 36571577
can you show me a diagram of what you said in post 36520928?
I'm failing to understand what this post is about. If u r bit more specific I could tell.

My question was not the Single domain name pointing to multiple public ips, but with ip-failover between two machines(shared pubic ip between LBs) can we add multiple registered domain names(site name) to this shared ip?. And as by default, each machine is assigned a public ip, is it possible to avoid public ips(to cut ip cost) of LBs having only private ip and share public ip?.
0
 
LVL 78

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 500 total points
ID: 36572501
Yes you can add multiple domain names pointing to one public ip address as long as you have a way of either sorting them out on the webserver (host headers) or just use relative paths, if the servers are within rackspace loadbalancer network then they don't need a public ip but for maintenance it might be handy
0
 

Author Comment

by:Thyagaraj03
ID: 37093365
Thanks for the reply, let me go through once again as I've give a long gap, ofcourse I should implement this in the near future probably start of next year...
0
 

Author Closing Comment

by:Thyagaraj03
ID: 37435681
Not exactly what I want
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
Big data transfers via information superhighways require special attention and protection. Learn more about the IT-regulations of the country where your server is located. Analyze cloud providers and their encryption systems for safe data transit. S…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now