Home>Article>Database> Why use redis cluster

Why use redis cluster

Joseph Gordon-Levitt
Joseph Gordon-Levitt Original
2019-08-02 15:30:10 3030browse

Why use redis cluster?

Why use redis cluster

Usually, in order to improve the website response speed, hotspot data is always saved in memory instead of directly Read from the backend database.(Recommended learning:Redis video tutorial)

Redis is a good Cache tool. For large-scale website applications, the amount of hotspot data is often huge, ranging from dozens to hundreds of gigabytes.

Due to memory size limitations, using one Redis instance obviously cannot meet the demand. In this case, multiple Redis (clusters) need to be used as cache databases. In order to respond quickly to user requests.

What is Redis cluster?

Redis cluster is a distributed, fault-tolerant Redis implementation. The functions that can be used by the cluster are a subset of the functions that can be used by ordinary stand-alone Redis. .

There is no central node or proxy node in the Redis cluster. One of the main design goals of the cluster is to achieve linear scalability.

Redis Cluster provides a way to run Redis where data is automatically partitioned across multiple Redis nodes. Redis Cluster also provides a level of availability during partitioning, which is the ability to continue running even if some nodes fail or are unable to communicate. However, if a major failure occurs (for example, when most masters are unavailable), the cluster will stop functioning.

Redis cluster model

1): All nodes are directly connected through service channels, and the speed and bandwidth of transmission are optimized through binary protocols between each node.

2): The client and the node communicate through the ascii protocol

3): The client and the node are directly connected, without the need for an intermediate Proxy layer. The client does not need to connect to all nodes in the cluster, it can connect to any available node in the cluster.

4): Although these nodes are connected to each other and have the same functions, they are still divided into two types of nodes: master and slave.

For more Redis-related technical articles, please visit theIntroduction to Using Redis Database Tutorialcolumn to learn!

The above is the detailed content of Why use redis cluster. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn