Allow REDIS_CLUSTER environment variable to use Redis in cluster mode#2377
Allow REDIS_CLUSTER environment variable to use Redis in cluster mode#2377n1mmy wants to merge 2 commits intonextcloud:masterfrom
Conversation
Signed-off-by: Nick Martin <[email protected]> Signed-off-by: Nick Martin <[email protected]>
06183c8 to
f756178
Compare
|
@J0WI I can give it shot when I have some free development time in the next week or two. I don't have a great testing environment at the moment, but I'll figure something out. Please don't wait for me though, if other things are ready to merge go ahead and merge them and I can update this PR for the new changes. |
|
After looking at the other PRs in more detail, I realize this PR needs to update |
|
Nevermind. I found a better way to accomplish what I was trying to do without having to change the docker image. In case anyone is looking for how to set up redis cluster mode, here's what I did:
Here are the contents of my If you are running docker on the command line, you can bind mount it into the appropriate place by adding If you are using Kubernetes, you can use a Once you php sessions using redis cluster and nextcloud itself using redis cluster, you can scale to multiple replicas of the nextcloud process and have a high availability setup. Hope this helps someone in the future! |
Using a Redis cluster instead of a single host allows for a more high-availability deployment.
This patch is only allows a single seed host. A more full implementation would have some way to support multiple seed hosts (eg a comma separated list, or multiple environment variables). However, this is enough to get started and works well in environments that have a single name/IP that will connect to a redis cluster (eg a load balancer or a kubernetes service).