Skip to content

Conversation

@Vladsz83
Copy link
Contributor

@Vladsz83 Vladsz83 commented Nov 3, 2020

We should document that TcpDiscoverySpi prolongs detection of node failure if node has several addresses. By default, all available addresses are assigned to node and node listens any address (0.0.0.0). Actual failure detection delay of this node is: failureDetectionTimeout * addressesNumber + connRecoveryTimeout.

Often, middleware runs in environments with several IP addresses (virtualizations, containers, different networks). Node sends all obtained addresses with other node info to the cluster. Connection to node is established to first of its addresses. But if lost, other addresses are attempted to reconnect sequentially. If addresses do not belong to assumed node network, do not represent existing physical connection, processing them is just waste of time.

@dmagda
Copy link
Contributor

dmagda commented Nov 16, 2020

@Vladsz83, should we encourage the developer to initialize the TcpCommunicationSpi.localAddresses as well? So that the nodes use only reachable network interfaces for communication needs.


[CAUTION]
====
You should assign `IgniteConfiguration.localHost` or `TcpDiscoverySpi.localAddress`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vlad,

Good explanation, crystal clear and straight to the point. I made some tweaks. Please use this final version below and see if we need to mention TcpCommunicationSpi.localAddress along with TcpDiscoverySpi.localAddress

You should initialize the IgniteConfiguration.localHost or TcpDiscoverySpi.localAddress parameter only with those network interfaces that will be used for inter-node communication. By default, a node binds to and listens on all available IP addresses of an environment it's running on. It can prolong node failures detection if some of the node's addresses are not reachable from other cluster nodes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with the exception we can bind only to one net. interface currently. Or automatically to all.

|===
|Property | Description| Default Value
| `localAddress`| Local host IP address used for discovery. | By default, the node uses the first non-loopback address it finds. If there is no non-loopback address available, then `java.net.InetAddress.getLocalHost()` is used.
| `localAddress`| Local host IP address used for discovery. Prevails over `IgniteConfiguration.localHost`. | By default, all available addresses are assigned to node. If there is no non-loopback address available, then `java.net.InetAddress.getLocalHost()` is used.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please adjust to the following:

... If set, overrides the IgniteConfiguration.localHost setting. | By default, a node binds to all available network addresses. If there is a non-loopback address available, then java.net.InetAddress.getLocalHost() is used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

|===
|Property | Description| Default Value
| `localAddress` | The local address for the communication SPI to bind to. |
| `localAddress` | The local address for the communication SPI to bind to. Prevails over `IgniteConfiguration.localHost`. |
Copy link
Contributor

@dmagda dmagda Nov 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update to:

... If set, overrides the IgniteConfiguration.localHost setting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@Vladsz83
Copy link
Contributor Author

Vladsz83 commented Nov 18, 2020

@Vladsz83, should we encourage the developer to initialize the TcpCommunicationSpi.localAddresses as well? So that the nodes use only reachable network interfaces for communication needs.

We should encourage user to set IgniteConfiguration.localHost. This one is read buy other components. ZooKeeperSpi as an example. No reason to setup localAddress everywhere.

@dmagda dmagda merged commit 6a706b3 into apache:master Nov 19, 2020
dmagda pushed a commit that referenced this pull request Nov 19, 2020
@Vladsz83 Vladsz83 deleted the IGNITE-13663 branch November 19, 2020 10:25
ymolochkov pushed a commit to ymolochkov/ignite that referenced this pull request Dec 21, 2020
dmagda pushed a commit that referenced this pull request Dec 22, 2020
* IGNITE-7595: new Ignite docs (returning the original changes after fixing licensing issues)

(cherry picked from commit 073488a)

* IGNITE-13574: add license headers for some imported files of the Ignite docs (#8361)

* Added a proper license header to some files used by the docs.

* Enabled the defaultLicenseMatcher for the license checker.

(cherry picked from commit d928fb8)

* ignite docs: updated a couple of contribution instructions

(cherry picked from commit 9e8da70)

* IGNITE-13527: replace some references to the readme.io docs with the references to the new pages. The job will be finished as part of IGNITE-13586

(cherry picked from commit 7399ae6)

* ignite docs: fixed broken lings to the SQLLine page

(cherry picked from commit faf4f46)

* IGNITE-13615 Update .NET thin client feature set documentation

* IGNITE-13652 Wrong GitHub link for Apache Ignite With Spring Data/Example (#8420)

* ignite docs: updated the TcpDiscovery.soLinger documentation

* IGNITE-13663 : Represent in the documenttion affection of several node addresses on failure detection v2. (#8424)

* ignite docs: set the latest spring-data artifact id after receiving user feedback

* IGNITE-12951 Update documents for migrated extensions - Fixes #8488.

Signed-off-by: samaitra <[email protected]>
(cherry picked from commit 15a5da5)

* ignite docs: fixing a broken documentation link

* ignite docs: updated the index page with quick links to the APIs and examples

* ignite docs: fixed broken links and updated the C++ API header

* ignite docs: fixed case of GitHub

* IGNITE-13876 Updated documentation for 2.9.1 release (#8592)

(cherry picked from commit e74cf6b)

Co-authored-by: Denis Magda <[email protected]>
Co-authored-by: Pavel Tupitsyn <[email protected]>
Co-authored-by: Denis Garus <[email protected]>
Co-authored-by: Vladsz83 <[email protected]>
Co-authored-by: samaitra <[email protected]>
Co-authored-by: Nikita Safonov <[email protected]>
Co-authored-by: ymolochkov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants