How can I resize a node without downtime?
I understand that resizing a Linode requires some downtime, you shutdown the server, snapshot it, provision a new instance with all of the characteristics of the previous one except the resources of the new size, and copy the data to it. (or something roughly like that).
I would like to find a way to do roughly the same thing without bringing the site down, or at least avoid it being down during the time consuming data copy part, which would roughly entail:
1) Take a snapshot of the server.
2) Create a new Linode from that snapshot.
3) Resize the snapshot to the node size I want.
4) Transfer all the important details like ipv4 and 6 addresses to the new node
5) Start the new node
6) Decommission the old node.
Maybe there needs to be a 3.5 in there of shutting down the old node, and perhaps we need to prevent changes to the website between steps 1 and 6 or they'll be lost when the new site comes up. I understand that we'd end up paying for a bit more server, because briefly two instances of the node being resized would be running, but I wouldn't mind paying a little bit more if I could avoid taking the site down for 20 minutes. It would be ideal if I could automate this into a script using the Linode API.
Is this possible?
Is there a better way?
If my approach is the right one, how would step 4 be accomplished?
This is definitely something you can accomplish. I'd actually suggest combining steps 1 and 2 via the use of cloning. This would also ensure your data is copied over. From there, you can resize if needed; you would only need to resize if you were downsizing to a smaller plan via the use of cloning.
You would be able to swap the IP addresses once the new Linode is commissioned. Each of these steps should have API endpoints, so creating a script to accomplish this is certainly within the realm of possibility.