Search code examples
memgraphdb

Does the REPLICA instance automatically promote itself when the MAIN instance is DOWN?


I'm testing the MAIN-REPLICA concept with Memgraph. I've read the questions on Stackoverflow and I've consulted the documentation. I get it how it works but I can't find the answer to the question if there is a was to promote REPLICA instance when the MAIN instance is DOWN but without my need to run the query SET REPLICATION ROLE TO MAIN.

Is there some watchdog system that would check the status of MAIN and then promote REPLICA if MAIN can't be reached? I was thinking about creating an external script that would check the status of the instances and then execute queries based on it. But if there is already something out there it would be great to hear.


Solution

  • In the current version of Memgraph (2.14) you can't do that, but there is a plan to add that feature in one of the next releases. Here is a GitHub issue where you can track the progress.

    Disclamier: I work for Memgraph.