Best strategy to rebuild node without downtime ?

I figured I would just spinup a new instance with a fresh new install, configure, test and deploy.

Can I just move my existing IP across to the new node and shutdown the old node ?

Any gotchas? Or maybe a better way to do this?

3 Replies

moving the IP requires a short downtime, as both nodes have to be down to do it, but it's only as long as it takes to shutdown and start up

There are even better methods but it depends on what you already have setup. Assuming nothing special, a faster way (less downtime) would be to change the 'A' record for your hostname to the new IP of the new linode. As DNS gets updated for users, they'll be taken to the new server. The upside to this is virtually no downtime. The downside is, you'll want to have both servers running at the same time for a bit (maybe a day or two) to prevent any issues for user's who local DNS has the old IP cached.

If you have website that uses a database, like an e-shop or a forum, then running two different instances will cause chaos, since you'll get sales (or forum posts or whatever) split between the two servers, thus once you shutdown the old server, you'll loose content. To use this method, you must have a website with fairly static content.

On the other hand, if you have a separate linode for running your database, then you can switch web servers on-the-fly without a problem.

In addition, if you use the DNS method, you must consider the TTL (time to live). Several days before you migrate, you may lower the TTL to something ridiculous, like 300 seconds. Once you complete your migration, the client browsers will have a near instant switch to the new IP address. Later you may revert the TTL back to normal values.

On mission-critical systems we use clusters and HA hardware, but on most other systems, you can just pick the time and day of the week with the lowest traffic and perform the migration at that exact time frame.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct