Search code examples
redisreplicationredislabs

How to implement Redislabs Enterprise Cluster High Availibility?


Started learning RedisLabs Enterprise Cluster, but I confused on how to implement the High Availibility using RLEC. I understand that the RLEC using proprietary replication, which is different from the open source Redis. What I want to achieve is if my master db went down, my app still will able to function normally by connecting to the replica db.

My question are :

  1. I have already created 2 nodes. If I created a new Redis DB named testing with replication enabled, in which node is the master DB ( and which one is the slave )? Is the current master indicated by the endpoint?

nodes enter image description here

  1. I connected to localhost:19332 in each server( as displayed in endpoint ). Why I am able to do set from both server? (And it appears in both of the server). I thought usually the replication should be one way from master to slave?

enter image description here


Solution

  • I'll give you a few high level pointers, if you would like to get more info, please contact us at support@redislabs.com

    For true HA your RLEC cluster should have at least 3 nodes, so you should add another node to your cluster. Once you create a Redis resource, you can configure it to be HA by simply enabling replication.

    All you need is to connect your app to the endpoint provided in the UI. In case the node with the master Redis will go down, RLEC will automatically promote the slave and redirect your app requests to the new master.

    Note, that you do need to configure DNS, and your cluster name must be a FQDN.

    Regarding the redis-cli -p 19332 that works locally from both nodes, as my colleague @ItamarHaber mentioned, you are communicating with the Redis resource through a proxy, all requests are served by your master Redis process.