-
Notifications
You must be signed in to change notification settings - Fork 78
/
route.yml
49 lines (44 loc) · 1.13 KB
/
route.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
services:
user-service:
# eureka中的服务名
id: user-service
# 以/user开头的请求, 会被转发到user-service服务中
prefix: /user
# 转发时是否去掉请求前缀, 即/user
strip-prefix: true
# 设置qps限制, 每秒最多请求数
qps: 1
# 灰度配置
canary:
-
# 对应eurekai注册信息中元数据(metadata map)中key=version的值
meta: "1.0"
# 流量比重
weight: 3
-
meta: "2.0"
weight: 4
-
meta: ""
weight: 10
trends-service:
id: trends-service
# 请求路径当匹配多个prefix时, 长的获胜
prefix: /trends
strip-prefix: false
# 设置qps限制, 每秒最多请求数
qps: 1
order-service:
id: order-service
prefix: /order
strip-prefix: false
img-service:
# 如果有host, 则不查注册中心直接使用此地址, 多个地址逗号分隔, 不能有空格
host: localhost:8081,localhost:8080
name: img-service
prefix: /img
strip-prefix: true
engine-service:
id: engine-service
prefix: /engine
strip-prefix: true