@@ -18,12 +18,26 @@ to connect to other nodes running on the same server. This provides an
18
18
auto-clustering experience without having to do any configuration.
19
19
20
20
When you want to form a cluster with nodes on other hosts, you should use the
21
- `discovery.seed_hosts` setting to provide a list of other nodes in the cluster
21
+ <<static-cluster-setting, static>> `discovery.seed_hosts` setting to provide a list of other nodes in the cluster
22
22
that are master-eligible and likely to be live and contactable in order to seed
23
- the <<modules-discovery-hosts-providers,discovery process>>. This setting
24
- should be a list of the addresses of all the master-eligible nodes in the
25
- cluster. Each address can be either an IP address or a hostname which resolves
26
- to one or more IP addresses via DNS.
23
+ the <<modules-discovery-hosts-providers,discovery process>>. This setting value
24
+ should be a YAML sequence or array of the addresses of all the master-eligible
25
+ nodes in the cluster. Each address can be either an IP address or a hostname
26
+ which resolves to one or more IP addresses via DNS.
27
+
28
+ [source,yaml]
29
+ ----
30
+ discovery.seed_hosts:
31
+ - 192.168.1.10:9300
32
+ - 192.168.1.11 <1>
33
+ - seeds.mydomain.com <2>
34
+ - [0:0:0:0:0:ffff:c0a8:10c]:9301 <3>
35
+ ----
36
+ <1> The port is optional and usually defaults to `9300`, but this default can
37
+ be <<built-in-hosts-providers,overridden>> by certain settings.
38
+ <2> If a hostname resolves to multiple IP addresses then the node will attempt to
39
+ discover other nodes at all resolved addresses.
40
+ <3> IPv6 addresses must be enclosed in square brackets.
27
41
28
42
If your master-eligible nodes do not have fixed names or addresses, use an
29
43
<<built-in-hosts-providers,alternative hosts provider>> to find their addresses
@@ -52,20 +66,15 @@ restarting a cluster or adding a new node to an existing cluster.
52
66
--------------------------------------------------
53
67
discovery.seed_hosts:
54
68
- 192.168.1.10:9300
55
- - 192.168.1.11 <1>
56
- - seeds.mydomain.com <2>
57
- - [0:0:0:0:0:ffff:c0a8:10c]:9301 <3>
58
- cluster.initial_master_nodes: <4 >
69
+ - 192.168.1.11
70
+ - seeds.mydomain.com
71
+ - [0:0:0:0:0:ffff:c0a8:10c]:9301
72
+ cluster.initial_master_nodes: <1 >
59
73
- master-node-a
60
74
- master-node-b
61
75
- master-node-c
62
76
--------------------------------------------------
63
- <1> The port is optional and usually defaults to `9300`, but this default can
64
- be <<built-in-hosts-providers,overridden>> by certain settings.
65
- <2> If a hostname resolves to multiple IP addresses then the node will attempt to
66
- discover other nodes at all resolved addresses.
67
- <3> IPv6 addresses must be enclosed in square brackets.
68
- <4> The initial master nodes should be identified by their
77
+ <1> The initial master nodes should be identified by their
69
78
<<node.name,`node.name`>>, which defaults to their hostname. Make sure that
70
79
the value in `cluster.initial_master_nodes` matches the `node.name`
71
80
exactly. If you use a fully-qualified domain name such as
0 commit comments