restate icon indicating copy to clipboard operation
restate copied to clipboard

Harden auto hostname detection to avoid surprises

Open tillrohrmann opened this issue 1 year ago • 0 comments

Right now, we choose the hostname as the default node-name if none is specified. This can lead to surprising behavior where a changing hostname can seemingly result into data loss because the working directory of the Restate server is base_dir/node-name. It would be better if the node-name would be sticky also in the presence of changing hostnames.

An idea to solve this problem is to look at the base_dir and to check if there is a single sub-directory present. If this is the case, then we can use this name as the default node-name. If not, then we fall back to the hostname. If more than a single sub-directory is present, then we will require the user to specify the node-name.

tillrohrmann avatar Apr 24 '24 12:04 tillrohrmann