Update IP without restart

I prefer not to rely on 3rd party DDNS.
For IP update I must stop node, change IP in config then restart.
Is there not simple reload function to change IP?

Its no problem to write script to change config whenever IP changes. So a simple reload could be performed to update IP. It’s better than stopping node completely which harms statistic.

Why can’t you rely on them ?

So many of us are using them without any issue.

2 Likes

Yes that’s how it works. StorJ relies on FQDN and if you want to change that you have to restart your node. I do not know how the rest of the StorJ network works but I guss the satellites will cache that FQDN for some time.

If you want to be a SNO you have to follow the rules. If you don’t want to rely on a 3PP DDNS you have run your own instead, on AWS / VPS / Whatever. Or use route 53. There are plenty of options

But the question is I can run a node with IP only. So it obviousely does not rely on FQDN.
What I mean is, if a node gets discovered after a change of ip and a manual restart, it could be discovered after reload of config as well without the need of dynamic dns, couldn’t it?

Whats the difference between depending on a 3rd party ddns updating your IP and depending on a script to update your ip everytime? If you used a 3rd party ddns you wouldnt need to restart the node everytime your IP changed, For a script you would have to stop,start your node for the new IP to be updated.

Theres no rules saying you cant update the ip everytime yourself, But once uptime becomes part of the DQ process again if your IP changed alot every month this could cost you. Keep in mind that if your script failed you could loose your node.

1 Like

That’s right. Therfore I would prefer a built-in solution into the node server software which would detect an ip change and update without restart.

This exact problem is basically what DNS was invented for. If you don’t want to use DDNS you can also get a domain and write a script to update the DNS manually (make sure the domain host supports updating the DNS through scripts/API).

Dont re-invent the wheel. The storage node would have to rely on a third party service to identify the IP adress, as you have NAT to consider, and "viola!) StorageNode will relying on 3PP just like DDNS.

The difference is that DDNS is EXTREMELY reliable. I have been using it for 20 years.

1 Like

Does it? I mean I don’t know but normally you install a DUC which detects the ip change and then informs the Dyns server. If a DUC can detect an IP change, the storage node should be able to do so as well and then update IP without restarting.

Your comparing a node being able to update the IP address to a program that is designed only for doing one thing updating the IP, Storj nodes werent designed to update IP address whenever it changes if you Hosted a dedicated server for a game, It doesnt auto change the IP if the IP changes either. The problem with this it would have to check if the IP changes alot and you dont need to put any other kinda processes running at the sametime to keep any kinda errors happening, If you keep adding failing points then its going to have a higher chance to fail.

If you feel Storj should implement something like this then please make a post at ideas.storj.io & give all the necessary details.

So that is a design problem. That is what I thought.
However according to my initial post I would be totally fine if a change of ip wouldl not require a full restart, killing all stats (and more maybe in terms of SLA uptime etc.). You know the reload command for Postfix? That’s what I think would be nice. Just a command to update ip without all the stopping and starting overhead.

Also you have to remember You cant make changes in a running VM you can only make changes to a shutdown VM this pretty much goes for any kinda VM. That is why you need to restart it before it takes effect, I dont believe docker has any sorta reload, even if it did reload the config the node would still being using the old config it started with.

This could all change in production however, But running docker it complicates things since its not its own program. Also you need to remember the people who have static IP address would have to deal with it trying to update the IP and causing unnecessary load that could have been saved with a 3rd party program that runs though your router, which doesn’t cause any issues with the node at all.

Yes but I don’t see preference of restarting over simply reloading if possible.
As said, for me it would be sufficient to pass the new ip to node and update. Then this can be automated via script.
And I think Docker will be removed when production. I am not using docker for node.

This really doesn’t apply. The config file isn’t used by docker, but by the storagenode process running inside the container. Since the config file is stored in docker volume changes to that file will be immediately visible inside the container. If a system like this were to be implemented, only the storagenode process inside the container would need to reload that config file. In theory this could be built, but I remain of the opinion that this is a problem already solved by DNS and additional overhead should not be added to the storagenode software to solve the problem in a different way. Especially since it is not relevant to many users (myself included).

If this is true then you could run a basic start command for docker, then you could just change the config itself and update the config to whatever you want while it running? I dont believe this to be the case. As I can just delete the config and the storage node still runs as it was without it until you restart it of course.

The change is visible but, not reloaded by the storagenode process while it’s running. As that is not how it was programmed to act. You could build a script to also restart the storagenode process but that would cause it to constantly go down for a few seconds to minutes while it restarts. Though I guess you could do that only when the IP changes. That probably wouldn’t be too bad.

I gotcha that makes sense. But it would still require the storagenode to have to restart. For those of us on static IPs we dont really think about it, But in production this might be different how its handled. When starting the node it could contact the server and the server pulls IP and then starts replying.

This I want to avoid. That’s why I have posted here.

But how often does your IP actually change? For me a node restart takes seconds. If that happens once every few days… does that matter? And usually you get at the least a temporary lease on an IP and it doesn’t change as long as your router is online. So is this an actual problem we’re trying to solve? (Genuinely asking, maybe IP’s change more than I would expect)