当前位置:网站首页>Redis master-slave structure and application scenarios
Redis master-slave structure and application scenarios
2022-06-28 07:55:00 【star++】
summary
Generally speaking, the master-slave structure is used to achieve high availability , That is, when the primary server goes down , Switch to the slave server immediately . The master-slave structure has many advantages , such as : High availability , Read write pressure separation ; It also brings problems , The master-slave data may be inconsistent , Cause dirty data to be read .redis Since the master-slave structure is supported , Naturally, these problems also exist , We can see redis How to solve these problems .
principle

explain : Normal master-slave synchronization structure , The slave node simply executes replicaof Command is enough

explain : One of them salve Dropped the line or hung up ( Generally speaking , The master and slave are in a network segment , It is unlikely to be disconnected , There is a high probability of downtime ), This
When master The newly accepted log cannot be sent to this slave, Lead to master-slave synchronization delay ,master Will temporarily put the newly accepted command into
repl_backlog_buffer( Ring buffer ),master_repl_offset As the number of requests increases
Long ,slave_repl_offset The record is slave Synchronized location , wait for salve Network recovery , Continue to synchronize the remaining logs .

explain : The master-slave structure is generally designed to prevent master Downtime , Then it involves choosing a new master, Resynchronization issues .redis It is the use of sentinels to
New election master, The election process is probably to eliminate the nodes with poor network first , Then, according to the priority of the node configuration , Then judge the synchronization progress , The last is
Find the first to go online, that is ID The smallest . After the election ,
边栏推荐
- SOC clock configuration
- Unity UI shadow component
- Update pip to the latest version
- Path alias specified in vite2.9
- [ thanos源码分析系列 ]thanos query组件源码简析
- Is it safe for flush to open an account online
- SQL master-slave replication setup
- PLC -- Notes
- GoLand IDE and delve debug Go programs in kubernetes cluster
- Ambari (IX) --- use expect to realize no interaction in ambri server setup phase (valid for personal test)
猜你喜欢

22/02/15 study notes

Application of XOR. (extract the rightmost 1 in the number, which is often used in interviews)

What is EC blower fan?

es6箭头函数中return的用法

goland IDE和delve调试位于kubernetes集群中的go程序

No suspense about the No. 1 Internet company overtime table

Idea package together, using compact middle packages to solve &

Static resource compression reduces bandwidth pressure and increases access speed

ACM notes

Hash slot of rediscluster cluster cluster implementation principle
随机推荐
HJ prime factor
HJ明明的随机数
Unity UI shadow component
MMR rearrangement (similarity is calculated by editing distance and repeatability)
flex布局
Hash slot of rediscluster cluster cluster implementation principle
7-1 understand everything
Software design of power control board
pip 更新到最新的版本
Disposition Flex
Redis one master multi slave cluster setup
分析 NFT 项目的 5 个指标
Leetcode learning records
asp. Net upload image path and image name
PLC -- Notes
Configuring multiple instances of MySQL under Linux
Kubernetes理论基础
【尚品汇】项目笔记
Is it reliable to open an account by digging money? Is it safe?
Section VI UART of zynq