@@ -29,10 +29,41 @@ The performance of this module needs to be improved:
29
29
30
30
### Configuration for Nacos
31
31
32
+ ``` yaml title="conf/config.yaml"
32
33
Nacos can be configured in two ways : single instance or multi-instance.
34
+ ` ` `
33
35
34
36
Add following configuration in ` conf/config.yaml` :
35
37
38
+ # ## Single Instance method
39
+
40
+ The below is a single nacos instance method that is also supported.
41
+
42
+ ` ` ` yaml
43
+ discovery:
44
+ nacos:
45
+ host:
46
+ - "http://${username}:${password}@${host1}:${port1}"
47
+ prefix: "/nacos/v1/"
48
+ fetch_interval: 30 # default 30 sec
49
+ # ` weight` is the `default_weight` that will be attached to each discovered node that
50
+ # doesn't have a weight explicitly provided in nacos results
51
+ weight : 100 # default 100
52
+ timeout :
53
+ connect : 2000 # default 2000 ms
54
+ send : 2000 # default 2000 ms
55
+ read : 5000 # default 5000 ms
56
+ ` ` `
57
+
58
+ And you can config it in short by default value:
59
+
60
+ ` ` ` yaml
61
+ discovery :
62
+ nacos :
63
+ host :
64
+ - " http://192.168.33.1:8848"
65
+ ` ` `
66
+
36
67
#### Multi Instance method
37
68
38
69
` ` ` yaml
@@ -66,35 +97,6 @@ discovery:
66
97
read : 5000 # default 5000 ms
67
98
` ` `
68
99
69
- ### Single Instance method
70
-
71
- The below is a single nacos instance method that is also supported.
72
-
73
- ` ` ` yaml
74
- discovery :
75
- nacos :
76
- host :
77
- - " http://${username}:${password}@${host1}:${port1}"
78
- prefix : " /nacos/v1/"
79
- fetch_interval : 30 # default 30 sec
80
- # `weight` is the `default_weight` that will be attached to each discovered node that
81
- # doesn't have a weight explicitly provided in nacos results
82
- weight : 100 # default 100
83
- timeout :
84
- connect : 2000 # default 2000 ms
85
- send : 2000 # default 2000 ms
86
- read : 5000 # default 5000 ms
87
- ` ` `
88
-
89
- And you can config it in short by default value:
90
-
91
- ` ` ` yaml
92
- discovery :
93
- nacos :
94
- host :
95
- - " http://192.168.33.1:8848"
96
- ` ` `
97
-
98
100
### Upstream setting
99
101
100
102
#### L7
0 commit comments