Re: master-master replication

Evgeniy Kononov egenius at inbox.ru
Thu Sep 13 07:11:50 EDT 2018


Hi!

Thank you for reply.
Users can connect to only one server at a time. I move the master server to another hardware and at this time it is necessary for users to use the mail.
If this is not a secure configuration, then can I just run "sync_client -A" from the master server, and then switch users to a replica? 
After that, swap the roles of master-replica between the servers? I'm right ?

>We use cyrus aggregator aka cyrus murder, and AFAIK fastmail also uses 
>multiple
>instances on one server with nginx frontends

Can you give an example of the configuration?

Best regards.

>Четверг, 13 сентября 2018, 13:22 +05:00 от Michael Menge <michael.menge at zdv.uni-tuebingen.de>:
>
>Hi,
>
>This setup is NOT SUPPORTED and WILL BREAK if the replication process 
>is triggered
>from the wrong server (user is active on both servers, user switched 
>from one server
>to the other while the sync-log file is still processed, after split 
>brain) and
>some mailboxes have been subscribed, renamed created deleted.....
>
>Also there is the risk of a race condition with subscriptions, if a 
>user subscribes
>to multiple folders, the first will trigger a sync from A to B, but as 
>the folder
>is subscribed on B it will trigger a sync from B to A, witch can undo the next
>folder subscription.
>
>These are only some cases that came to my mind. There will be more 
>cases and it
>will be hard to debug. So DON'T DO IT!
>
>What we do is, that we have distributed our users between multiple
>instances, and each server is running one instance as master and one other
>as replic. In case of failure or maintenance we stop the master instance, and
>promote the corresponding replic and configure them so that they will sync
>them back. If the old master is up to date we switch them back.
>
>We use cyrus aggregator aka cyrus murder, and AFAIK fastmail also uses 
>multiple
>instances on one server with nginx frontends
>
>Regards,
>
>    Michael
>
>
>
>
>
>Quoting Evgeniy Kononov via Info-cyrus < info-cyrus at lists.andrew.cmu.edu >:
>
>> Sorry! Previous message was sent by mistake.
>>
>> For example, I can configure both servers as follows.
>>
>> Server A.
>> -----------------
>> /etc/cyrus.conf
>> START {
>> ...
>> syncclient       cmd="sync_client -r"
>> ...
>> }
>> SERVICES {
>> ...
>> syncserver       cmd="sync_server" listen="csync"
>> ...
>> }
>>
>> /etc/imapd.conf
>> ...
>> sync_host: SERVER-B
>> sync_authname: admin
>> sync_password: password
>> sync_log: 1
>> sync_repeat_interval: 30
>> sync_timeout: 600
>> sync_shutdown_file: /var/lib/imap/syncstop And the same on server B.
>> -----------------
>> /etc/cyrus.conf
>> START {
>> ...
>> syncclient       cmd="sync_client -r"
>> ...
>> }
>> SERVICES {
>> ...
>> syncserver       cmd="sync_server" listen="csync"
>> ...
>> }
>>
>> /etc/imapd.conf
>> ...
>> sync_host: SERVER-A
>> sync_authname: admin
>> sync_password: password
>> sync_log: 1
>> sync_repeat_interval: 30
>> sync_timeout: 600
>> sync_shutdown_file: /var/lib/imap/syncstop
>> Both server will be as master and as slave in one time.
>>
>> Will there be any problems with this configuration?
>> Thank you. --
>> Evgeniy Kononov
>
>
>
>--------------------------------------------------------------------------------
>M.Menge                                Tel.: (49) 7071/29-70316
>Universität Tübingen                   Fax.: (49) 7071/29-5912
>Zentrum für Datenverarbeitung          mail: 
>michael.menge at zdv.uni-tuebingen.de
>Wächterstraße 76
>72074 Tübingen
>
>----
>Cyrus Home Page:  http://www.cyrusimap.org/
>List Archives/Info:  http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>To Unsubscribe:
>https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

-- 
Evgeniy Kononov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20180913/2bd78e41/attachment-0001.html>


More information about the Info-cyrus mailing list