recently I am using docker to learn redis,
when I see that redis can be the master and slave, I use docker to deploy the service. In some businesses that need to be cached, there are some problems that I haven"t thought clearly in my mind
- redis is only used as a cached database. When docker is deployed, it is recommended to use compose cluster locally or swarm or kubernetes to do remote cluster (excuse me for not knowing much about kubernetes, misstatement)
- what are the scenarios in which redis is the master and slave?
- if you want to be a master and subordinate to redis, how do you answer 1?
- if you want to use sentinel for cluster monitoring of redis, what about the problem of 3?
I have implemented a simple local slave library based on compose. The cluster of redis is used as a slave library through the scale method, but there is a problem. The container service data from the library is all mounted to the same directory and the same file locally. So in this sense, multiple slave libraries are only run as programs, while the data are all backed up to the same file? in this way, is there any suitable application scenario for docker-compose "s scale method?.
my younger brother has just begun to learn the knowledge of service cluster by himself. There are a lot of things I don"t know very well. I hope the great god can give me some advice