LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Clustering mail servers (CentOS/Amazon EC2) (https://www.linuxquestions.org/questions/linux-server-73/clustering-mail-servers-centos-amazon-ec2-864589/)

samarudge 02-23-2011 01:27 PM

Clustering mail servers (CentOS/Amazon EC2)
 
Hi,
I'm looking to set up a clustered mail server, I kind-of know how I'm going to do it but wanted to check if there was a better way.
So we have 3 mail servers, running as EC2 instances on Amazon AWS. We were going to achieve clustering by giving all three a shared EBS storage device to store the mail. The mail would be received by any of the three servers (Via postfix) and could be retrieved from any of the three servers (via dovecot).
For receiving mail (SMTP), the domains would have 3 MX records pointing to each of the servers but for sending and retrieving mail (SMTP and POP3/IMAP) the three servers would have one DNS A record with 3 IPs associated (I know when using this method for web-servers, the load gets distributed among the IPs under that record but I'm not sure if this will work for SMTP/POP3/IMAP).

What we want is to have 3 servers that share the load equaly but are completely redundant for all services (POP3, IMAP and SMTP). We also need to be able to scale upwards so if we need to add more servers we can do easily. Also the servers must be perfectly synchronized at all times.

-Sam

mpapet 02-25-2011 05:09 PM

Quote:

Originally Posted by samarudge (Post 4268820)
Hi,
I'm looking to set up a clustered mail server, I kind-of know how I'm going to do it but wanted to check if there was a better way.
So we have 3 mail servers, running as EC2 instances on Amazon AWS. We were going to achieve clustering by giving all three a shared EBS storage device to store the mail. The mail would be received by any of the three servers (Via postfix) and could be retrieved from any of the three servers (via dovecot).
For receiving mail (SMTP), the domains would have 3 MX records pointing to each of the servers but for sending and retrieving mail (SMTP and POP3/IMAP) the three servers would have one DNS A record with 3 IPs associated (I know when using this method for web-servers, the load gets distributed among the IPs under that record but I'm not sure if this will work for SMTP/POP3/IMAP).

What we want is to have 3 servers that share the load equaly but are completely redundant for all services (POP3, IMAP and SMTP). We also need to be able to scale upwards so if we need to add more servers we can do easily. Also the servers must be perfectly synchronized at all times.

-Sam

Judging by your description, it doesn't sound like you do much email processing.

How much mail are you planning to handle? Processing mail is not computationally expensive.

An active/passive cluster and dns failover should do just fine.

samarudge 02-26-2011 02:28 AM

Quote:

Originally Posted by mpapet (Post 4271400)
Judging by your description, it doesn't sound like you do much email processing.

How much mail are you planning to handle? Processing mail is not computationally expensive.

An active/passive cluster and dns failover should do just fine.

We are currently running a single mail server (as an AWS instance) and it can't cope with the mail it's got at the moment so we need to expand to multiple servers (With it being AWS, we can't just increase the capacity) so just using DNS failover wouldn't help the problem, we need to distribute the load between at least 2 but preferably 3 servers.
-Sam


All times are GMT -5. The time now is 06:49 AM.