Skip to content

Commit c73abb7

Browse files
committed
fix docs
1 parent 86ccc81 commit c73abb7

File tree

1 file changed

+31
-29
lines changed

1 file changed

+31
-29
lines changed

docs/en/latest/discovery/nacos.md

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,41 @@ The performance of this module needs to be improved:
2929

3030
### Configuration for Nacos
3131

32+
```yaml title="conf/config.yaml"
3233
Nacos can be configured in two ways: single instance or multi-instance.
34+
```
3335
3436
Add following configuration in `conf/config.yaml` :
3537

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+
3667
#### Multi Instance method
3768
3869
```yaml
@@ -66,35 +97,6 @@ discovery:
6697
read: 5000 # default 5000 ms
6798
```
6899
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-
98100
### Upstream setting
99101
100102
#### L7

0 commit comments

Comments
 (0)