Redis cluster has some functional limitations compared to a single machine, so avoid them when using them. Note the following:
1) key batch operation support is limited. Such as mset and mget, currently only
keys with the same slot value are supported to perform batch operations. Keys mapped to different slot values are not supported because they may
exist on multiple nodes due to operations such as mget and mget.
2) Key transaction operation support is limited. Similarly, only transaction operations with multiple keys on the same node are supported.
The transaction function cannot be used when multiple keys are distributed on different nodes.
3) key is used as the minimum granularity of data partition , Therefore a large key-value object such as
hash, list, etc. cannot be mapped to different nodes.
4)Does not support multiple database spaces. Redis in stand-alone mode can support 16 databases. In cluster mode, only one database space, db0, can be used.
5) The replication structure only supports one layer. The slave node can only replicate the master node.
Does not support nested tree replication.
For more Redis-related technical articles, please visit the Redis Tutorial column to learn !
The above is the detailed content of What should you pay attention to when using redis cluster. For more information, please follow other related articles on the PHP Chinese website!