当前位置:网站首页>Why does redis cluster use reverse proxy? Just read this one
Why does redis cluster use reverse proxy? Just read this one
2022-07-27 23:55:00 【Xi. Technical chopping】
If there is no reverse proxy , a Redis You may need to connect to many clients :

Looking at whether it's very flustered ? Look, it doesn't matter , The main reason is that the connection consumes thread resources , Without an agent ,Redis A large part of resources should be used to establish a connection with the client ,redis It's highly available and scalable, whether it's built-in Redis Sentinel still Redis Cluster Both require additional support from the client , At present, there is basically no suitable client that can do these things , It's not appropriate for clients to do these things , It makes maintenance particularly difficult .
So in the client and redis An ideal solution is to add a layer of proxy between servers , Proxy shield back end Redis The implementation details are provided to the client redis service , It's a perfect solution Redis High availability and scalability issues of , At the same time, the introduction of agent also makes Redis Maintenance becomes easier .
So , With an agent :
How to use a proxy ?
It's simple , Connect the request to the scheduling agent , from Proxy Responsible for forwarding requests to the following Redis Service instance , Icon :

There's a new problem ,Proxy Hang up, but how to fix it ?
therefore Proxy And we need to do clustering , You can even add a layer of load balancing in front of it , Load balancing , Single machine also has single point of failure and other problems , One Director Definitely not , Maybe I hung up again , So the whole host and backup , The standby plane passes through KeepAlived To detect the main LVS health , If something goes wrong, go to the top .

Redis Proxy plug-in
Redis There are many proxy plug-ins , Here are a few
| predixy | High performance, all features redis agent , Support Redis Sentinel and Redis Cluster |
|---|---|
| twemproxy | Fast 、 Lightweight memcached and redis agent |
| codis | redis Cluster agent solution |
| redis-cerberus | Redis Cluster agent |
Agent detailed function comparison
| characteristic | predixy | twemproxy | codis | redis-cerberus |
|---|---|---|---|---|
| High availability | Redis Sentinel or Redis Cluster | Consistent Hashing | Redis Sentinel | Redis Cluster |
| Scalable | Key Hash distribution or Redis Cluster | Key Hash distribution | Key Hash distribution | Redis Cluster |
| development language | C++ | C | GO | C++ |
| Multithreading | yes | no | yes | yes |
| Business | Redis Sentinel Model sheet Redis Group support | I won't support it | I won't support it | I won't support it |
| BLPOP/BRPOP/BLPOPRPUSH | Support | I won't support it | I won't support it | Support |
| Pub/Sub | Support | I won't support it | I won't support it | Support |
| Script | Support load | I won't support it | I won't support it | I won't support it |
| Scan | Support | I won't support it | I won't support it | I won't support it |
| Select DB | Support | I won't support it | Support | Redis Cluster only one DB |
| Auth | Support to define multiple passwords , Give different read-write and management rights and Key Access space | I won't support it | Same as redis | I won't support it |
| Read from node | Support , Rich rules can be defined to read the specified slave node | I won't support it | Support , Simple rules | Support , Simple rules |
| Multi room support | Support , Rich rules can be defined to schedule traffic | I won't support it | Limited support | Limited support |
| Statistics | Enrich | Enrich | Enrich | Simple |
Simply speaking ,predixy Support both Redis Sentinel Also support Redis Cluster
- The back end is Redis Sentinel A group of monitors Redis, The function is completely equivalent to the original Redis
- The back end is Redis Sentinel Monitoring multiple groups Redis, Some functions are limited
- The back end is Redis Cluster, The function is totally equivalent to Redis Cluster
边栏推荐
- Character stream learning 14.3
- 为什么需要等待计时2MSL?
- Shuffle, partition and read of tfrecord
- 面试官问线程安全的List,看完再也不怕了!
- BUUCTF-RSA
- org.junit.runners.model. InvalidTestClassError: Invalid test class ‘com.zhj.esdemo. MysqlTests‘: 1.
- NDK series (6): let's talk about the way and time to register JNI functions
- 资深如何确定软件测试结束的标准
- JS array copy speed test 220320
- BUU-CTF basic rsa
猜你喜欢

【开发教程11】疯壳·ARM功能手机-定时器实验教程

NDK series (6): let's talk about the way and time to register JNI functions

29. Learn the stacked column chart of highcharts using percentage
![[RoarCTF2019]babyRSA威尔逊定理](/img/c1/52e79b6e40390374d48783725311ba.gif)
[RoarCTF2019]babyRSA威尔逊定理

Starfish OS X metabell strategic cooperation, metauniverse business ecosystem further

Latex常用总结(2):输入矩阵(输入矩阵、对角阵、方程组等)

File & recursion 14.1

Bank Marketing预测一个客户购买理财产品的成功率
![[C language] address book (dynamic version)](/img/29/3df19c187bee31ee4671e12d7cc7ff.jpg)
[C language] address book (dynamic version)

J9数字科普:Sui网络的双共识是如何工作的?
随机推荐
JUC工具包学习
Redis的分布式锁
Use of date
Nail alarm tool
Elk log analysis system installation and deployment
【zer0pts CTF 2022】 Anti-Fermat
[GWCTF 2019]BabyRSA1
MapReduce (III)
[ACTF新生赛2020]crypto-aes
Join hands with Changjiang storage, jiangbolong launches the world's smallest expansion card
Flutter pull_ to_ refresh-1.6.0/lib/src/internals/slivers. dart:164:13: Error: Method not found: ‘descr
Spark 离线开发框架设计与实现
Lua基础语法学习
Monologue of a software Investor: why don't I pursue fast-growing companies
What are the methods of process synchronization?
JS提升:JS中的数组扁平化问题
Socket interaction process of four waves
Yijia will release ODM orders in 2020 and make efforts in the middle and low-end market
How to bold font in Latex & how to make circle serial number
[MRCTF2020]babyRSA