微服务中重要的限流问题,这个时候就需要一个专业的限流框架来支撑。下面就是支撑天猫双十一的框架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/

  Spring Cloud Alibaba 搭建(Sentinel 篇)

 

 

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

Spring Cloud Alibaba 搭建(Sentinel 篇)

 

 

 四、springboot配置sentinel

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

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

  Spring Cloud Alibaba 搭建(Sentinel 篇)

 

 

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

  Spring Cloud Alibaba 搭建(Sentinel 篇)

 

 

 

五、总结

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

相关文章:

  • 2021-07-18
  • 2022-02-24
  • 2021-08-11
  • 2021-05-16
  • 2021-05-14
  • 2023-01-04
  • 2019-07-19
  • 2019-07-20
猜你喜欢
  • 2020-10-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-29
  • 2021-08-25
相关资源
相似解决方案