当前位置:网站首页>Sentinel1.8.4 persistent Nacos configuration
Sentinel1.8.4 persistent Nacos configuration
2022-07-27 18:56:00 【All dust refine the heart】
Premise
sentinel Be responsible for flow control fuse configuration in the project , But the previous configuration data will be lost after restart , Because the configuration is stored in memory by default , You need to manually configure the persistence policy
Operation steps
step 1
download sentinel Source code , Links are as follows
https://github.com/alibaba/Sentinel
sentinel-dashboard Catalog :
https://github.com/alibaba/Sentinel/tree/master/sentinel-dashboard
step 2
Other module dependencies can be removed , Only keep sentinel-dashboard

step 3, Modify the corresponding persistence configuration
1. application.properties Add the configuration
# nacos Persistent configuration server.port=8858 nacos.address=20.21.1.158:8848 nacos.namespace=appName-openapi-sentinel
2. test Under module nacos Reference configuration : Including off the shelf flow Persistence

3. Same configuration , add to degrade Fuse configuration ,

4. Modify current limit , Blown controller, Let the rules change nacos Persistence

5. With FlowControllerV1 For example : introduce nacos Persistent services for
@Autowired
@Qualifier("flowRuleNacosProvider")
private DynamicRuleProvider<List<FlowRuleEntity>> ruleProvider;
@Autowired
@Qualifier("flowRuleNacosPublisher")
private DynamicRulePublisher<List<FlowRuleEntity>> rulePublisher;6. Modify rule query , Rule change entry

7. Modify... In the same way DegradeController file
Usage mode
- Self deploy after packaging
mvn clean package
2. function sentinel-dashboard.jar
You need to specify the nacos Service address ,nacos.address: 127.0.0.1:8848
Appoint nacos Namespace ,nacos.namespace: appName-sentinel
java -jar -Xms768m -Xmx768m -XX:PermSize=512M -XX:MaxPermSize=512M -Dfile.encoding=UTF-8 -Dnacos.namespace=appName-sentinel -Dnacos.address=127.0.0.1:8848 sentinel-dashboard.jar
3. nacos Add the corresponding namespace on

4. sentinel It's inertia , The interface link will not be displayed until the interface is called
5. Fuse according to the link configuration , Current limiting rules
6. testing nacos Whether there is a corresponding rule configuration in
This article source code reference
边栏推荐
- EN 1155 building hardware swing door opener - CE certification
- MySQL 05 stored procedure
- 20000 words + 30 pictures | what's the use of chatting about MySQL undo log, redo log and binlog?
- 百度地图鹰眼轨迹服务
- Alibaba architects spent 280 hours sorting out 1015 pages of distributed full stack pamphlets to easily start the distributed system
- JS中的数组与对象
- Bathroom with demister vanity mirror touch chip-dlt8t10s
- js中的函数与DOM获取元素和事件属性的使用
- TS learning notes interface
- What if MySQL database forgets its password???
猜你喜欢

Mini washing machine touch chip dlt8ma12ts Jericho

Wechat payment and payment callback

What should I do if MySQL master-slave replication data is inconsistent?

浅谈JVM(面试常考)

LED带风扇护眼学习台灯触摸芯片-DLT8S12A
MySQL create event execution task

你想得到想不到的MySQL面试题都在这了(2022最新版)

Intelligent insomnia therapeutic instrument product dlt8p68sa Jericho

Day 3 of leetcode question brushing

Examples of map search
随机推荐
What does the number of network request interface layers (2/3 layers) mean
MySQL create event execution task
商品名称模糊搜索:
Matplotlib (basic usage)
模仿线程扣除
Multifunctional wireless remote control moxibustion instrument chip dltap703sd
js实现简易表单验证与全选功能
LeetCode 刷题 第二天
Full automatic breast pump chip dltap703sd
MySQL 03 高级查询(一)
PyGame aircraft war game background implementation
ERROR 1366 (HY000): Incorrect string value: ‘\xE8\xB5\xB5\xE9\x9B\xB7‘ for column ‘s_ name‘ at row 1
nacos显示服务注册地址错误
Interceptor拦截器
JDBC-MySql 01 JDBC操作MySql(增删改查)
网红RGB镜子灯触摸芯片-DLT8S15B-杰力科创
ValueError: Found input variables with inconsistent numbers of samples: [80019456, 26673152]【报错】
TypeScript安装
Arrays and objects in JS
LeetCode 刷题 第三天