Getting Started with Active Replication
#
Set up a network, run active replica servers, connect clients and test#
set up a network for our docker containers.you can view the network with $ docker network ls
#
launch nodes#
To launch with custom config file:#
To launch with updates to current config file:github page or use the updated one contained in this example:#
The following may assist when updating redis.config obtained from ourComment out “bind 127.0.0.1”, change "protected-mode" from yes to no. If you want to enable Active Replica Support then uncomment "active-replica yes".
#
To get the ipaddress of the node you just made:If you wanted to run a client to connect to a node on this network:
#
Test:Try creating two nodes, then connect one client to each as stated above. Once you are connected to the keydb server with keydb-cli, call each node to be a replica of the other node via REPLICAOF <your-node-ip-address>:6379
Once both nodes are replicas of eachother you can write SET testval1 hello
into one client, then on the next client write GET testval1
you should see the response "hello".