当前位置:网站首页>Fault tolerant mechanism record
Fault tolerant mechanism record
2022-07-25 12:14:00 【dengjili】
When we use certain functions , Sometimes it may not be successful , So what strategies will we adopt to deal with this abnormal situation , Let's illustrate with an example

As shown in the figure above ,app2 Call... Over the network app1 Interface ,app1 It is a cluster composed of three machines
failfast Quick failure
When an error occurs in the system , Immediately feed back errors
eg1: When app2 Carry error Token visit app1 Interface ,app1 Immediately feed back error information
failsafe Fail safe
When an error occurs in the system , The failure will not cause impact or minimize the impact
eg1: When app2 Call the interface to query app1 Some interfaces , Such as query IPhone 10 The color of the terminal phone ,app1 Something's wrong inside , No error information is fed back at this time , It's going back to “ Unknown ” Information . about app2 Come on , It will not perceive the exception of interface call , We will continue to deal with it as usual
failover Fail over
When an error occurs in the system , Let's try other systems
eg1: When app2 Call the interface to query app1 Some interfaces , First call the interface app1(192.168.1.100), If it fails , Let's try again app1(192.168.1.101)、app1(192.168.1.102); The system handles a high availability state , Stop any of these apps , The system can also operate normally
failback Automatic fault recovery
When an error occurs in the system , The application self fixes the fault ; How to understand this self-healing process
- Network jitter problem , Sometimes the network may fail , Cause some exceptions in the program call , After the program receives the exception , You can retry calling the interface later , How long to wait and how many times to try , How to control is a means of self-healing
- Traffic degradation , When the network traffic increases sharply , Our system resources are insufficient , We can directly feed back to users and try later
eg1: When app2 Call the interface to query app1 An error occurred on some interfaces , Remaining interval 30s Try again , Retry no more than 3 Time
The above are several ways to deal with the error of the fault-tolerant mechanism
dubbo Fault tolerant solutions

Failover Cluster
Fail auto switch , When there is failure , Try another server again . Usually used for read operations , But retrying brings longer delays . It can be done by retries=“2” To set the number of retries ( Not including the first time ).
Failfast Cluster
Fast failure , Make only one call , Failure reports an immediate error . Usually used for non idempotent write operations , For example, adding records .
Failsafe Cluster
Failure safety , When something unusual happens , Direct to ignore . Usually used to write audit logs and other operations .
Failback Cluster
Automatic recovery from failure , Failed requests are logged in the background , Timing to resend . Typically used for message notification operations .
Forking Cluster
Call multiple servers in parallel , Return as soon as one succeeds . It is usually used for reading operations with high real-time requirements , But more service resources need to be wasted . It can be done by forks=“2” To set the maximum number of parallels .
边栏推荐
- Video caption (cross modal video summary / subtitle generation)
- Transformer variants (spark transformer, longformer, switch transformer)
- Go 垃圾回收器指南
- R语言ggplot2可视化:使用ggpubr包的ggviolin函数可视化小提琴图、设置add参数在小提琴内部添加抖动数据点以及均值标准差竖线(jitter and mean_sd)
- Transformer variants (routing transformer, linformer, big bird)
- 【AI4Code】《Pythia: AI-assisted Code Completion System》(KDD 2019)
- Mirror Grid
- Median (two point answer + two point search)
- 嵌套事务 UnexpectedRollbackException 分析与事务传播策略
- From cloud native to intelligent, in-depth interpretation of the industry's first "best practice map of live video technology"
猜你喜欢

【GCN-RS】Learning Explicit User Interest Boundary for Recommendation (WWW‘22)

【AI4Code最终章】AlphaCode:《Competition-Level Code Generation with AlphaCode》(DeepMind)

异构图神经网络用于推荐系统问题(ACKRec,HFGN)

【AI4Code】CodeX:《Evaluating Large Language Models Trained on Code》(OpenAI)

Video caption (cross modal video summary / subtitle generation)

【Debias】Model-Agnostic Counterfactual Reasoning for Eliminating Popularity Bias in RS(KDD‘21)

剑指 Offer 22. 链表中倒数第k个节点

对比学习的应用(LCGNN,VideoMoCo,GraphCL,XMC-GAN)

GPT plus money (OpenAI CLIP,DALL-E)

【GCN-CTR】DC-GNN: Decoupled GNN for Improving and Accelerating Large-Scale E-commerce Retrieval WWW22
随机推荐
Power Bi -- these skills make the report more "compelling"“
Intelligent information retrieval (overview of intelligent information retrieval)
R语言ggpubr包ggarrange函数将多幅图像组合起来、annotate_figure函数为组合图像添加注释、注解、标注信息、fig.lab参数添加图像标签、fig.lab.face参数指定样式
Go 垃圾回收器指南
1.1.1 欢迎来到机器学习
Hystrix使用
mysql的表分区
JS interview question: handwriting throttle function
【对比学习】Understanding the Behaviour of Contrastive Loss (CVPR‘21)
Solutions to the failure of winddowns planning task execution bat to execute PHP files
Knowledge maps are used to recommend system problems (mvin, Ctrl, ckan, Kred, gaeat)
JS 面试题:手写节流(throttle)函数
Unexpected rollback exception analysis and transaction propagation strategy for nested transactions
Resttemplate and ribbon are easy to use
selenium使用———安装、测试
OSPF comprehensive experiment
aaaaaaaaaaA heH heH nuN
Word中的空白页,怎么也删不掉?如何操作?
那些离开网易的年轻人
monit安装和使用