LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-09-2016, 06:06 AM   #1
sunnysthakur
Member
 
Registered: Aug 2012
Posts: 92

Rep: Reputation: Disabled
Email with High Availability


Hello,

We are planning to setup a Email server with High Availability for email services so that if SMTP/POP/IMAP goes down on one server, the services switch to second server.
We are planning to use a Linux machines from a hosting provider and will do it using DNS with multiple MX records with round robin.

Now i have couple of queries regarding this setup :-
  • Is this possible to have a same domain name to bind with 2 IPs i.e xyz.com point to 1.1.1.1 on one server and xyz.com point to 2.2.2.2 on second server.
  • How can we setup MX records for each server on DNS for email failover.
  • As we have a separate servers for this setup that means data related to email would be reside on separate server (because they have separate HDD), so in case 1st server goes down and it switch to second server, will i skipped my email which was received on 1st server before it goes down as my email client will receive them on certain period of time.

Please let me know if above is a valid query.
 
Old 03-09-2016, 08:52 AM   #2
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by sunnysthakur View Post
Now i have couple of queries regarding this setup :-
[*]Is this possible to have a same domain name to bind with 2 IPs i.e xyz.com point to 1.1.1.1 on one server and xyz.com point to 2.2.2.2 on second server.
Simple answer is yes but if one of those IP's becomes unavailable then half the traffic will not be able to connect.

A better option would be to use HSRP between the 2 servers instead of round robin DNS.

Quote:
[*]How can we setup MX records for each server on DNS for email failover.
Look at the MX records in DNS. They have a Preference value that you set. This tell the SMTP which server to connect to first and when it is down what the next server to try is.

Quote:
[*]As we have a separate servers for this setup that means data related to email would be reside on separate server (because they have separate HDD), so in case 1st server goes down and it switch to second server, will i skipped my email which was received on 1st server before it goes down as my email client will receive them on certain period of time.
Another thing to look into is a NAS or SAN for your email backend storage. That way when one server goes down your mails will still be available on the second server. If that is not an option then maybe look at doing an Rsync between the 2 servers to keep both up to date.

Disclaimer: I am not a email admin so there may be better options for you. The above is all off the top of my head.
 
Old 03-10-2016, 06:09 AM   #3
sunnysthakur
Member
 
Registered: Aug 2012
Posts: 92

Original Poster
Rep: Reputation: Disabled
Hello,

Thanks for your prompt reply and details.
However if have to do it with Cpanel/WHM, i think HSRP will not be possible as this will totally depend on hosting provider.

In case we setup a email service using Cpanel/WHM we have a specific choice to setup a Fail over services for Email.
 
Old 03-10-2016, 08:33 AM   #4
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Again the 2 biggest things you need to worry about are DATA and DNS. As long as both servers can sync their data between themselves or use a back end server you should be good there. DNS you just need to ensure you have the preference value setup. User would have to be warned that if server A isn't working use server B.

You could always talk to the provider and find out if HSRP is available or not.
 
Old 03-11-2016, 09:01 AM   #5
sunnysthakur
Member
 
Registered: Aug 2012
Posts: 92

Original Poster
Rep: Reputation: Disabled
Sure robert, will check with hosting provider if he provide this kind of services.
Thanks.
 
Old 03-13-2016, 09:23 PM   #6
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Exclamation

Quote:
Originally Posted by sunnysthakur View Post
Hello,

Thanks for your prompt reply and details.
However if have to do it with Cpanel/WHM, i think HSRP will not be possible as this will totally depend on hosting provider.

In case we setup a email service using Cpanel/WHM we have a specific choice to setup a Fail over services for Email.

Do you mean that the Cpanel is hosted on third party vendor? Or you manage your own email server?
 
Old 03-14-2016, 03:50 AM   #7
sunnysthakur
Member
 
Registered: Aug 2012
Posts: 92

Original Poster
Rep: Reputation: Disabled
Yes, CPanel/WHM is hosted on 3rd party vendor.
 
Old 03-14-2016, 03:51 AM   #8
sunnysthakur
Member
 
Registered: Aug 2012
Posts: 92

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sunnysthakur View Post
Sure robert, will check with hosting provider if he provide this kind of services.
Thanks.
Hi Robert,
HSRP is not option provided by the vendor but they will provide HA with syncing the data between the servers.
 
Old 03-14-2016, 11:23 AM   #9
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by sunnysthakur View Post
Hi Robert,
HSRP is not option provided by the vendor but they will provide HA with syncing the data between the servers.
It's good that you get your data synced but you still have the problem when one server goes off line.
What are your TTL's for your DNS records?
 
Old 04-05-2016, 04:46 AM   #10
sunnysthakur
Member
 
Registered: Aug 2012
Posts: 92

Original Poster
Rep: Reputation: Disabled
I think it is set to 14400
 
Old 04-05-2016, 11:33 AM   #11
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by sunnysthakur View Post
I think it is set to 14400
That's a 4 hour setting. So someone who get this record will not ask for a new one until 4 hours have passed. If someone requests the ip address of your site 5 minutes before the server goes off line they will not get the updated information for 3+ hours. This is why a floating ip address is the way to go.
 
  


Reply

Tags
dns, email, ha, high, mx



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Linux high availability kirukan Linux - Newbie 6 09-01-2012 10:47 AM
High Availability ++nick++ Linux - Enterprise 7 02-07-2010 11:53 AM
[SOLVED] Linux high performance and high availability clustering Blue_Ice Linux - Software 2 03-27-2009 04:49 AM
High availability itziar2 Linux - General 5 12-02-2005 07:40 AM
High Availability Services!!!????help briant97 Linux - General 2 12-15-2000 09:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration