ID | IEP-44 |
Author | |
Sponsor | |
Created |
|
Status | DRAFT |
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 optional.
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 can use Compute to retrieve endpoints for every cluster node; alternatively, we can put this information into node attributes. To be discussed.
// Describe project risks, such as API or binary compatibility issues, major protocol changes, etc.
// Links to discussions on the devlist, if applicable.
// Links to various reference documents, if applicable.
// Links or report with relevant JIRA tickets.