OpenSearch/docs/reference/modules/discovery/zen.asciidoc

203 lines
8.2 KiB
Plaintext
Raw Normal View History

[[modules-discovery-zen]]
=== Zen Discovery
The zen discovery is the built in discovery module for elasticsearch and
Default to unicast discovery, with default host list of 127.0.0.1, [::1] Fix unicast discovery to work when a host has multiple addresses. Ban dangerous methods in java.net with forbidden APIs. Fix ipv6 bugs and formatting of network addresses everywhere. Closes #12999 Closes #12993 Squashed commit of the following: commit 6c1aa001d091c5cf25212a53dc701fb704337f1e Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 14:25:43 2015 -0400 Fix these to be correct with addresses just in case commit 648215627e84abf58a71400e7dc9ae775efb71d6 Merge: d00561b 41d8fbe Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 13:23:09 2015 -0400 Merge branch 'master' into unicast_all_the_way_down commit d00561b76fd1aa5850699f7901f3dae3d4d402b7 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 16:38:50 2015 +0200 limit local ports to 5 in UnicastZenPing commit e2e15c594006746cbe24432694294a71cc99deb8 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 10:32:47 2015 -0400 fix port limiting commit 10153cb7adadda81a1f482445e703836b65cf5e2 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 10:18:37 2015 -0400 don't serialize scopeids: that's broken commit 2aa63d43db2baec68a2e9bc227cfeb85dfeb4f83 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 16:06:51 2015 +0200 restore @Network commit c840f1d1ef438826ae1ecfd5e45942a0e30dc9c0 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 16:02:30 2015 +0200 Use NetworkAddress.formatAddress where applicable in plugins commit 374ce878852b35d626b7a29c8c4773545b0e9ddd Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 15:34:06 2015 +0200 Use NetworkAddress.formatAddress where applicable commit e7a606d63f1bc43c1b62b6e17adf707c76d43a15 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 10:17:57 2015 +0200 Add @Multicast annotation to disable multicast tests by default. We only run multicast tests now when we explicitly state it. A working multicast env is required which is not always the case. commit 2d7d2d0347179696ab41f71f048b13305014c85b Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 09:51:28 2015 +0200 Remove extra check for local mode in InternalTestCluster commit dda59ac39aa136d4687b9274c2692cd77f8b8f66 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 09:37:03 2015 +0200 Handle node mode across entire test cluster We used static methods reading sys properties to define the node mode per cluster. this had lots of problems when tests couldn't cope with mixed or only local mode. Now we are passing it down to the cluster from the test which allows to @SuppressNetworkMode / @SupressLocalMode on the test to force consistent node configurations. commit 058197b7a408318995c88ce7f6762e32348de0de Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 03:19:14 2015 -0400 really ban InetSocketAddress's trappy method and break build and go to sleep, sorry commit ac8779185aee1e17e6f5a81766290fdfc9c603ba Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 03:16:52 2015 -0400 Ban methods that might surprisingly cause DNS lookups commit e64fe3dff2b11503e5f2831eb9863d64f56c5538 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 02:59:05 2015 -0400 Add unit test commit f15434f20fb1a3691b1cc16028597d8fae937e05 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 02:39:02 2015 -0400 fix ipv6 formatting bugs commit 05c2c74098052c75fbb79ea1818a295ef2e03e30 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 02:12:05 2015 -0400 format addresses correctly so I can actually read what comes out of our logs and stats apis commit 4f9389dcf1e8925f23153c5eb271b4ce2294dbaf Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 21:26:52 2015 -0400 ban dangerous methods in java.net commit 6aacd4d9925f324903d1d099a6cf5f862aeaf677 Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 20:59:24 2015 -0400 ban lenient method commit f466a842c60163d1f4554bdce8a4163edb534c2c Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 00:29:00 2015 +0200 fix tests to not mix local transport and zen unicast disco commit 0de007a33b33fb68cf85cd86db4ca4f8ce10bbc9 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 00:10:07 2015 +0200 fix tests to not mix local transport and zen unicast disco commit 539f6ca6e5137e0d496239adc8684688dedcc824 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 00:02:01 2015 +0200 fix tests to not mix local transport and zen unicast disco commit 004c2881b25467f332acc8c9f9e92b1f0f9d314e Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 17:51:45 2015 -0400 Fix multinode commit 54113af325ce31571811c49fdaae89d5687be4ba Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 17:36:45 2015 -0400 fix integration tests commit 0156a77a56319d6b9737ec6a531992052e50bd59 Author: Simon Willnauer <simonw@apache.org> Date: Wed Aug 19 23:32:18 2015 +0200 enable multicast in MulticastZenPingIT.java commit 1791caa35da853ce0122485fa3fd4674c671ec6e Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 17:23:16 2015 -0400 Fix constant commit 22820b53e0b2dc9fd47145c2bc29ce912a8fd484 Author: Simon Willnauer <simonw@apache.org> Date: Wed Aug 19 22:59:09 2015 +0200 give it some extra ids for local transport crazyness commit b2138fafa94a8a085813fd48356df63e57ade5b3 Author: Simon Willnauer <simonw@apache.org> Date: Wed Aug 19 22:51:42 2015 +0200 pass on local addresses from configured transport rather than hard code IP addresses commit 1bf5de1f457b081e0ce262b57d2b55d39c434156 Author: Simon Willnauer <simonw@apache.org> Date: Wed Aug 19 22:04:31 2015 +0200 fix PluggableTransportModuleIT.java to use local disco and detach port limit for node local disco commit b6706eddfa04c43947c16551359ae98a463d34aa Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 14:16:03 2015 -0400 Default to unicast discovery, with default host list of 127.0.0.1, [::1]
2015-08-20 14:26:40 -04:00
the default. It provides both unicast and multicast discovery as well
being easily extended to support cloud environments.
The zen discovery is integrated with other modules, for example, all
communication between nodes is done using the
<<modules-transport,transport>> module.
It is separated into several sub modules, which are explained below:
[float]
[[ping]]
==== Ping
This is the process where a node uses the discovery mechanisms to find
other nodes. There is support for both multicast and unicast based
discovery (these mechanisms can be used in conjunction as well).
[float]
[[multicast]]
===== Multicast
Multicast ping discovery of other nodes is done by sending one or more
multicast requests which existing nodes will receive and
respond to. It provides the following settings with the
`discovery.zen.ping.multicast` prefix:
[cols="<,<",options="header",]
|=======================================================================
|Setting |Description
|`group` |The group address to use. Defaults to `224.2.2.4`.
|`port` |The port to use. Defaults to `54328`.
|`ttl` |The ttl of the multicast message. Defaults to `3`.
|`address` |The address to bind to, defaults to `null` which means it
Fix network binding for ipv4/ipv6 When elasticsearch is configured by interface (or default: loopback interfaces), bind to all addresses on the interface rather than an arbitrary one. If the publish address is not specified, default it from the bound addresses based on the following sort ordering: * ipv4/ipv6 (java.net.preferIPv4Stack, defaults to true) * ordinary addresses * site-local addresses * link local addresses * loopback addresses One one address is published, and multicast is still always over ipv4: these need to be future improvements. Closes #12906 Closes #12915 Squashed commit of the following: commit 7e60833312f329a5749f9a256b9c1331a956d98f Author: Robert Muir <rmuir@apache.org> Date: Mon Aug 17 14:45:33 2015 -0400 fix java 7 compilation oops commit c7b9f3a42058beb061b05c6dd67fd91477fd258a Author: Robert Muir <rmuir@apache.org> Date: Mon Aug 17 14:24:16 2015 -0400 Cleanup/fix logic around custom resolvers commit bd7065f1936e14a29c9eb8fe4ecab0ce512ac08e Author: Robert Muir <rmuir@apache.org> Date: Mon Aug 17 13:29:42 2015 -0400 Add some unit tests for utility methods commit 0faf71cb0ee9a45462d58af3d1bf214e8a79347c Author: Robert Muir <rmuir@apache.org> Date: Mon Aug 17 12:11:48 2015 -0400 localhost all the way down commit e198bb2bc0d1673288b96e07e6e6ad842179978c Merge: b55d092 b93a75f Author: Robert Muir <rmuir@apache.org> Date: Mon Aug 17 12:05:02 2015 -0400 Merge branch 'master' into network_cleanup commit b55d092811d7832bae579c5586e171e9cc1ebe9d Author: Robert Muir <rmuir@apache.org> Date: Mon Aug 17 12:03:03 2015 -0400 fix docs, fix another bug in multicast (publish host = bad here!) commit 88c462eb302b30a82585f95413927a5cbb7d54c4 Author: Robert Muir <rmuir@apache.org> Date: Mon Aug 17 11:50:49 2015 -0400 remove nocommit commit 89547d7b10d68b23d7f24362e1f4782f5e1ca03c Author: Robert Muir <rmuir@apache.org> Date: Mon Aug 17 11:49:35 2015 -0400 fix http too commit 9b9413aca8a3f6397b5031831f910791b685e5be Author: Robert Muir <rmuir@apache.org> Date: Mon Aug 17 11:06:02 2015 -0400 Fix transport / interface code Next up: multicast and then http
2015-08-17 15:37:07 -04:00
will bind `network.bind_host`
Default to unicast discovery, with default host list of 127.0.0.1, [::1] Fix unicast discovery to work when a host has multiple addresses. Ban dangerous methods in java.net with forbidden APIs. Fix ipv6 bugs and formatting of network addresses everywhere. Closes #12999 Closes #12993 Squashed commit of the following: commit 6c1aa001d091c5cf25212a53dc701fb704337f1e Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 14:25:43 2015 -0400 Fix these to be correct with addresses just in case commit 648215627e84abf58a71400e7dc9ae775efb71d6 Merge: d00561b 41d8fbe Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 13:23:09 2015 -0400 Merge branch 'master' into unicast_all_the_way_down commit d00561b76fd1aa5850699f7901f3dae3d4d402b7 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 16:38:50 2015 +0200 limit local ports to 5 in UnicastZenPing commit e2e15c594006746cbe24432694294a71cc99deb8 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 10:32:47 2015 -0400 fix port limiting commit 10153cb7adadda81a1f482445e703836b65cf5e2 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 10:18:37 2015 -0400 don't serialize scopeids: that's broken commit 2aa63d43db2baec68a2e9bc227cfeb85dfeb4f83 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 16:06:51 2015 +0200 restore @Network commit c840f1d1ef438826ae1ecfd5e45942a0e30dc9c0 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 16:02:30 2015 +0200 Use NetworkAddress.formatAddress where applicable in plugins commit 374ce878852b35d626b7a29c8c4773545b0e9ddd Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 15:34:06 2015 +0200 Use NetworkAddress.formatAddress where applicable commit e7a606d63f1bc43c1b62b6e17adf707c76d43a15 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 10:17:57 2015 +0200 Add @Multicast annotation to disable multicast tests by default. We only run multicast tests now when we explicitly state it. A working multicast env is required which is not always the case. commit 2d7d2d0347179696ab41f71f048b13305014c85b Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 09:51:28 2015 +0200 Remove extra check for local mode in InternalTestCluster commit dda59ac39aa136d4687b9274c2692cd77f8b8f66 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 09:37:03 2015 +0200 Handle node mode across entire test cluster We used static methods reading sys properties to define the node mode per cluster. this had lots of problems when tests couldn't cope with mixed or only local mode. Now we are passing it down to the cluster from the test which allows to @SuppressNetworkMode / @SupressLocalMode on the test to force consistent node configurations. commit 058197b7a408318995c88ce7f6762e32348de0de Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 03:19:14 2015 -0400 really ban InetSocketAddress's trappy method and break build and go to sleep, sorry commit ac8779185aee1e17e6f5a81766290fdfc9c603ba Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 03:16:52 2015 -0400 Ban methods that might surprisingly cause DNS lookups commit e64fe3dff2b11503e5f2831eb9863d64f56c5538 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 02:59:05 2015 -0400 Add unit test commit f15434f20fb1a3691b1cc16028597d8fae937e05 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 02:39:02 2015 -0400 fix ipv6 formatting bugs commit 05c2c74098052c75fbb79ea1818a295ef2e03e30 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 02:12:05 2015 -0400 format addresses correctly so I can actually read what comes out of our logs and stats apis commit 4f9389dcf1e8925f23153c5eb271b4ce2294dbaf Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 21:26:52 2015 -0400 ban dangerous methods in java.net commit 6aacd4d9925f324903d1d099a6cf5f862aeaf677 Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 20:59:24 2015 -0400 ban lenient method commit f466a842c60163d1f4554bdce8a4163edb534c2c Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 00:29:00 2015 +0200 fix tests to not mix local transport and zen unicast disco commit 0de007a33b33fb68cf85cd86db4ca4f8ce10bbc9 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 00:10:07 2015 +0200 fix tests to not mix local transport and zen unicast disco commit 539f6ca6e5137e0d496239adc8684688dedcc824 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 00:02:01 2015 +0200 fix tests to not mix local transport and zen unicast disco commit 004c2881b25467f332acc8c9f9e92b1f0f9d314e Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 17:51:45 2015 -0400 Fix multinode commit 54113af325ce31571811c49fdaae89d5687be4ba Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 17:36:45 2015 -0400 fix integration tests commit 0156a77a56319d6b9737ec6a531992052e50bd59 Author: Simon Willnauer <simonw@apache.org> Date: Wed Aug 19 23:32:18 2015 +0200 enable multicast in MulticastZenPingIT.java commit 1791caa35da853ce0122485fa3fd4674c671ec6e Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 17:23:16 2015 -0400 Fix constant commit 22820b53e0b2dc9fd47145c2bc29ce912a8fd484 Author: Simon Willnauer <simonw@apache.org> Date: Wed Aug 19 22:59:09 2015 +0200 give it some extra ids for local transport crazyness commit b2138fafa94a8a085813fd48356df63e57ade5b3 Author: Simon Willnauer <simonw@apache.org> Date: Wed Aug 19 22:51:42 2015 +0200 pass on local addresses from configured transport rather than hard code IP addresses commit 1bf5de1f457b081e0ce262b57d2b55d39c434156 Author: Simon Willnauer <simonw@apache.org> Date: Wed Aug 19 22:04:31 2015 +0200 fix PluggableTransportModuleIT.java to use local disco and detach port limit for node local disco commit b6706eddfa04c43947c16551359ae98a463d34aa Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 14:16:03 2015 -0400 Default to unicast discovery, with default host list of 127.0.0.1, [::1]
2015-08-20 14:26:40 -04:00
|`enabled` |Whether multicast ping discovery is enabled. Defaults to `false`.
|=======================================================================
[float]
[[unicast]]
===== Unicast
The unicast discovery allows for discovery when multicast is
not enabled. It basically requires a list of hosts to use that will act
as gossip routers. It provides the following settings with the
`discovery.zen.ping.unicast` prefix:
[cols="<,<",options="header",]
|=======================================================================
|Setting |Description
|`hosts` |Either an array setting or a comma delimited setting. Each
value is either in the form of `host:port`, or in the form of
Default to unicast discovery, with default host list of 127.0.0.1, [::1] Fix unicast discovery to work when a host has multiple addresses. Ban dangerous methods in java.net with forbidden APIs. Fix ipv6 bugs and formatting of network addresses everywhere. Closes #12999 Closes #12993 Squashed commit of the following: commit 6c1aa001d091c5cf25212a53dc701fb704337f1e Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 14:25:43 2015 -0400 Fix these to be correct with addresses just in case commit 648215627e84abf58a71400e7dc9ae775efb71d6 Merge: d00561b 41d8fbe Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 13:23:09 2015 -0400 Merge branch 'master' into unicast_all_the_way_down commit d00561b76fd1aa5850699f7901f3dae3d4d402b7 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 16:38:50 2015 +0200 limit local ports to 5 in UnicastZenPing commit e2e15c594006746cbe24432694294a71cc99deb8 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 10:32:47 2015 -0400 fix port limiting commit 10153cb7adadda81a1f482445e703836b65cf5e2 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 10:18:37 2015 -0400 don't serialize scopeids: that's broken commit 2aa63d43db2baec68a2e9bc227cfeb85dfeb4f83 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 16:06:51 2015 +0200 restore @Network commit c840f1d1ef438826ae1ecfd5e45942a0e30dc9c0 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 16:02:30 2015 +0200 Use NetworkAddress.formatAddress where applicable in plugins commit 374ce878852b35d626b7a29c8c4773545b0e9ddd Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 15:34:06 2015 +0200 Use NetworkAddress.formatAddress where applicable commit e7a606d63f1bc43c1b62b6e17adf707c76d43a15 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 10:17:57 2015 +0200 Add @Multicast annotation to disable multicast tests by default. We only run multicast tests now when we explicitly state it. A working multicast env is required which is not always the case. commit 2d7d2d0347179696ab41f71f048b13305014c85b Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 09:51:28 2015 +0200 Remove extra check for local mode in InternalTestCluster commit dda59ac39aa136d4687b9274c2692cd77f8b8f66 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 09:37:03 2015 +0200 Handle node mode across entire test cluster We used static methods reading sys properties to define the node mode per cluster. this had lots of problems when tests couldn't cope with mixed or only local mode. Now we are passing it down to the cluster from the test which allows to @SuppressNetworkMode / @SupressLocalMode on the test to force consistent node configurations. commit 058197b7a408318995c88ce7f6762e32348de0de Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 03:19:14 2015 -0400 really ban InetSocketAddress's trappy method and break build and go to sleep, sorry commit ac8779185aee1e17e6f5a81766290fdfc9c603ba Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 03:16:52 2015 -0400 Ban methods that might surprisingly cause DNS lookups commit e64fe3dff2b11503e5f2831eb9863d64f56c5538 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 02:59:05 2015 -0400 Add unit test commit f15434f20fb1a3691b1cc16028597d8fae937e05 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 02:39:02 2015 -0400 fix ipv6 formatting bugs commit 05c2c74098052c75fbb79ea1818a295ef2e03e30 Author: Robert Muir <rmuir@apache.org> Date: Thu Aug 20 02:12:05 2015 -0400 format addresses correctly so I can actually read what comes out of our logs and stats apis commit 4f9389dcf1e8925f23153c5eb271b4ce2294dbaf Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 21:26:52 2015 -0400 ban dangerous methods in java.net commit 6aacd4d9925f324903d1d099a6cf5f862aeaf677 Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 20:59:24 2015 -0400 ban lenient method commit f466a842c60163d1f4554bdce8a4163edb534c2c Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 00:29:00 2015 +0200 fix tests to not mix local transport and zen unicast disco commit 0de007a33b33fb68cf85cd86db4ca4f8ce10bbc9 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 00:10:07 2015 +0200 fix tests to not mix local transport and zen unicast disco commit 539f6ca6e5137e0d496239adc8684688dedcc824 Author: Simon Willnauer <simonw@apache.org> Date: Thu Aug 20 00:02:01 2015 +0200 fix tests to not mix local transport and zen unicast disco commit 004c2881b25467f332acc8c9f9e92b1f0f9d314e Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 17:51:45 2015 -0400 Fix multinode commit 54113af325ce31571811c49fdaae89d5687be4ba Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 17:36:45 2015 -0400 fix integration tests commit 0156a77a56319d6b9737ec6a531992052e50bd59 Author: Simon Willnauer <simonw@apache.org> Date: Wed Aug 19 23:32:18 2015 +0200 enable multicast in MulticastZenPingIT.java commit 1791caa35da853ce0122485fa3fd4674c671ec6e Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 17:23:16 2015 -0400 Fix constant commit 22820b53e0b2dc9fd47145c2bc29ce912a8fd484 Author: Simon Willnauer <simonw@apache.org> Date: Wed Aug 19 22:59:09 2015 +0200 give it some extra ids for local transport crazyness commit b2138fafa94a8a085813fd48356df63e57ade5b3 Author: Simon Willnauer <simonw@apache.org> Date: Wed Aug 19 22:51:42 2015 +0200 pass on local addresses from configured transport rather than hard code IP addresses commit 1bf5de1f457b081e0ce262b57d2b55d39c434156 Author: Simon Willnauer <simonw@apache.org> Date: Wed Aug 19 22:04:31 2015 +0200 fix PluggableTransportModuleIT.java to use local disco and detach port limit for node local disco commit b6706eddfa04c43947c16551359ae98a463d34aa Author: Robert Muir <rmuir@apache.org> Date: Wed Aug 19 14:16:03 2015 -0400 Default to unicast discovery, with default host list of 127.0.0.1, [::1]
2015-08-20 14:26:40 -04:00
`host:port1-port2`. Note that IPv6 hosts must be bracketed. Defaults to
`127.0.0.1, [::1]`
|=======================================================================
The unicast discovery uses the
<<modules-transport,transport>> module to
perform the discovery.
[float]
[[master-election]]
==== Master Election
As part of the ping process a master of the cluster is either
elected or joined to. This is done automatically. The
`discovery.zen.ping_timeout` (which defaults to `3s`) allows for the
tweaking of election time to handle cases of slow or congested networks
(higher values assure less chance of failure). Once a node joins, it
will send a join request to the master (`discovery.zen.join_timeout`)
with a timeout defaulting at 20 times the ping timeout.
When the master node stops or has encountered a problem, the cluster nodes
start pinging again and will elect a new master. This pinging round also
serves as a protection against (partial) network failures where node may unjustly
think that the master has failed. In this case the node will simply hear from
other nodes about the currently active master.
If `discovery.zen.master_election.filter_client` is `true`, pings from client nodes (nodes where `node.client` is
`true`, or both `node.data` and `node.master` are `false`) are ignored during master election; the default value is
`true`. If `discovery.zen.master_election.filter_data` is `true`, pings from non-master-eligible data nodes (nodes
where `node.data` is `true` and `node.master` is `false`) are ignored during master election; the default value is
`false`. Pings from master-eligible nodes are always observed during master election.
Nodes can be excluded from becoming a master by setting `node.master` to
`false`. Note, once a node is a client node (`node.client` set to
`true`), it will not be allowed to become a master (`node.master` is
automatically set to `false`).
The `discovery.zen.minimum_master_nodes` sets the minimum
number of master eligible nodes that need to join a newly elected master in order for an election to
complete and for the elected node to accept it's mastership. The same setting controls the minimum number of
active master eligible nodes that should be a part of any active cluster. If this requirement is not met the
active master node will step down and a new mastser election will be begin.
This setting must be set to a quorum of your master eligible nodes. It is recommended to avoid
having only two master eligible nodes, since a quorum of two is two. Therefore, a loss
of either master node will result in an inoperable cluster.
[float]
[[fault-detection]]
==== Fault Detection
There are two fault detection processes running. The first is by the
master, to ping all the other nodes in the cluster and verify that they
are alive. And on the other end, each node pings to master to verify if
its still alive or an election process needs to be initiated.
The following settings control the fault detection process using the
`discovery.zen.fd` prefix:
[cols="<,<",options="header",]
|=======================================================================
|Setting |Description
|`ping_interval` |How often a node gets pinged. Defaults to `1s`.
|`ping_timeout` |How long to wait for a ping response, defaults to
`30s`.
|`ping_retries` |How many ping failures / timeouts cause a node to be
considered failed. Defaults to `3`.
|=======================================================================
[float]
==== External Multicast
The multicast discovery also supports external multicast requests to
discover nodes. The external client can send a request to the multicast
IP/group and port, in the form of:
[source,js]
--------------------------------------------------
{
"request" : {
"cluster_name": "test_cluster"
}
}
--------------------------------------------------
And the response will be similar to node info response (with node level
information only, including transport/http addresses, and node
attributes):
[source,js]
--------------------------------------------------
{
"response" : {
"cluster_name" : "test_cluster",
"transport_address" : "...",
"http_address" : "...",
"attributes" : {
"..."
}
}
}
--------------------------------------------------
Note, it can still be enabled, with disabled internal multicast
discovery, but still have external discovery working by keeping
`discovery.zen.ping.multicast.enabled` set to `true` (the default), but,
setting `discovery.zen.ping.multicast.ping.enabled` to `false`.
[float]
==== Cluster state updates
The master node is the only node in a cluster that can make changes to the
cluster state. The master node processes one cluster state update at a time,
applies the required changes and publishes the updated cluster state to all
the other nodes in the cluster. Each node receives the publish message,
updates its own cluster state and replies to the master node, which waits for
all nodes to respond, up to a timeout, before going ahead processing the next
updates in the queue. The `discovery.zen.publish_timeout` is set by default
to 30 seconds and can be changed dynamically through the
<<cluster-update-settings,cluster update settings api>>
[float]
[[no-master-block]]
==== No master block
For the cluster to be fully operational, it must have an active master and the
number of running master eligible nodes must satisfy the
`discovery.zen.minimum_master_nodes` setting if set. The
`discovery.zen.no_master_block` settings controls what operations should be
rejected when there is no active master.
The `discovery.zen.no_master_block` setting has two valid options:
[horizontal]
`all`:: All operations on the node--i.e. both read & writes--will be rejected. This also applies for api cluster state
read or write operations, like the get index settings, put mapping and cluster state api.
`write`:: (default) Write operations will be rejected. Read operations will succeed, based on the last known cluster configuration.
This may result in partial reads of stale data as this node may be isolated from the rest of the cluster.
The `discovery.zen.no_master_block` setting doesn't apply to nodes based apis (for example cluster stats, node info and
node stats apis) which will not be blocked and try to execute on any node possible.