当前位置:网站首页>论高可用架构
论高可用架构
2022-06-11 18:02:00 【thoughtCodes】
1、高可用架构具备特征
1、主从切换或双机双工
1)主从切换,是当其中一台机器的服务宕机后,对于调用者来说,能够迅速的切换到其他可用服务,从服务升级为主服务,这种切换速度应当控制在秒级别。
当宕机的服务恢复之后,自动变为从服务,主从服务角色切换。主从切换一定是要付出代价的,所以当主服务恢复之后,也就不再替换现有的主服务。
2)双机双工方式(互备互援) 工作原理:两台主机同时运行各自的服务工作且相互监测情况,当任一台主机宕机时,另一台主机立即接管它的一切工作,保证工作实时,应用服务系统的关键数据存放在共享存储系统
2、集群工作
请求量比较大,单台服务不能满足需要,此时需要多台机器提供同样的服务,将所有请求分发到不同机器上。
高可用架构中应该具有丰富的负载均衡策略和易调节负载的方式。
甚至可以自动化智能调节,例如由于机器性能的原因,响应时间可能不一样,这时候可以向性能差的机器少一点分发量,保证各个机器响应时间的均衡。
3、横向易扩展
当用户量越来越多,已有服务不能承载更多的用户的时候,便需要对服务进行扩展,扩展的方式最好是不触动原有服务,对于服务的调用者是透明的。
2、高可用方案
1、数据库
一主多从,读写分离
2、nginx负载均衡
nginx是一个反向代理服务器,拥有丰富的负载均衡策略,用于客户端与服务器之间,作为负载均衡的实现。
反向代理:被代理的是服务器,也就是客户端访问了一个所谓的服务器,服务器会将请求转发给后台真实的服务器,真实的服务器做出响应,通过代理服务器将结果返给客户端。服务器对于用户来说是隐藏的,用户不知道真实的服务器是哪个。
用nginx做实现服务的高可用,nginx本身可能成为单点,遇见的两种解决方案,
一种是公司搭建自己的DNS,将请求解析到不同的NGINX,
一种是配合keepalive实现服务的存活检测。如下图:
3、redis
1)多主多从模式,三主三从集群模式,部署在三台服务器上
2)伪集群模式,只有一台服务器情况下也可以创建伪集群,多节点。
4、zookpeer
同redis
5、eureka
同redis
边栏推荐
- Tle6389-2g V50's unique pwm/pfm control scheme has a duty cycle of up to 100%, forming a very low differential pressure - keshijin mall
- Reading summary of nacos2.x source code
- DC-DC自举电容(BOOT)几个问题
- Initial experience of MariaDB spider sharding engine
- Global and Chinese market of web content management software 2022-2028: Research Report on technology, participants, trends, market size and share
- File class learning
- 软件需求工程复习
- jsfinder,wafw00f安装,nmap配置(缺少msvcr120.dll文件)
- 10 ways to reset any user password
- NR LDPC 打孔-punctured
猜你喜欢

upload-labs通关未半而中道崩殂

SISO Decoder for min-sum(补充章节2)
![[piecemeal knowledge] [network composition] the mobile phone can be connected to the campus network, but the computer can't](/img/a1/7858a0651ddca0dfd187dc128b2036.jpg)
[piecemeal knowledge] [network composition] the mobile phone can be connected to the campus network, but the computer can't
![[collect first and use it sooner or later] 49 Flink high-frequency interview questions series (II)](/img/cf/44b3983dd5d5f7b92d90d918215908.png)
[collect first and use it sooner or later] 49 Flink high-frequency interview questions series (II)
![[collect first and use it sooner or later] 100 Flink high-frequency interview questions series (II)](/img/cf/44b3983dd5d5f7b92d90d918215908.png)
[collect first and use it sooner or later] 100 Flink high-frequency interview questions series (II)

Seeing the sudden death of a 28 year old employee, I was silent

ctf入门

Getting started with CTF

【新手上路常见问答】关于项目管理

夜神安装apk,以及bp代理
随机推荐
Learning about canvas API
SISO decoder for a general (n, n-1) SPC code (supplementary Chapter 3)
Spring 2021 daily question [end of week4]
[untitled]
【新手上路常见问答】关于项目管理
Spring 2021 daily question [week6 not finished]
Network Security Threat Intelligence System
Implementation of servlet file upload function (Commons fileUpload)
Experiment 3: design and verify all operations represented by linear table sequence on the computer
Why OKR needs to be challenging
“LSTM之父”新作:一种新方法,迈向自我修正的神经网络
网络安全威胁情报体系
SISO Decoder for a General (n, N - 1) SPC Code (Supplementary section 3)
jsfinder,wafw00f安装,nmap配置(缺少msvcr120.dll文件)
Spring 2021 daily question [week3 not finished]
H.264概念
Install MariaDB 10.5.7 (tar package installation)
Codeworks round 481 (Div. 3) [done]
Initial egg framework
Simple understanding of events