ID | IEP-44 |
Author | |
Sponsor | |
Created |
|
Status | COMPLETED |
Thin clients connect to one or more known servers. The set of endpoints is defined in ClientConfiguration and can not change after client start. However, Ignite clusters can be dynamic: nodes start and stop, IP addresses change. This is especially true in cloud environments, Kubernetes, and so on. In particular, Best Effort Affinity requires connections to all nodes to function efficiently.
Thin clients should be able to discover all server nodes automatically when connected to any of them, and maintain an up to date list of servers at all times. This behavior should be enabled when ClientConfiguration.PartitionAwarenessEnabled property is true.
Clients can track topology changes: IEP-23 Best Effort Affinity introduced a response header change that sends topology version whenever it changes.
All we need is a new client operation to retrieve server node endpoints - IP:port combinations that every server listens to.
Request | |
---|---|
long | startTopologyVersion |
long | endTopologyVersion |
To avoid transferring full topology every time, client can retrieve topology diff (joined nodes + disconnected nodes), providing startTopologyVersion and endTopologyVersion.
startTopologyVersion and/or endTopologyVersion can be -1, which means min and max, respectively. First request should be -1 in both to retrieve initial topology with endpoints. Consequent requests retrieve only the diff.
Response | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
long | topologyVersion (actual topology version in this response) | ||||||||||
int | Joined node count | ||||||||||
JoinedNode * count |
| ||||||||||
int | Disconnected node count | ||||||||||
UUID * count | Disconnected node ids |
Server must return endpoints according to IgniteConfiguration.Localhost setting (IgniteConfiguration.Localhost defines network interfaces for Ignite to bind to).
None.
When ClientConfiguration.PartitionAwarenessEnabled is true, discovery is enabled as well.
We assume that clients and servers share a common subnet. Other use cases are not supported.
http://apache-ignite-developers.2346864.n4.nabble.com/IEP-44-Thin-Client-Discovery-td47129.html
Key | Summary | T | Created | Updated | Due | Assignee | Reporter | Priority | Priority | Priority | Priority | P | Status | Resolution |
---|