Use Redis partition to split data into multiple Redis instances
Partitioning is the process of dividing all data into multiple Redis instances. Therefore, each Redis instance stores a subset of all key values.
Redis partition has two main objectives:
1) Allow the memory of multiple computers to store larger data. If no partition is made, the memory size of a single computer is limited.
2) use the computing power and network bandwidth of multiple computing units
There are many different partition scenarios. For example, there are four Redis instances R0, R1, R2, and R3. Many of them indicate the user's key values, such as user: 1, user: 2, user: 3 ..... There are many ways to map a specified key value to a specified Redis instance.
One of the partitioning methods is range partitioning, Which is mapped to a specific Redis instance based on the object range. For example, the user's ID is stored from 0 to 10000 to R0, IDs are stored from 10001 to 20000 on R1. However, a disadvantage of this partitioning method is that you need to maintain a table with a key value range to the range of the backend Redis instance. This table needs to be maintained and each object requires a table like this. Therefore, this partitioning method is often not an ideal partitioning method.
Another partition method is hash partitioning. This partition mode is valid for any key value. One of the advanced hash partitioning supported by many Redis client programs and proxy tools is consistent hashing.
Different Redis partition implementation methods:
Client side partitioning
Proxy received partitioning
Query routing
References: http://redis.io/topics/partitioning
Install and test Redis in Ubuntu 14.04
Redis cluster details
Install Redis in Ubuntu 12.10 (graphic explanation) + Jedis to connect to Redis
Redis series-installation, deployment, and maintenance
Install Redis in CentOS 6.3
Learning notes on Redis installation and deployment
Redis. conf
Redis details: click here
Redis: click here
This article permanently updates the link address: