前言
该系列文章,代码都在这里
https://gitee.com/xueyedangkong/sentinel-demo.git
启动时各个服务jvm命令如下
- SentinelDashboard sentinel控制台
无
- SentinelClient sentinel客户端
无
- SentinelDubboUserProvider dubbo服务端
-Dahas.namespace=default
-Dproject.name=sentinel-dubbo-user-provider
-Dcsp.sentinel.log.use.pid=true
-Dcsp.sentinel.api.port=8103
-Dcsp.sentinel.dashboard.server=localhost:8080
- SentinelDubboUserProvider02 dubbo服务端
-Dahas.namespace=default
-Dproject.name=sentinel-dubbo-user-provider
-Dcsp.sentinel.log.use.pid=true
-Dcsp.sentinel.api.port=8104
-Dcsp.sentinel.dashboard.server=localhost:8080
- SentinelDubboUserConsumer 集群客户端:token-client
-Dahas.namespace=default
-Dproject.name=sentinel-dubbo-user-consumer
-Dcsp.sentinel.log.use.pid=true
-Dcsp.sentinel.dashboard.server=localhost:8080
-Dcsp.sentinel.api.port=8204
-Dcsp.sentinel.heartbeat.interval.ms=2000
- SentinelDubboUserConsumer02 集群客户端:token-client
-Dahas.namespace=default
-Dproject.name=sentinel-dubbo-user-consumer
-Dcsp.sentinel.log.use.pid=true
-Dcsp.sentinel.dashboard.server=localhost:8080
-Dcsp.sentinel.api.port=8205
-Dcsp.sentinel.heartbeat.interval.ms=2000
- SentinelDubboUserConsumer03 集群服务端:token-server
-Dahas.namespace=default
-Dproject.name=sentinel-dubbo-user-consumer
-Dcsp.sentinel.dashboard.server=localhost:8080
-Dcsp.sentinel.api.port=8206
-Dcsp.sentinel.heartbeat.interval.ms=2000
ps:此处之所以把-Dcsp.sentinel.log.use.pid=true
去掉,是因为在前面的某篇文章中有看到,加上集群标志,会在计算集群流控qps总览的时候,把当前服务的也算进去。具体情况需要调试。
总结
代码待完善