api网关集成Sentinel网关流控组件
This commit is contained in:
@@ -2,28 +2,29 @@ spring:
|
||||
# sentinel动态配置规则
|
||||
cloud:
|
||||
sentinel:
|
||||
zuul:
|
||||
enabled: true
|
||||
order:
|
||||
pre: 2000
|
||||
post: 500
|
||||
error: -100
|
||||
filter:
|
||||
enabled: false
|
||||
datasource:
|
||||
# 限流
|
||||
ds1:
|
||||
nacos:
|
||||
server-addr: ${zlt.nacos.server-addr}
|
||||
dataId: ${spring.application.name}-sentinel-flow
|
||||
dataId: ${spring.application.name}-sentinel-gw-flow
|
||||
groupId: DEFAULT_GROUP
|
||||
rule-type: flow
|
||||
# 熔断
|
||||
rule-type: gw-flow
|
||||
# api分组
|
||||
ds2:
|
||||
nacos:
|
||||
server-addr: ${zlt.nacos.server-addr}
|
||||
dataId: ${spring.application.name}-sentinel-degrade
|
||||
dataId: ${spring.application.name}-sentinel-gw-api-group
|
||||
groupId: DEFAULT_GROUP
|
||||
rule-type: degrade
|
||||
# 系统负载保护
|
||||
ds4:
|
||||
nacos:
|
||||
server-addr: ${zlt.nacos.server-addr}
|
||||
dataId: ${spring.application.name}-sentinel-system
|
||||
groupId: DEFAULT_GROUP
|
||||
rule-type: system
|
||||
rule-type: gw-api-group
|
||||
|
||||
zlt:
|
||||
oauth2:
|
||||
|
||||
Reference in New Issue
Block a user