@@ -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
@@ -49,20 +63,15 @@ restarting a cluster or adding a new node to an existing cluster.
49
63
--------------------------------------------------
50
64
discovery.seed_hosts:
51
65
- 192.168.1.10:9300
52
- - 192.168.1.11 <1>
53
- - seeds.mydomain.com <2>
54
- - [0:0:0:0:0:ffff:c0a8:10c]:9301 <3>
55
- cluster.initial_master_nodes: <4 >
66
+ - 192.168.1.11
67
+ - seeds.mydomain.com
68
+ - [0:0:0:0:0:ffff:c0a8:10c]:9301
69
+ cluster.initial_master_nodes: <1 >
56
70
- master-node-a
57
71
- master-node-b
58
72
- master-node-c
59
73
--------------------------------------------------
60
- <1> The port is optional and usually defaults to `9300`, but this default can
61
- be <<built-in-hosts-providers,overridden>> by certain settings.
62
- <2> If a hostname resolves to multiple IP addresses then the node will attempt to
63
- discover other nodes at all resolved addresses.
64
- <3> IPv6 addresses must be enclosed in square brackets.
65
- <4> The initial master nodes should be identified by their
74
+ <1> The initial master nodes should be identified by their
66
75
<<node.name,`node.name`>>, which defaults to their hostname. Make sure that
67
76
the value in `cluster.initial_master_nodes` matches the `node.name`
68
77
exactly. If you use a fully-qualified domain name such as
0 commit comments