当前位置:网站首页>Distributed High concurrency & high availability
Distributed High concurrency & high availability
2022-07-21 19:19:00 【Idle cat】
High concurrency :1. Improve the performance of a single machine or web Performance of ;2. Deploy multiple services to support .
High availability :1. redundancy ;2. Fail over ( perception , monitor )
Technical means : colony (redis Sentinel mode ;);keepalived Survival detection
Nginx Reverse agent horizontal expansion & High availability analysis
If nginx Not enough use , Sure DNS The same domain name is configured in load balancing mode to resolve multiple IP, Theoretically unlimited expansion .
High availability analysis :DNS The server and Nginx Basically, there are two services , Failure awareness is not possible . If so configured, then 01 Whether the service is good or not will be parsed and returned . To be highly available, you have to give nginx1 Redundant one nginx1_1, But what is on display IP All are 1.0.0.1. Technology is using VirtualIP Virtual one IP, Use KeepAlived Probe nginx Usability , If nginx1 Hang up , Automatic access nginx1_1.
Gateway horizontal expansion & High availability analysis
Can be in nginx.conf More than one server, And configure load balancing rules .nginx Can detect the back server Usability , Theoretically, infinity can be added server, But limited to nginx Throughput .
High availability analysis :nginx Can detect tomcat Whether it works well , If it doesn't work well, you won't forward the request to this service .
Service level expansion & High availability analysis
Call between services , It's all through RPC Way to call , To decouple the caller and the backcaller , Separate from the configuration center , Both the called and the called are registered in the configuration center, such as Zookeeper,Eureka,Nacos etc. , Configuration center
High availability analysis : Between services RCP Call to client Rotation training visit ProductIP Address , If the access is different, visit the next Server, And there is a special background thread to synchronize with the registry ProducerServerIP list .
High concurrency of data cache & High availability analysis
The most widely used cache is redis,mongodb,rockermq Components , Components use their own clusters and safeguards .
Database horizontal expansion & High availability analysis
DB The expansion is divided into the following centralized :
- The business will split the relatively cohesive data into another library
- It's a way to split the architecture , Can't dynamically expand
- Order data and historical order data within three months In different libraries
- Hot and cold data requires migration
- Theoretically, the order volume will exceed one database capacity within three months , This method will fail
- Route to different databases according to the location of the order
- It's the second deformation above
- No data migration required , But the data of a region in Beijing will also exceed , This is not easy to use
- Just according to ID Conduct Hash Calculation , Try to distribute them equally among different DB
- Not very feasible , There is no problem storing data , Visit ? You don't know the data in that database , So this kind of unreality
- According to the read-write attribute, it is divided into read library and write library
- Write to the main database , Reading data from the library
- If reading concurrency is high , You can have several Slave Support
- For more than salve Read from library , If a slave library goes down ,druid The connection pool will detect and obtain other connections for access
- Write library There is a main library , This requires redundancy .
High availability analysis : What time is it Mysql It does not meet the requirements of high availability , Need a redundant machine . similar nginx High availability , Use virtualIP+KeepAlived To detect and failover , I need to pay attention to my two Mysql The server may have poor data synchronization .
END
边栏推荐
- [QT] correct method of character encoding conversion of log path
- LBA转换成CHS公式
- What is gamefi?
- Clickhouse architecture
- [cloud native kubernetes] how to use health check under kubernetes cluster
- MYSQL07_获取日期函数、聚合函数、字符串函数
- Unity - input class
- [QT入门篇]窗口类的应用
- 软件测试面试题:黑盒测试和白盒测试是软件测试的两种基本方法,请分别说明各自的优点和缺点!
- 奈雪的茶布局元宇宙 传统品牌如何转战元宇宙营销
猜你喜欢
随机推荐
不想醒来因为好吃
Postgresql源码(64)查询执行——子模块Executor(2)执行前的数据结构和执行过程
分布式.BASE理论
分布式.数据库架构
kubernetes的这几种存储卷,别再傻傻分不清了
2022 software testing skills jmeter+ant+jenkins continuous integration and test report generation tutorial
论文翻译解读:Anytime Bottom-Up Rule Learning for Knowledge Graph Completion【AnyBURL】
Phpstudy_pro搭建Sqli-labs靶场,进行SQL注入测试
Tutorial (7.0) 04 Forticlient deployment * forticlient EMS * Fortinet network security expert NSE 5
The first lesson of programmers is "Hello word". Do you know the first lesson of network engineering?
KingbaseES V8R6有什么办法,默认不读取sys_catalog下的系统视图?
Pytorch deep learning practice lesson 2 / assignment (linear model)
软件测试面试题:如何测试一个纸杯?
Distribué. ID Builder
软件测试面试题:黑盒测试的测试用例常见设计方法都有哪些?请分别以具体的例子来说明这些方法在测试用例设计工作中的应用。
FTP服務配置
Powermock actual combat
TiDB 分布式批量解决方案
Jujube technology he Yifan: what characteristics should NFT infrastructure have?
What is gamefi?