alibaba / Sentinel

A powerful flow control component enabling reliability, resilience and monitoring for microservices. (面向云原生微服务的高可用流控防护组件)
https://sentinelguard.io/
Apache License 2.0
22.16k stars 7.95k forks source link

sentinel-demo-sofa-rpc如何体现了限流的测试思想 #2721

Open Webster-Yang opened 2 years ago

Webster-Yang commented 2 years ago

sentinel-demo-sofa-rpc如何体现了限流的测试思想? 感觉就是一个sofa-rpc的服务端和客户端,没有限流在demo里

cdfive commented 2 years ago

这个demo确实是一个sofa-rpc的服务端和客户端简单demo,它依赖了sentinel-sofa-rpc-adapter模块。 在demo里没有通过编码写限流规则,考虑到运行demo,接入控制台,在界面设置限流规则,观察监控界面,会更加直观一些。

在demo工程的README.md有描述:

## 运行 Demo

1. 启动控制台,运行 `DashboardApplication`

2. 启动 Provider,运行 `DemoProvider`(VM参数:`-Dproject.name=DemoProvider -Dcsp.sentinel.dashboard.server=localhost:8080`)

3. 启动 Consumer,运行 `DemoConsumer`(VM参数:`-Dproject.name=DemoConsumer -Dcsp.sentinel.dashboard.server=localhost:8080`)

通过控制台实时监控、簇点链路菜单观察接口调用、资源情况;对资源设置不同流控规则,进行观察和调试。
cdfive commented 2 years ago

体现了限流的测试思想

@Webster-Yang 抱歉。。这个当时没考虑到。刚注意到其它demo都是通过编码初始化的规则,确实测试跑起来更快一些