当前位置:网站首页>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 .
边栏推荐
- Start with the development of wechat official account
- Brpc source code analysis (I) -- the main process of RPC service addition and server startup
- Sword finger offer 22. the penultimate node in the linked list
- Transformer variants (spark transformer, longformer, switch transformer)
- 投屏收费背后:爱奇艺季度盈利,优酷急了?
- 【GCN-RS】Are Graph Augmentations Necessary? Simple Graph Contrastive Learning for RS (SIGIR‘22)
- Word中的空白页,怎么也删不掉?如何操作?
- 对比学习的应用(LCGNN,VideoMoCo,GraphCL,XMC-GAN)
- [RS sampling] a gain tuning dynamic negative sampler for recommendation (WWW 2022)
- 【GCN-RS】MCL: Mixed-Centric Loss for Collaborative Filtering (WWW‘22)
猜你喜欢

创新突破!亚信科技助力中国移动某省完成核心账务数据库自主可控改造

Application and innovation of low code technology in logistics management

【RS采样】A Gain-Tuning Dynamic Negative Sampler for Recommendation (WWW 2022)

After having a meal with trump, I wrote this article

Learning to Pre-train Graph Neural Networks(图预训练与微调差异)

'C:\xampp\php\ext\php_zip.dll' - %1 不是有效的 Win32 应用程序 解决

Solutions to the failure of winddowns planning task execution bat to execute PHP files

From cloud native to intelligent, in-depth interpretation of the industry's first "best practice map of live video technology"

Intelligent information retrieval(智能信息检索综述)

从云原生到智能化,深度解读行业首个「视频直播技术最佳实践图谱」
随机推荐
【GCN-RS】MCL: Mixed-Centric Loss for Collaborative Filtering (WWW‘22)
[multimodal] transferrec: learning transferable recommendation from texture of modality feedback arXiv '22
Innovation and breakthrough! AsiaInfo technology helped a province of China Mobile complete the independent and controllable transformation of its core accounting database
2.1.2 机器学习的应用
利用wireshark对TCP抓包分析
Video caption (cross modal video summary / subtitle generation)
selenium使用———安装、测试
【AI4Code】《Contrastive Code Representation Learning》 (EMNLP 2021)
'C:\xampp\php\ext\php_ zip. Dll'-%1 is not a valid Win32 Application Solution
Brpc source code analysis (V) -- detailed explanation of basic resource pool
Add a little surprise to life and be a prototype designer of creative life -- sharing with X contestants in the programming challenge
Qin long, a technical expert of Alibaba cloud: a prerequisite for reliability assurance - how to carry out chaos engineering on the cloud
Transformer变体(Routing Transformer,Linformer,Big Bird)
基于TCP/IP在同一局域网下的数据传输
LeetCode第303场周赛(20220724)
Hydrogen entrepreneurship competition | Liu Yafang, deputy director of the science and Technology Department of the National Energy Administration: building a high-quality innovation system is the cor
【Debias】Model-Agnostic Counterfactual Reasoning for Eliminating Popularity Bias in RS(KDD‘21)
防范SYN洪泛攻击的方法 -- SYN cookie
苹果供应链十年浮沉:洋班主任和它的中国学生们
1.1.1 欢迎来到机器学习