当前位置:网站首页>redis集群
redis集群
2022-07-27 05:01:00 【一梦无痕bzy】
一、主从模式:关键点是同步数据,可在配置文件中选择用哪种同步方式
1、强一致性同步数据:
客户端调redis,主写成功,往从备份,从成功告诉主,然后主才给客户端返回告诉操作成功。这样如果从一旦挂了一个,就会不返回了,给人的感觉就是服务有问题了。所以强一致性容易造成集群不可用(不推荐使用)

cap:一致性(强一致性)、可用性、分区容错性(集群)。不可兼得最多只能得两个。mysql是ca、redis集群是ap
2、弱一致性同步数据:
客户端调redis,主写成功立即返回。然后异步告诉从,至于从能否一定写成功不一定。弱一致性容易丢数据(redis主要使用的一种方式)
所以redis的分布式锁其实并不是特别准确,但是对于互联网企业来说这不重要大不了就投诉人工协商解决呗。但是对于金融类的这是万万不行的
3、最终一致性同步数据:过半机制ÿ
边栏推荐
- JVM上篇:内存与垃圾回收篇五--运行时数据区-虚拟机栈
- B1031 check ID card
- 树莓派rtmp推流本地摄像头图像
- JVM Part 1: memory and garbage collection part 12 -- stringtable
- B1021 single digit statistics
- Could not autowire.No beans of ‘userMapper‘ type found.
- pyside2____ 1. Installation and case listing
- idea远程调试debug
- Demo of throttling function -- regular expression matching
- Introduction to Web Framework
猜你喜欢

B1021 single digit statistics

JVM Part 1: memory and garbage collection part 10 - runtime data area - direct memory

树莓派rtmp推流本地摄像头图像

Could not autowire.No beans of ‘userMapper‘ type found.

Alphabetic order problem

JVM上篇:内存与垃圾回收篇六--运行时数据区-本地方法&本地方法栈

JVM Part 1: memory and garbage collection part 14 -- garbage collector

数据库设计——关系数据理论(超详细)

JVM Part 1: memory and garbage collection part 11 -- execution engine

OFDM 16 lecture 2-ofdm and the DFT
随机推荐
How idea creates a groovy project (explain in detail with pictures and texts)
弹球小游戏
B1024 scientific counting method
2022 Zhengzhou light industry Freshmen's competition topic - I won't say if I'm killed
idea远程调试debug
整合SSM
What is the future development direction of software testing engineers?
LeetCode之6 ZigZag Conversion
Laozi cloud and Fuxin Kunpeng achieved a major breakthrough in 3D ofd 3D format documents for the first time
String class
1、 MySQL Foundation
笔记系列之docker安装Postgresql 14
JVM上篇:内存与垃圾回收篇九--运行时数据区-对象的实例化,内存布局与访问定位
JVM上篇:内存与垃圾回收篇七--运行时数据区-堆
[optical flow] - data format analysis, flowwarp visualization
B1029 旧键盘
SSM framework integration
精选用户故事|洞态在聚水潭的误报率几乎为0,如何做到?
A math problem cost the chip giant $500million
Introduction to dynamic memory functions (malloc free calloc realloc)