You need the machines in the cluster to maintain data consistency, provided there is a master-slave relationship.
If you perform an incr operation on a variable a on machine A to 10000, other machines will not update your value, unless your machine is the master in the cluster, and other machines are slaves of your machine. In this way, other machines will update their own a value to 10000;
The same goes for adding a machine. If the added machine is the slave of your machine, it will update the value of a. Start from 10000.
Have you seen the implementation and configuration of redis cluster? Redis's own cluster implementation is for example three machines ABC. If there is key: "A_KEY" in A, then if you operate the cluster to get set, no matter which machine (ABC) you execute it on, you will get the key in A: "A_KEY" , so the answer to your question is no problem.
But you mentioned adding machines. The above answer is based on the assumption that you, as a user, have done everything correctly. To add machines, you will need to change the weight previously assigned to ABC3 machines to ABCD4 machines, so there are some Something to operate on.
You need the machines in the cluster to maintain data consistency, provided there is a master-slave relationship.
If you perform an incr operation on a variable a on machine A to 10000, other machines will not update your value, unless your machine is the master in the cluster, and other machines are slaves of your machine. In this way, other machines will update their own a value to 10000;
The same goes for adding a machine. If the added machine is the slave of your machine, it will update the value of a. Start from 10000.
Have you seen the implementation and configuration of redis cluster? Redis's own cluster implementation is for example three machines ABC. If there is key: "A_KEY" in A, then if you operate the cluster to get set, no matter which machine (ABC) you execute it on, you will get the key in A: "A_KEY" , so the answer to your question is no problem.
But you mentioned adding machines. The above answer is based on the assumption that you, as a user, have done everything correctly. To add machines, you will need to change the weight previously assigned to ABC3 machines to ABCD4 machines, so there are some Something to operate on.