redis multi-functional machine Introduction (redis multi-function machine articles)

Introduction to Redis multi-function machine

Redis transition to multiple servers from a single server Redis

problem

So far, all the contents of this course is to introduce single Redis as the background, that is, and what we consider only a Redis server related. But in a production environment actually use Redis when using only a single Redis server is generally no way to meet our needs, limiting mainly from two aspects:

  1. Insufficient memory capacity : Redis use memory to store data in the database, but for a machine, the hardware memory capacity is limited, when the amount of data we need to store more than the machine's memory capacity, there is no way a server meet our request.

Examples: To store data of 128 GB, the largest machine but only to 64 GB; 1 TB of data to be stored, but only supports the largest machine 128 GB of RAM; and so on.

  1. Lack of processing power : and the amount of memory limitations of like, because of limitations of server hardware (including machine configuration and network resources, etc.), commands a server can handle the number of requests is limited, when the number of requests command we need to address more than the machine can handle the command number of requests, a server there is no way to meet our request.

Examples: 200,000 times per second to handle a request, but the machine can handle only 100,000 times per second request; million times per second to handle a request, but the machine can handle only 300,000 times per second, or 500,000 request; and so on.

Solution

In order to solve the aforementioned memory capacity is insufficient and inadequate processing capacity, we need to use Redis multi-function machine, the core purpose of these functions are dispersed deployment of the entire database to multiple servers above, and use multiple servers to process the command request.
Here Insert Picture Description
The system expansion to three servers, one server system from the stored data amount and the number of requests processed command will be improved.

Implementation

Redis provides multi-machine capabilities include:

  • Copy (replication), the processing capability of the system extended read request;
  • The Sentinel (Sentinel), the system provides high availability features to reduce downtime occurs;
  • Cluster (Cluster), expansion of the system capacity and the system processing capability database read and write requests, and provides high availability features;

Also Twitter is also open source proxy server named twemproxy (also called nutcracker), which supports Redis and Memcached protocol, scalable database system capacity and processing systems to read and write requests.

Published 252 original articles · won praise 151 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_39885372/article/details/104282328