How do I cut over my website's domain to a new Linode?
I was interested in upgrading my website's CentOS 7 Linode to CentOS 8, so I followed this page from Linode's documentation to build a new Linode running CentOS 8:
Now I'd like my website's visitors to land on my new Linode without any downtime. What's the best way to cut over services to avoid any downtime?
This is a really insightful question. There are two main methods that you can perform to cut over your website without downtime, which I am listing in order of my recommendations.
IP Transfer cutover
I strongly recommend performing this cutover by swapping the IP addresses between your current Linode and your new Linode.
This entails multiple benefits at the cost of a single limitation:
- You will not need to update any DNS records for your website's domain.
- You get to keep the same IP address you were previously using for your Linode services.
- Visitors will reach your new Linode the moment the IP addresses swap.
The only limitation with this method is that the two Linodes will need to reside in the same data center, though you are able to migrate your Linode across our data centers in case you created it in another data center.
Once this cutover completes and you can confirm that your website is reachable from your new Linode through domain, you may remove the old Linode from your account to avoid further billing charges for it.
DNS record update cutover
Should you need to create this Linode in a different data center for whatever reason, the IP Transfer feature will not be available, so you will end up needing to perform this cutover by updating your domain's A record for the IPv4 address of your new Linode.
DNS records can take up to 48 hours to propagate, and while there is a chance of reducing this propagation time by using a low TTL value for your new A records, you will still need to keep both Linodes up and running while this propagation is occurring to maintain your website's uptime. Even then, visitors may receive either the old Linode's website or the new Linode's website, so it'd be important to keep them as identical as possible to minimize the visibility of this cutover's seams.
You may use DNSChecker to check up on the propagation of your website's new DNS records to determine when the new records are fully propagated such that you may remove your old Linode from your account. While this cutover method is definitely suboptimal compared to the previously described method, it is your best option if you need to create your new Linode in a different data center.
These two methods allow you to avoid any downtime when transitioning your website between Linodes, although I strongly recommend the first method for its significant advantages over the second method. Either method will work, though! Happy upgrading!