当前位置:网站首页>Kitex retry mechanism
Kitex retry mechanism
2022-07-07 11:05:00 【wangxiaoming】
Kitex Retry mechanism
When will I try again ?
kitex Crazy Jane currently has the following three retry mechanisms :
- Time out to try again
- Backup Request( No response received for a period of time , retry )
- Connection failed. Try again
The framework currently has three types of retries : Time out to try again 、Backup Request, Failed to create connection. Try again ( Default ). The connection failure is a network level problem , Because the request was not sent , The framework will retry by default , Business needs no attention .
Time out to try again
Timeout exception due to network jitter , High downstream load or GC And so on GC Jamming leads to timeout .
How to set the retrying policy ?
There are generally three kinds of exceptions :
- Business customization exception
- Timeout exception
- Non timeout framework class exception
There are generally two ways to make abnormal business judgments
Thrown downstream Error
The error code returned by the downstream
return Error The custom exception configuration method is as follows :
RetryWithError(IsErrorRetry)
- adopt
BaseResp
Custom error code configuration
RetryWithResult(IsResultRetry)
- Retry count configuration
Maximum number of retries , Stop retrying if the maximum number of retries is exceeded .
WithMaxRetry
边栏推荐
- Go-Redis 中间件
- Schnuka: machine vision positioning technology machine vision positioning principle
- 打算参加安全方面工作,信息安全工程师怎么样,软考考试需要怎么准备?
- 【推荐系统 01】Rechub
- Find the root of equation ax^2+bx+c=0 (C language)
- Simple and easy to modify spring frame components
- SQL Server knowledge collection 11: Constraints
- [untitled]
- Which securities company is the best and safest to open an account for the subscription of new shares
- PHP \ newline cannot be output
猜你喜欢
[recommendation system 01] rechub
shardingsphere分库分表示例(逻辑表,真实表,绑定表,广播表,单表)
SQL Server knowledge gathering 9: modifying data
China Southern Airlines pa3.1
Ping tool ICMP message learning
What does intermediate software evaluator test
Static semantic check of clang tidy in cicd
[untitled]
"Dream Cup" 2017 Jiangsu information and future primary school summer camp it expert PK program design questions
Monai version has been updated to 0.9. See what new functions it has
随机推荐
[OneNote] can't connect to the network and can't sync the problem
Using tansformer to segment three-dimensional abdominal multiple organs -- actual battle of unetr
2022.7.6DAY598
Schnuka: machine vision positioning technology machine vision positioning principle
Find the greatest common divisor and the least common multiple (C language)
Go Slice 比较
Unity websocket server
【推薦系統 01】Rechub
Realize ray detection, drag the mouse to move the object and use the pulley to scale the object
Get pictures through opencv, change channels and save them
2022.7.4DAY596
Transaction rolled back because it has been marked as rollback-only解决
A simple example of delegate usage
Ping tool ICMP message learning
【机器学习 03】拉格朗日乘子法
[untitled]
1323: [example 6.5] activity selection
2022.7.5DAY597
【STM32】实战3.1—用STM32与TB6600驱动器驱动42步进电机(一)
BUUCTF---Reverse---reverse1