KeyDB
KeyDB copied to clipboard
MultiMaster Mode and Dns Resolve
Hi,
I'm trying to install keydb as multimaster in a kubernetes environment. Kubernetes has headless service feature, so we can reach pods over dns with balancing and if we execute nslookup on the service it returns all ip addresses of the pods. I want to automatize scaling scenario, but I don't know all ip addresses of the pods at startup, Also pod count may increase or decrease by scaling, so I don't know all pod dns names at startup. One of my question is, the replicaof
parameter must be specified for all keydb instances in multimaster mode, or one of them is enough? If I give first keydb instance as replicaof
parameter, all instances seem work, but i wasn't sure. The Info displays 1 master and multiple slaves. Other question is that, does keydb use dns name or resolved ip address for replicaof
? I mean if I set a dns name for replicaof parameter, and if it resolves and use ip address, I must update replicaof
everytime when the replicated instance is restarted which its ip address will change because of nature of kubernetes.