Tuesday, August 18, 2020

Moving a site from server to server and seamless migration

If you are faced with the task of moving a highly loaded site that requires hosting on a separate server to a more responsive hosting, then this article is for you. In it we will tell you about ways to transfer a site from one server to another. We will also take a closer look at the method of seamless migration - a painless move without interruptions in the operation of your site and without losing any data about interaction with users, for example, about orders or about visits that occurred during the migration from site to site. 

What is website moving

Moving from hosting to hosting is the transfer of a site from one hosting site (virtual or physical machine) to another hosting site (i.e. to a different infrastructure). Due to the move, the site will change:

runtime environment;

The IP address of the server that users interact with.

Migration is a laborious and painstaking process, therefore it requires knowledge and special training. Often, during the transfer, difficulties can arise, one of which is to transfer the site in such a way that there is no downtime and loss of transactions.

Migration options

In total, there are 3 options for migrating sites. Let's consider them in more detail:

1. The first way, in which the site owner announces downtime. In other words, he puts a "stub" on the site with a notice of technical work. During the transfer, users will not be able to use your site and place orders. 

2. We call another variant of migration "splitting". With this method, a copy of the site is deployed on our server, tested, and then the DNS settings are changed. Due to the peculiarities of the operation of DNS servers, information about the changes made to the settings is not distributed on the network at once, so some users who have already updated information about the changes, when they go to the new site, and some visitors who have not updated their data , - to the old one. 

It turns out that there are two versions of the same site at the same time, which are located on different servers. When using this migration method, there is a possibility of losing orders that customers have placed during the migration on the old copy of the site. 

3. The option we prefer when migrating from one server to another is seamless migration. The implementation method depends on several parameters that are taken into account during the transfer, namely:

where and where the site is transferred from;

exactly how the domain zone will be changed (you only need to change the A-records indicating where the site will operate, or there will be a complete change of NS-servers, which indicate where the browser should apply for A or MX-records);

the specifics of the work of a particular site.


What is tech support

Let's consider a way to seamlessly transfer a site from server to server in stages and in more detail.

Preparation stage for seamless migration from server to server

Let's start the primary stage of the move - preparation. For a seamless migration, it will be necessary to prepare the environment both from the side where the site is taken from and from the side where we are transferring it. It is at this stage that it is determined what needs to be prepared in order to carry out migration with minimal losses. 

First of all, you should clarify to which NS servers the domain zone of your site is delegated. If they belong to a domain name registrar, then when transferring a site, you only need to change the records of the domain zone, which are responsible for the correct operation of the site. Usually, managing the zone settings is available in the panel of your personal account at the domain registrar.

If NS-servers belong to the current hosting provider, then they should be changed, because there is a high probability that after termination of the contract with the provider, the domain zone will be deleted on these NS-servers. In this case, we recommend setting up domain zone management on our NSs or using the NS servers of the domain registrar. 

In case of changing NS-servers, the most correct solution is to prepare a domain zone.

Suppose the site runs on NS servers ns1.somesite.somehost.ua and ns2.somesite.somehost.ua, but we transfer the site to NS ns1.somesite.tucha.ua and ns2.somesite.tucha.ua. We go to the DNS records control panel at somehost.ua, carefully look at the list of records and create similar records in the DNS records control panel in the domain control panel at tucha.ua. After the changes are made, we can change NS records. In this case, the TTL indicator in this case does not play a special role, but the smaller the TTL, the faster one of the following stages will pass. The optimal solution to the TTL indicator for the time of the move is 300 seconds (5 minutes). As a result, our site will change NS records, but will not lose clients, which will allow us to change the TTL already on the required NS servers.

DNS prepared, now we start preparing habitats. To do this, we need to determine the capabilities of the server from which the transfer takes place. In case of moving from server to server, the plan is not the easiest one, but it depends entirely on technical skills, and not on the capabilities of the server (if you have full access to both servers, then it will not be difficult to install and configure the necessary tools properly). 

No comments:

Post a Comment