NeverENG commented on issue #3533:
URL: https://github.com/apache/dubbo-go/issues/3533#issuecomment-5105485947
#3541
hystix sentinel token tpslimit
# hystrix
Test 1:3 个请求全 success
- Test 2:15 个并发请求(并发上限 10,超出的会失败)
- Test 3:并发后再发 5 个,若熔断触发会看到 circuit open
- 触发熔断后等 5 秒(SleepWindow)再跑一次 client,能看到恢复
<img width="2850" height="1222" alt="Image"
src="https://github.com/user-attachments/assets/372d7728-5249-481e-b620-e907f96bcd81"
/>
# sentinel
client 依次跑三个场景,每个打印 success: X fail: Y
- Greet 并发 150 → 被并发隔离(阈值 100)挡掉一部分,fail > 0
- GreetWithQPSLimit → server 端 QPS 限 100,有 block
- GreetWithChanceOfError → 故意发 error 触发熔断,随后打印状态迁移:Closed → Open →(等 2s)→
Half-Open → Closed
- 若出现 wait circuit breaker ... timeout 警告,
<img width="2738" height="1216" alt="Image"
src="https://github.com/user-attachments/assets/f6e03c8a-f72d-43b8-8122-40940527558e"
/>
# token
server 用 token dubbo-go 注册,consumer 从注册中心自动拿到 token 并带上。成功则 client 打印 Greet
response: hello world,
<img width="2868" height="1354" alt="Image"
src="https://github.com/user-attachments/assets/89a2bd37-8da0-48a2-9663-07c4be1b0e0b"
/>
# tpslimit
client 发 60 个请求(间隔 200ms)。策略是随机 50% 拒绝 + 速率 5/秒,所以会交替看到:
- 成功:response: hello world
- 被拒:error: the request is rejected and doesn't have any default value
- server 端会打 Random IsAllowable! 和被拒时的自定义 handler 日志
- 最后 client 打印 successCount=..., failCount=...,两者都应 > 0
<img width="2830" height="1344" alt="Image"
src="https://github.com/user-attachments/assets/a55a1f64-e92a-4551-b032-fdc6da8be860"
/>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]