User-Generated Cluster ID
Opened this issue · 0 comments
benbjohnson commented
The current implementation of cluster IDs can be confusing in some scenarios. The cluster ID is a random string value generated by LiteFS when a node first becomes primary and it is then propagated to replicas when they connect. It's also used by LiteFS Cloud when the first write arrives for a cluster. The goal of the cluster ID is to prevent two separate clusters from joining one another accidentally.
A better implementation may be to allow the user to specify their own cluster ID. This could be generated or it may just be easier to allow arbitrary values (such as $FLY_APP_NAME
). As it's user-specified, it does not need to be persisted to disk.