Just an idea for multi-servers serving 1 domain

txn

Verified User
Joined
Jun 4, 2007
Messages
39
Hi everyone,


I current have 2 DA servers, and they are located in difference place. I'd like to set up a simple rsync between servers. Server 192.168.1.10 and server 192.168.1.11

I set round robin for DNS and email. The DNS is running fine ,but only email has problem. If someone send email to my server [email protected] then only one server receive it (either 192.168.1.10 or 192.168.1.11 but not both).

here is my algorithm for my mydomain.com.db in /var/named:
Code:
$TTL 3600
@       IN      SOA     ns1.mydomain.com.      root.mydomain.com. (
                                                2007121402
                                                3600
                                                3600
                                                1209600
                                                86400 )

mydomain.com. 3600    IN      NS      ns1.mydomain.com.
mydomain.com. 3600    IN      NS      ns2.mydomain.com.
mydomain.com. 3600    IN      NS      ns3.mydomain.com.
mydomain.com. 3600    IN      NS      ns4.mydomain.com.

ftp     3600    IN      A       192.168.1.10
ftp     3600   IN      A        192.168.1.11

localhost       3600    IN      A       127.0.0.1
mail   3600    IN      A       192.168.1.10
mail    3600   IN      A         192.168.1.11

pop     3600    IN      A       192.168.1.11
pop     3600   IN      A       192.168.1.10
mydomain.com. 3600    IN      A       192.168.1.10
mydomain.com. 3600   IN      A        192.168.1.11
www     3600    IN      A       192.168.1.10
www     3600   IN      A      192.168.1.11

mydomain.com. 3600    IN      MX      10 mail



mydomain.com. 3600    IN      TXT     "v=spf1 a mx ip4:192.168.1.10 ?all"
mydomain.com. 3600   IN      TXT     "v=spf1 a mx ip4:192.168.1.11 ?all"

I turned off server .10 then email will come to server .11 and vice versa. But when both servers on then only one of them (either server .11 or server .10 but not both) receives email.

For this problem, i'm thinking setup rsync for both servers and cron job run every minute. Have anyone setup this before ? I'm really need your advises . Thanks
________
GROWING MARIJUANA
 
Last edited:
I've posted over and over again that failover and high-availability just arent as simple as you'd think.

Using rsync the way you suggest will cause many problems.

For example, some emails will be picked up before they're rsynced, others will be rsynceds to both servers and picked up twice.

Your clients will get two of many emails.

Jeff
 
I agreee with Jeff, this only works when you're using network storage, so the webservers are being used for.... serving websites. Use the network storage as mailserver. And there is another problem; how to handle sessions if you're using round-robin DNS... If you're looking for a HA solution, simply use DA in a virtualised enviroment. Make snapshots using LVM of a network-storage and if the frondend goes down, simply start it from another host.
 
Back
Top