Skip to content

Commit 6e14d4f

Browse files
committed
Add discovery section for Java thin client
1 parent 651dd65 commit 6e14d4f

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docs/_docs/thin-clients/java-thin-client.adoc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,34 @@ include::{sourceCodeFile}[tag=connect-to-many-nodes,indent=0]
7575

7676
Note that the code above provides a failover mechanism in case of server node failures. Refer to the <<Handling Node Failures>> section for more information.
7777

78+
[[discovery]]
79+
=== Automatic Server Node Discovery
80+
81+
Thin client can discover server nodes in the cluster automatically.
82+
This behavior is enabled when `ClientConfiguration.clusterDiscoveryEnabled` is enabled (`true` by default).
83+
84+
Server discovery is an asynchronous process - it happens in the background.
85+
Additionally, thin client receives topology updates only when it performs some operations (to minimize server load and network traffic from idle connections).
86+
87+
[WARNING]
88+
====
89+
[discrete]
90+
Server discovery may not work when servers are behind a NAT server or a proxy.
91+
Server nodes provide their addresses and ports to the client, but when the client is in a different subnet, those addresses won't work.
92+
====
93+
94+
==== Host Names and TLS
95+
96+
By default, server nodes advertise their IP addresses during discovery.
97+
If clients must connect using host names (for example, when TLS is enabled and certificates contain host names),
98+
configure each server node to advertise its host name by setting `IgniteConfiguration#localHost` on the *server* side.
99+
100+
[source, java]
101+
----
102+
IgniteConfiguration cfg = new IgniteConfiguration()
103+
.setLocalHost("my-server1-hostname");
104+
----
105+
78106
== Partition Awareness [partition_awareness]
79107

80108
include::includes/partition-awareness.adoc[]

0 commit comments

Comments
 (0)