【sentinel】该系列文章demo(九十九)

前言

该系列文章,代码都在这里
https://gitee.com/xueyedangkong/sentinel-demo.git
启动时各个服务jvm命令如下

  1. SentinelDashboard sentinel控制台
  2. SentinelClient sentinel客户端
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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总览的时候,把当前服务的也算进去。具体情况需要调试。

总结

代码待完善

猜你喜欢

转载自blog.csdn.net/s1441101265/article/details/107705604