Perhaps the correct question is how to correctly configure a fully connected cluster that allows removing a node without unclustering.
Related links:
https://www.erlang.org/doc/man/global.html
OTP version: 25.0.3
Start 3 nodes:
$ erl -sname a -connect_all true
$ erl -sname b -connect_all true
$ erl -sname c -connect_all true
On node ‘a’:
> net_adm:ping('b@galaxy').
pong
> net_adm:ping('c@galaxy').
pong
> nodes().
[b@galaxy,c@galaxy]
Then remove one node:
> net_kernel:disconnect('c@galaxy').
true
On node a:
=WARNING REPORT==== 26-Jul-2022::09:13:11.249316 ===
'global' at node a@galaxy disconnected node b@galaxy in order to prevent overlapping partitions
> nodes().
[]
On node ‘b’:
=WARNING REPORT==== 26-Jul-2022::09:13:11.247809 ===
'global' at node b@galaxy requested disconnect from node c@galaxy in order to prevent overlapping partitions
=WARNING REPORT==== 26-Jul-2022::09:13:11.248548 ===
'global' at node b@galaxy requested disconnect from node a@galaxy in order to prevent overlapping partitions
> nodes().
[]
On node ‘c’:
=WARNING REPORT==== 26-Jul-2022::09:13:11.248618 ===
'global' at node c@galaxy disconnected node b@galaxy in order to prevent overlapping partitions
> nodes().
[]