There is a basic implementation in the prototype code, however it has the following bug:
- Remove mobile-service-2 node from the cluster, and rebalance
- mobile-service-2 will get the PrepareTopologyChange() where it is listed as an ejected node, but it currently ignores it.
- mobile-service-1 gets a StartTopologyChange() message, and cleans up the /mobile/state/mobile-service-2/gw-x metakv entry, since it knows mobile-service-2 is going away
- mobile-service-2 gets stats heartbeat messages from the gateway still connected to it, and restores the /mobile/state/mobile-service-2/gw-x metakv entry
- mobile-service-2 node is completely removed from the cluster, the mobile-service process is restarted and disconnect all gateway nodes, which reconnect to other mobile service nodes
- the /mobile/state/mobile-service-2/gw-x entry is never removed