store | blogs | forums | twitter | facebook | wiki | downloads | support portal
Atomic Secure Linux
It is currently Tue Oct 21, 2014 11:09 am

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Setting up a server as secondary/backup for hosting and mail
Unread postPosted: Wed Jun 15, 2011 9:50 am 
Offline
Forum User
Forum User

Joined: Fri Jul 23, 2010 10:03 am
Posts: 38
Location: UK
We have two servers; both are running plesk on CentOS 5.
Server sA is new and we have just migrated all the hosting and mail to that one. Server sB is the old one.
We want to be able to use sB as backup for sA incase for whatever reason a problem arises with sA.
I already know that we can have a mail backup using qmail with smptroutes and morercpthosts on server B.

The main issues we are unsure of are:
1. How best to set up DNS so that B hosting is only in use when A is down?
2. The best way to keep data on B is as uptodate as possible and how often should we update it?
3. Is there a way we might be able to keep plesk control panel on B without having to pay for two licenses?

For item 2 I am looking into linux-ha and I think it would be reasonable to update once a day in the early hours of the morning.

Any input would be much appreciated, thanks.


Top
 Profile  
 
 Post subject: Re: Setting up a server as secondary/backup for hosting and
Unread postPosted: Wed Jun 15, 2011 11:17 am 
Offline
Forum Regular
Forum Regular

Joined: Mon Apr 10, 2006 12:55 pm
Posts: 672
1. Your MX records are weighted. So, for example, you would put sA at a weight of 10 and sB at a weight of 20. This would send mail to sB only when sA was unavailable.
2. You could use rsync to accomplish this. Set it up using an unkeyed SSH key and just have it run every 6 hours and sB can pull files from sA.

_________________
"Its not a mac. I run linux... I'm actually cool." - scott


Top
 Profile  
 
 Post subject: Re: Setting up a server as secondary/backup for hosting and
Unread postPosted: Thu Jun 16, 2011 6:30 am 
Offline
Forum User
Forum User

Joined: Fri Jul 23, 2010 10:03 am
Posts: 38
Location: UK
Thank you for your answer Highland.
We have used rsync before but I'm looking to see if other options give us more flexibility/managability.

We are already pretty sure what we need to do for email backup. It's access to websites, etc that we are less sure of.
Some sites are database driven and would change a lot on a day to day basis; thus we don't want people going to both servers but instead would like sB to only be looked at if httpd on sA (or the whole server) is down.
We are not sure how to do this as you don't seem to be able to weight NS or A records.


Last edited by bananapar on Fri Jul 01, 2011 9:52 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Setting up a server as secondary/backup for hosting and
Unread postPosted: Thu Jun 16, 2011 8:09 am 
Offline
Forum Regular
Forum Regular

Joined: Mon Apr 10, 2006 12:55 pm
Posts: 672
Well, A records are, by definition, exclusive. MX records realize you might need multiple mail servers and are the only DNS record that is weighted.

The only way you could set up a website to do failover would be to use a load balancer. The load balancer could detect sA was down and send traffic to sB. Some hosts (I know SoftLayer does) offer a shared load balancer, which is far cheaper than owning another machine.

_________________
"Its not a mac. I run linux... I'm actually cool." - scott


Top
 Profile  
 
 Post subject: Re: Setting up a server as secondary/backup for hosting and
Unread postPosted: Fri Jun 17, 2011 3:03 pm 
Offline
Forum Regular
Forum Regular

Joined: Sat Mar 28, 2009 6:58 pm
Posts: 865
Location: Germany
Quote:
Well, A records are, by definition, exclusive. MX records realize you might need multiple mail servers and are the only DNS record that is weighted.
The only way you could set up a website to do failover would be to use a load balancer.


I'm sorry but that's not correct. You can set multiple resource records into one resource record set for example one entry like www with roundrobin. So it is possible to achieve some sort of load balancing via DNS based load balancing.
Extending this with healthchecks if the corresponding server is available and if not change the config automatically is a solution that is used quite often for financial reasons since you don't need additional load balancing equipment.
Of course this solution is primitive and not capable for all scenarios but it works.
bind is the first address to achieve this.

http://ftp.isc.org/isc/bind9/cur/9.8/doc/arm/Bv9ARM.pdfl

http://www.google.de/search?source=ig&hl=de&rlz=&=&q=DNS+based+load+balancing+bind&aq=f&aqi=&aql=&oq=


Top
 Profile  
 
 Post subject: Re: Setting up a server as secondary/backup for hosting and
Unread postPosted: Fri Jun 17, 2011 4:09 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7935
Location: earth
Yup, we use multiple A records pointing to a single domain (updates.atomicorp.com) for "diet coke" load balancing now.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group