Spring Cloud Alibaba 搭建(Sentinel 篇)

  微服务中重要的限流问题,这个时候就需要一个专业的限流框架来支撑。下面就是支撑天猫双十一的框架Sentinel(官方认证很稳)

一、下载Sentinel

   地址:https://github.com/alibaba/Sentinel/releases

二、直接运行

  Sentinel 控制台是一个标准的 Spring Boot 应用,以 Spring Boot 的方式运行 jar 包即可。

java -Dserver.port=8080 -Dcsp.sentinel.dashboard.server=localhost:8080 -Dproject.name=sentinel-dashboard -jar sentinel-dashboard.jar

三、登陆界面

  直接访问,账号密码都是sentinel

http://127.0.0.1:8081/

  

   进入之后,首页就是这样的。

 四、springboot配置sentinel

   地址:https://github.com/alibaba/spring-cloud-alibaba/wiki/Sentinel

   官方有很详细的教程,不再重复。不过有一些个人遇到问题说明一下。

  

   运行项目idea的项目,刷新http://127.0.0.1:8081/#/dashboard/app/Application    就可以看到下面的信息。

  

五、总结

  sentinel的文档很清晰,基本上按照教程都能完成,一些细节需要注意,其他都非常顺利。

原文地址:https://www.cnblogs.com/zrl66/p/13713934.html