🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)
🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)

🔧 Programmierung 🕛 kürzlich 7 Min Lesezeit
0

CouchDB: Offline-first with multi-master synchronization using Docker and Docker-compose

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

In this post, I'll show how to simulate a multi-master synchronization with and is a using so the database file is not locked during writes (this helps performances). Conflicts are reported and managed at application level.


  • thanks to based on the Apache CouchDB )






  • What's a multi-master synchronization



    Quoting



    It's worth note, in this schema, that the synchronization is bidirectional:




    • Alpha and Beta synchronize data bidirectionally

    • Alpha and Gamma synchronize data bidirectionally

    • Beta and Gamma don't need to be synchronized because they're already synchronized with Alpha, in this way I save network bandwidth.

    • Nothing prevents to implement data replication between Beta and Gamma, but in my case I prefer to save network bandwidth (so it's a precise architectural choice).






    POC



    Following I'll show all steps to simulate a multi-master synchronization. After tested the data replication, I'll consider an off-line scenario putting a database off-line.






    Multi-master synchronization: Running all instances of CouchDB



    To implement the scenario described above, I'll use published on ):




    CODE
    [chttpd]
    port = 5984
    bind_address = 0.0.0.0






    Finally, I've mapped on the host file system (in the folder ./db/[alpha|beta|gamma]/) each database.



    Now we can start the databases:




    CODE
    am@animus:~$docker-compose up -d









    Multi-master synchronization: Creating databases to be synchronized



    Using for Alpha installation


  • for Gamma installation



  • For each installation, Select Databases from side menu and then Create Database, type the name of the database (in my case mydb) and click on create button like shown below:





    In this page we can create the replications.





    Wait few seconds and the document you've just created is sent to other databases (here we go!).






    Multi-master synchronization: Creating documents off-line



    I turn off database Alpha and Gamma running the following commands:




    CODE
    am@animus:~$docker kill couchdb_couchserveralfa_1 && docker kill couchdb_couchserverbeta_1






    On database gamma I create the document while the other databases are off-line.



    After the creation of the new document I turn on the other databases running:




    CODE
    am@animus:~$docker-compose up -d






    Wait few seconds and the document you've just created on Gamma database is sent while the other databases were off-line. So we've just proved that the synchonization works when they return on-line (here we go!).






    Conclusions



    In this article, I've shown how to simulate the multi-master synchronization of CouchDB and how to simulate an off-line scenario where I show that data keep on to be available for local operations and then be synchronized when the database returns on-line.

    In these scenarios, CouchDB turned out a good solution.

    Suggestions and corrections are welcome.

    Vollständiger Original-Bericht
    Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
    ↗ Original-Artikel auf dev.to lesen
    Wie bewertest du diesen Beitrag?
    1 Klick Feedback
    Teilen mit Netzwerk & Team:

    Community-Analysen & Experten-Meinungen 0

    Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
    Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
    Community Pulse: Relevanz-Einschätzung
    1 Klick Experten-Votum
    🔴 Akute Relevanz 0%
    🟡 In Evaluierung 0%
    🟢 Keine Auswirkung 0%
    Spannende Innovation 0%
    Verwandte Story-Cluster & Quellen (Vektor-KI)
    Port 8095 Engine
    3 Quellen
    GPT-6 Astra Release Today? OpenAI’s Next Major AI Model Is Almost Here
    1 Quelle
    Apple accuses OpenAI of destroying evidence as trade-secrets fight intensifies
    1 Quelle
    Major AI platforms go down in unprecedented simultaneous outage
    Ähnliche Beiträge
    🔍 Verwandte News

    Auch interessante Nachrichten CouchDB: Offline-first with multi-master synchronization using Docker and Docker-compose

    Thematisch verwandte Begriffe: CouchDB, Offlinefirst, with, multimaster · 6 Treffer

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...