当前位置:网站首页>Redis highly available
Redis highly available
2022-06-24 15:10:00 【Quinlan】
Stand-alone version
characteristic : Simple
problem :
1、 Memory capacity is limited 2、 Limited processing capacity 3、 No high availability .
Master slave copy
Redis Copy (replication) The feature allows the user to follow one Redis Server to create any number of replicas of that server , Where the replicated server is the primary server (master), A server replica created by replication is a slave server (slave). As long as the network connection between the master and slave servers is working , Both master and slave servers will have the same data , The master server will always synchronize the updates that are happening to it To the slave server , This ensures that the master and slave servers always have the same data .
characteristic :
1、master/slave role
2、master/slave Same data
3、 Reduce master Reading pressure is transferring from the library
problem :
There is no guarantee of high availability
No solution master The pressure of writing
sentry
Redis sentinel It's monitoring in a distributed system redis Master slave server , And automatically fail over when the primary server is offline . Three of them :
monitor (Monitoring): Sentinel Constantly check whether your master and slave servers are working properly .
remind (Notification): When someone is being monitored Redis When there's a problem with the server , Sentinel Can pass API Send notifications to administrators or other applications .
Automatic failover (Automatic failover): When a primary server doesn't work , Sentinel An automatic failover operation will start .
characteristic :
1、 Guaranteed high availability
2、 Monitor each node
3、 Automatic failover
shortcoming : A master-slave mode , Switching takes time to lose data
No solution master The pressure of writing
colony (proxy type ):
Twemproxy It's a Twitter Open source redis and memcache Fast / Lightweight proxy server ; Twemproxy Is a fast single threaded agent , Support Memcached ASCII The protocol and redis agreement .
characteristic :1、 Varied hash Algorithm :MD5、CRC16、CRC32、CRC32a、hsieh、murmur、Jenkins
2、 Support automatic deletion of failed nodes
3、 Back end Sharding Sharding logic is transparent to business , The business side's reading and writing mode and operation are single Redis Agreement
shortcoming : Added a new proxy, Need to maintain its high availability .
failover Logic needs to be realized by itself , It can't support the automatic transfer of failure and has poor scalability , Manual intervention is required for expansion and contraction
colony ( Direct connected type ):
from redis 3.0 Later versions support redis-cluster colony ,Redis-Cluster Use a no center structure , Each node holds the data and the entire cluster state , Each node is connected to all other nodes .
characteristic :
1、 No central Architecture ( There is no node that affects the performance bottleneck ), Less proxy layer .
2、 Data according to slot Storage is distributed over multiple nodes , Data sharing between nodes , Data distribution can be adjusted dynamically .
3、 Extensibility , It can be linearly extended to 1000 Nodes , Nodes can be added or removed dynamically .
4、 High availability , Some nodes are not available , The cluster is still available . By increasing the Slave Make a backup copy of the data
5、 Realize automatic fault diagnosis failover, Nodes pass through gossip Protocol exchanges status information , By voting Slave To Master The role of .
shortcoming :
1、 Poor resource isolation , It is easy to interact with each other .
2、 Data is replicated asynchronously , Strong consistency of data is not guaranteed
边栏推荐
- Port conflict handling method for tongweb
- 实战 | 记一次曲折的钓鱼溯源反制
- Is it safe to open a stock account by mobile phone
- 个人如何开户炒股 炒股开户安全吗
- `Thymeleaf ` template engine comprehensive analysis
- 一个简单而功能强大的开发者工具箱Box3.cc
- 作为一名开发者,对你影响最深的书籍是哪一本?
- 成功解决:selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This versi
- Win10 system problems
- Don't underestimate the integral mall. It can play a great role
猜你喜欢

Laravel 8 realizes auth login
Bitmap of redis data structure

Py之toad:toad的简介、安装、使用方法之详细攻略

常见的单例模式&简单工厂
![[bitbear story collection] June MVP hero story | technology practice collision realm thinking](/img/b7/ca2f8cfb124e7c68da0293624911d1.png)
[bitbear story collection] June MVP hero story | technology practice collision realm thinking

In the eyes of the universe, how to correctly care about counting East and West?

laravel下视图间共享数据

Laravel8 uses faker to call factory to fill data

laravel8使用faker调用工厂填充数据

Left hand code, right hand open source, part of the open source road
随机推荐
Is it safe to open a stock account by mobile phone
A brief introduction to the lexical analysis of PostgreSQL
业务与技术双向结合构建银行数据安全管理体系
A common defect management tool - Zen, which teaches you from installation to using the handle
Is it safe to open an account for stock speculation in the top ten securities app rankings in China
How do individuals open accounts for stock speculation? Is it safe to open accounts for stock speculation
Laravel 8 realizes auth login
股票开户要找谁?在线开户安全么?
June training (day 23) - dictionary tree
leetcode. 12 --- integer to Roman numeral
安装wireshark时npcap怎么都安装不成功,建议先用winpcap
Stm32f1 and stm32cubeide programming examples -ws2812b full color LED driver (based on spi+dma)
ESP32系列--ESP32各个系列对比
Keras deep learning practice (11) -- visual neural network middle layer output
测试 H5 和小程序的区别,你真的知道吗?
左手代码,右手开源,开源路上的一份子
兴业证券靠谱吗?开证券账户安全吗?
成功解决:selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This versi
10_那些格调很高的个性签名
Left hand code, right hand open source, part of the open source road