You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kind/questionCategory issues related to questions or problems
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Sentinel/sentinel-adapter/sentinel-okhttp-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/okhttp/SentinelOkHttpInterceptor.java
Lines 54 to 55 in bef6574
场景:第三方平台有限流,想通过 sentinel 做发送请求时的速率控制
前提:流量控制采用匀速器(RuleConstant.CONTROL_BEHAVIOR_RATE_LIMITER)方式。严格控制了请求通过的间隔时间,也即是让请求以均匀的速度通过,对应的是漏桶算法。
问题:发现在 SphU.entry(),的确可以正常工作。不过 proceed 后,真正发出请求可能有延迟。两次请求间隔可能就触发了限制。
我不知道这样用是不是OK,有没有什么好的方式可以做到呢?
Beta Was this translation helpful? Give feedback.
All reactions