Repository navigation
Closed
Milestone
Description
Background
The Apache Ratis HA module currently identifies peers positionally:
HA_SERVER_LISTis a comma-separated list ofhost:raftPort:httpPort:priorityentries- Each node's slot is derived from the numeric suffix of
HA_SERVER_NAME(e.g.ArcadeDB_0-> peer index 0) - Display names shown in logs and Studio are synthesized as
<localPrefix><sep><index>using the local node's name prefix
This works well for K8s StatefulSet deployments (arcadedb-0, arcadedb-1, ...) but is confusing in two cases:
- Operators who deploy with heterogeneous names (e.g.
frankfurt,london,nyc) must still embed a numeric suffix, and the displayed peer names get rebuilt from the local prefix and don't reflect the configured names. - The mapping between
HA_SERVER_NAMEand the position inHA_SERVER_LISTis implicit. If they get out of sync, a node claims the wrong slot.
Proposal
Add an optional name@ prefix to each entry in HA_SERVER_LIST. Fully backward compatible: entries without @ keep their current behavior; mixed clusters work; @ does not appear in any current valid format so detection is unambiguous.
HA_SERVER_LIST=frankfurt@10.0.0.1:2424:2480,london@10.0.0.2:2424:2480,nyc@10.0.0.3:2424:2480
Resolution rules:
- If a peer entry has
name@, the local node identifies its slot by matchingHA_SERVER_NAMEagainst the peer name first. - If no name match is found, fall back to the existing
prefix_N/prefix-Nsuffix resolution. - Display names use the configured peer name when present; otherwise the existing positional synthesis is used.
- Names must be unique within the cluster (validated at parse time).
Affected components
HA_SERVER_LISTparser (RaftPeerAddressResolver.parsePeerList)- Local peer resolution (
RaftPeerAddressResolver.findLocalPeerId) - Display-name building (
RaftHAServerconstructor +getPeerDisplayName) - Dynamic membership: optional
nameparameter onaddPeeradmin command (POSTpayload field) so peers added at runtime also get a friendly name in logs/Studio HAServerPlugininterface: optional 3-argaddPeer(peerId, address, name)default that delegates to the 2-arg version, so non-Raft implementations keep working
Out of scope
- No wire-level name exchange between nodes is needed:
HA_SERVER_LISTis already a cluster-wide setting, so each node already knows the configured names. HA_SERVER_NAMEitself does not need to change. With named peers, its numeric suffix simply becomes optional.
Activity
feat: HA supported node name in configuration
chore(deps): bump org.postgresql:postgresql from 42.7.10 to 42.7.11 […
feat: HA supported node name in configuration
feat: HA supported node name in configuration
chore(deps): bump org.postgresql:postgresql from 42.7.10 to 42.7.11 […