IDIEP-142
Author
Sponsor
Created

  

Status


Motivation

As a user, I want to leverage DNS to keep the client connected to all cluster nodes, even in the face of topology changes.

Ignite 2.x cluster discovery does not work for me: it uses cluster().nodes() where internal node IP addresses are not accessible by external clients due to network configuration.

(Current state: host name is resolved to a single IP once).

Use Cases

DNS-based Client Cluster Discovery

Provide one hostname in client config => the client connects to all nodes and handles topology changes.

In detail:

Real-World Scenario: Kubernetes Headless Service

K8s headless service approach is typically used for distributed systems (Redis, Cassandra, Kafka, etc).

Description

  1. When a host name is provided in IgniteClientConfiguration#addresses, the client should resolve it and use all returned IPs as potential node addresses
  2. Resolve all known host names again and connect to newly discovered addresses:
    1. On any connection error (might indicate node failure)
    2. On primary replica change (might indicate topology change)
    3. On timer (to handle DNS caching)


Note: we could use DNS record TTL value to trigger a refresh, but Java standard library does not have any APIs to get it, and we want to avoid extra third-party dependencies just for that.

Out of Scope

Risks and Assumptions

N/A

Discussion Links

Tickets