Am 11.04.2019 um 11:48 schrieb luckydog xf <luckydogxf@gmail.com>:
As your statement, nothing speical is needed to do except setting up DNS MX records, right?
MX records are for incoming MAIL:
yourdomain.com <http://yourdomain.com/> IN MX 100 mail1.yourdomain.com <http://server1.yourdomain.com/> yourdomain.com <http://yourdomain.com/> IN MX 100 mail2.yourdomain.com <http://mail2.yourdomain.com/>
-> both priority 100 = 50/50 load balancing (globally, not when checked on a single resolver!)
Then you need A Records (AAAA for ipv6)
mail1.yourdomain.com IN A 192.168.10.1 mail2.yourdomain.com <http://mail2.yourdomain.com/> IN A 192.168.20.1
mail.yourdomain.com IN A 192.168.10.1 mail.yourdomain.com IN A 192.168.20.1
mail1/mail2 is for direct connection (MTAs)
Your users (outlook, thunderbird, ...) connect to mail.yourdomain.com <http://mail.yourdomain.com/> which returns the two ip addresses.
In this scenario MUA just connects to mail.yourdomain.com <http://mail.yourdomain.com/> and randomly uses one of the two ips. You can't control which one, but this gives you active/active loadbalancing. In case one server is down the MUA just uses the other ip. dsync replicates bi-directionally so that both servers are up-to-date.
You don't need shared storage, every server is a copy of the other. If you want to use shared storage, then dsync is not for you because there is nothing to sync at that stage.
I would use shared storage only if you need to have more than two servers. The above setup has no locking problems and is performant due to local filesystems. It depends on how many users you have and how much storage you need. You could buy two 2HE servers with 24 2.5" disks each (up to 96 with 4 HE), which may be sufficient for your needs.
User's mail store is running on shared storage, basically user's MUA connects to primary MX , the backup one is used once Primary is down.
If you're not using Maildir beware of locking issues with concurrent access. It could crash indices.
It's a native HA of email system? I'll test those solution out.
Yes, it works well with small setups. For big setups you'd typically use dovecot director, shared storage, object storage ... but you need more servers and it is way more complex and expensive.
Best regards Gerald
Gerald Galster via dovecot schrieb:
mail1.yourdomain.com <http://mail1.yourdomain.com> IN A 192.168.10.1 mail2.yourdomain.com <http://mail2.yourdomain.com> IN A 192.168.20.1
mail.yourdomain.com <http://mail.yourdomain.com> IN A 192.168.10.1 mail.yourdomain.com <http://mail.yourdomain.com> IN A 192.168.20.1
mail1/mail2 is for direct connection (MTAs)
Your users (outlook, thunderbird, ...) connect to mail.yourdomain.com <http://mail.yourdomain.com> which returns the two ip addresses.
In this scenario MUA just connects to mail.yourdomain.com <http://mail.yourdomain.com> and randomly uses one of the two ips. You can't control which one, but this gives you active/active loadbalancing. In case one server is down the MUA just uses the other ip.
Are you sure that this is working?
Regards Patrick
-- Westenberg + Kueppers GbR Spanische Schanzen 37 ---- Buero Koeln ---- 47495 Rheinberg pwestenberg@wk-serv.de Tel.: +49 (0)2843 90369-06 http://www.wk-serv.de Fax : +49 (0)2843 90369-07 Gesellschafter: Sebastian Kueppers & Patrick Westenberg
Am 11.04.2019 um 13:45 schrieb Patrick Westenberg via dovecot <dovecot@dovecot.org>:
Gerald Galster via dovecot schrieb:
mail1.yourdomain.com <http://mail1.yourdomain.com> IN A 192.168.10.1 mail2.yourdomain.com <http://mail2.yourdomain.com> IN A 192.168.20.1
mail.yourdomain.com <http://mail.yourdomain.com> IN A 192.168.10.1 mail.yourdomain.com <http://mail.yourdomain.com> IN A 192.168.20.1
mail1/mail2 is for direct connection (MTAs)
Your users (outlook, thunderbird, ...) connect to mail.yourdomain.com <http://mail.yourdomain.com> which returns the two ip addresses.
In this scenario MUA just connects to mail.yourdomain.com <http://mail.yourdomain.com> and randomly uses one of the two ips. You can't control which one, but this gives you active/active loadbalancing. In case one server is down the MUA just uses the other ip.
Are you sure that this is working?
yes, I'm running a two node dsync cluster in production for a few years without issues. The system was even working during a whole datacenter outage because the nodes reside in different, distant locations. I would'nt use a filesystem like ceph with distant locations due to latency issues. dsync replication is asynchronous, so there is no problem.
Most cluster systems that use drbd, ceph, keepalived, pacemaker, whatever are operated within a single datacenter or datacenter park. If the datacenter goes down, your cluster is not reachable anymore. This is a rare event but within 10-15 years it happens to a lot of datacenters.
Best regards Gerald
It seems that we got 2 solutions.
- use DNS MX record and dsync plugin of dovecot. No shared storage.
- use VIP and shared storage.
I'll try both of them, thank you guys.
On Thu, Apr 11, 2019 at 8:45 PM Gerald Galster via dovecot < dovecot@dovecot.org> wrote:
Am 11.04.2019 um 13:45 schrieb Patrick Westenberg via dovecot < dovecot@dovecot.org>:
Gerald Galster via dovecot schrieb:
mail1.yourdomain.com <http://mail1.yourdomain.com> IN A 192.168.10.1 mail2.yourdomain.com <http://mail2.yourdomain.com> IN A 192.168.20.1
mail.yourdomain.com <http://mail.yourdomain.com> IN A 192.168.10.1 mail.yourdomain.com <http://mail.yourdomain.com> IN A 192.168.20.1
mail1/mail2 is for direct connection (MTAs)
Your users (outlook, thunderbird, ...) connect to mail.yourdomain.com <http://mail.yourdomain.com> which returns the two ip addresses.
In this scenario MUA just connects to mail.yourdomain.com <http://mail.yourdomain.com> and randomly uses one of the two ips. You can't control which one, but this gives you active/active loadbalancing. In case one server is down the MUA just uses the other ip.
Are you sure that this is working?
yes, I'm running a two node dsync cluster in production for a few years without issues. The system was even working during a whole datacenter outage because the nodes reside in different, distant locations. I would'nt use a filesystem like ceph with distant locations due to latency issues. dsync replication is asynchronous, so there is no problem.
Most cluster systems that use drbd, ceph, keepalived, pacemaker, whatever are operated within a single datacenter or datacenter park. If the datacenter goes down, your cluster is not reachable anymore. This is a rare event but within 10-15 years it happens to a lot of datacenters.
Best regards Gerald
participants (3)
-
Gerald Galster
-
luckydog xf
-
Patrick Westenberg