当前位置:网站首页>Kitex 重试机制
Kitex 重试机制
2022-07-07 08:54:00 【wangxiaoming】
Kitex 重试机制
什么时候会重试?
kitex 狂简目前有如下三种重试机制:
- 超时重试
- Backup Request(一段时间内未收到响应,进行重试)
- 连接失败重试
框架目前有三类重试:超时重试、Backup Request,建连失败重试(默认)。其中建连失败是网络层面问题,由于请求未发出,框架会默认重试,业务无需关注。
超时重试
超时异常由于网络抖动,下游负载高或者 GC 等导致 GC 卡顿导致超时。
如何设置重试策略?
异常一般有如下三种:
- 业务自定义异常
- 超时异常
- 非超时框架类异常
业务判断异常一般两种方式
下游抛出的Error
下游返回的错误码
返回Error自定义异常配置方式如下:
RetryWithError(IsErrorRetry)
- 通过
BaseResp
自定义错误码配置
RetryWithResult(IsResultRetry)
- 重试次数配置
重试最大次数,如果超过最大重试次数则停止重试。
WithMaxRetry
边栏推荐
- 【OneNote】无法连接到网络,无法同步问题
- Schnuka: machine vision positioning technology machine vision positioning principle
- BUUCTF---Reverse---reverse1
- Static semantic check of clang tidy in cicd
- Unity websocket server
- Network engineer test questions and answers in May of the first half of 2022
- 请问申购新股哪个证券公司开户是最好最安全的
- Unity determines whether the mouse clicks on the UI
- 【pyqt】tableWidget里的cellWidget使用信号与槽机制
- Is the soft test intermediate useful??
猜你喜欢
深入理解Apache Hudi异步索引机制
Shardingsphere sub database and table examples (logical table, real table, binding table, broadcast table, single table)
【实战】霸榜各大医学分割挑战赛的Transformer架构--nnFormer
The difference between monotonicity constraint and anti monotonicity constraint
July 10, 2022 "five heart public welfare" activity notice + registration entry (two-dimensional code)
Openinstall and Hupu have reached a cooperation to mine the data value of sports culture industry
Mpx 插件
BUUCTF---Reverse---reverse1
无法打开内核设备“\\.\VMCIDev\VMX”: 操作成功完成。是否在安装 VMware Workstation 后重新引导? 模块“DevicePowerOn”启动失败。 未能启动虚拟机。
I plan to take part in security work. How about information security engineers and how to prepare for the soft exam?
随机推荐
[pro test feasible] error while loading shared libraries solution
Unity script visualization about layout code
[pytorch 07] hands on deep learning chapter_ Preliminaries/ndarray exercises hands-on version
Transaction rolled back because it has been marked as rollback-only解决
软考中级,软件设计师考试那些内容,考试大纲什么的?
软考中级有用吗??
Summary of router development knowledge
MONAI版本更新到 0.9 啦,看看有什么新功能
2022年7月10日“五心公益”活动通知+报名入口(二维码)
Schnuka: working principle of robot visual grasping machine visual grasping
555 circuit details
The gun startles the dragon, and the crowd "locks" Zhou Zhi
Gym installation pit records
How much review time does it usually take to take the intermediate soft exam?
Use of dotween
1324: [example 6.6] integer interval
Seata 1.3.0 four modes to solve distributed transactions (at, TCC, Saga, XA)
The sixth training assignment
Basic introduction of yarn and job submission process
一些线上学术报告网站与机器学习视频