Recent IDC research in the field of cloud technologies showed that 57% of companies have already implemented various forms of cloud services, 44% are planning or already using a private cloud, and 64% of companies are focused on a hybrid cloud. This makes it necessary to move work sites from one cloud to another, while maintaining high performance and data integrity. One way to smoothly move running applications between different physical servers or data centers is live migration of containers .
Usually, you need to repack containers with workplaces each time an application is moved from one cloud or data center to another. In this case, the main problem becomes the issue of automation and uninterrupted migration.
In our article, we will show how you can solve the main problems of DevOps teams using live migration, and also consider an example of the practical application of this solution.
Solution: live migration
Live migration to Jelastic cloud occurs by freezing containers on one server and restoring them on another without downtime or data loss and incoming connections. This migration allows you to: ')
improve productivity
optimize the load distribution in the cluster, which provides a more productive use of the data center
quickly and easily migrate applications to a more powerful infrastructure without interrupting service
Improve the process of continuous integration and deployment of Docker containers without the need to reconfigure the environment
Thus, due to the migration of containers, DevOps can more effectively manage the life cycle of applications. Jelastic platform supports live and autonomous container migration: you can easily move the application from one region to another, without having to reconfigure the containers and redeploy the application.
In addition to this, users can move their applications between different cloud vendors using the multi-cloud solution Jelastic . Hosting providers and large companies can combine private and public cloud within their data centers, as well as external cloud vendors. This integration provides high availability, prevents data loss or unplanned downtime, improves performance, and helps reduce costs.
How it works?
To emigrate your applications using the Jelastic platform, simply click on the region icon next to your application (or, you can click Change environment topology and select the Migrate option from the list in the upper right corner) and select the desired region in the drop-down list.
The availability of the live migration option is indicated by an LM (live migration) icon under the name of the corresponding region.
During live migration, the application container is copied to the server of the selected region. Of course, during migration, changes may occur in already copied data, so they will be marked as modified to be re-copied. After that, the container will freeze for a few seconds and is activated on the new server.
At the same time, all TCP connections will be reinstalled on the new host using the TCP recovery mode in the Linux kernel. This will allow maintaining a permanent connection for client-server applications that run on migrating containers by reassigning IP addresses to newly assigned hosts. The previously established connection settings will be resumed in the same state in which they were before the migration. Freezing lasts only a few seconds, after which the desired application continues to work.
See in action
Let's look at how live migration works using the example of SeisComP - seismological software for data collection and processing, as well as an interactive analysis of earthquakes in real time.
In order to easily deploy the above application, we will use the support of Docker containers in Jelastic:
Open the Jelastic environment configuration wizard using the New environment button in the upper right corner of the toolbar and go to the Docker tab.
Select the unigeocloud / seiscomp container in the appropriate block (for details, see the instructions for Adding a Docker container to the Jelastic environment ) and add it to the Application Server topology section.
Then, determine the limit of the amount of resources consumed for the container, select the region to place the environment (in our case, this is AWS), name it and confirm the creation.
Now you can instantly launch the application using the Open in browser button. On the page that opens, connect to the remote desktop using your credentials (which you received earlier in an email).
Launch the Seiscomp waveforms application with graphical visualization of data received from certain seismic stations, which allows you to monitor the seismological situation in real time.
While the tracking is automatically performed in the background, return to the control panel and migrate your application to another region (in our case it is Azure) using the corresponding option in the environment settings:
Pay attention to the green LM label near the selected region - this means that you can now proceed to live migration using the appropriate switch to move the selected environment without downtime.
Click the Verify & Migrate button and confirm the start of the process.
Wait until the migration is complete - you will see the corresponding notification on the toolbar, and also receive an email with new application data (for example, IP addresses). The region label next to the application will also change.
During migration, the application continues to operate and receive geo data.
As you can see, the graphs continue to be stably and continuously displayed - this means that live migration in no way affects the operation of the application and ensures stable performance.
Network configuration: in order to implement this solution, some additional platform configurations were used, namely, we combined all the regions under a common network for access via a single entry point ( Shared LB ). This made it possible for the application to work under the same domain relative to the selected hardware so that nothing can be reconfigured after the migration. At the same time, this method of implementation implies that not a single environment container has an external IP address.
Watch the video how it works in reality:
Conclusion
The process of live migration cannot be overestimated, since it provides the freedom to choose parameters such as price / performance / support among different vendors and helps avoid downtime during infrastructure maintenance. During live migration, applications continue to run without downtime and receive the necessary resources.
Sign up and try it yourself. More real-world migration cases between clouds can be seen in the following videos: