Open Folas1337 opened 2 years ago
I might also want to add that for my use case (Redis) I was able to use KeyDB as a drop-in solution but I am still facing one issue which is the fault of the client software I'm using though. It doesn't try and reconnect on connection loss because it was obviously not programmed for high availability/redundancy. But this problem would also be solved with VRRP cause the client application would then not have to worry about any of this, it would still connect to the same IP as before, only that this IP is a VIP and will have moved by then, acting as if it's still the same connection.
So what I'm trying to say is that VRRP would still be greatly appreciated as it fixes some issues that could still be faced but for now I found a workaround that works well enough, even if not perfectly.
Tell us about your request There should be some way of setting a virtual IP and assigning it to several Docker containers which then decide upon other factors (such as status and priority) which container currently gets that virtual IP and which doesn't. This should also work within a swarm network! It doesn't have to be VRRP but rather some way of using a virtual IP within a Docker network to declare the current master container. The best way I could come up with to fix that was VRRP but there may be another solution. It needs to be a virtual IP that is assigned to a container as I want to connect within a docker network to those containers!
Which service(s) is this request for? Docker CLI (and Compose) I suppose?
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
Issue no. 1 could be resolved by giving the masters the service name redis1master and the replicas would be redis1replica and I set up my client containers to connect to redis1master but Issue no. 2 is still unresolved in this scenario.
Docker network VRRP would solve this issue by having a virtual IP (= VIP). Let’s say we pick 192.168.0.102 as a VIP and assign it to both master containers. Now I’d be able to tell all 3 client containers to connect to 192.168.0.102 and they would always connect to the same master with replica (though for my use case I don’t even need replicas and only masters as it’s literal messages that are being redistributed but that is besides the point here).
Are you currently working around the issue? Yes, by having only one instance of the database as there's no way to have redundancy as I need it (as explained above).