| The rapid development of container technology,especially Docker,makes more and more technicians tend to choose the container as its first choice when they deploy network services.However,Docker containers don't support dynamic migration,so in the data center,the most popular way to migrate a container from one server to another server is to shut down the container and restart it on another server.The drawback of restarting after closing the container is obvious:the programs that are running inside the container need to be rerun,affecting the persistence and consistency of the application.For cloud computing companies,a short period of downtime can also cause huge economic losses.In view of the above problems,this paper designed a set of effective solutions based on memory images.This article is intended to address the problem of container online migration,so that the container can continue to run after the completion of the migration in the new environment.Specifically,on the basis of CRIU,combined with the relevant characteristics of Docker,developed a new container online migration program to achieve high-availability container support.We define this scheme as Docker Migration,or dMigrate.The innovation of this scheme is to design the iterative memory pre-copy scheme after completing the traditional offline migration scheme,aiming at the characteristics that the user wants downtime as short as possible.The program follows the virtual machine online migration technology,the first round sends all the memory data,then the each round of the loop sends dirty memory pages modified by the container during the last round.Thanks to the reduction in the amount of data that needs to be sent after stoping the container,downtime can be minimized while ensuring that containers are properly migrated.dMigrate can further reduce downtime with the rapid read and write capability of memory storage.After completion of iterative online migration,based on nodes in the data center can be used in different computing resources,dMigrate designed and implemented intelligent node selection.By collecting the available computing resources of all target nodes,dMigrate chooses the optimal migration target instead of the technician selecting to save time and increase the load balance in the data center.As with any other application,dMigrate will inevitably consume a certain amount of computing resources,for which we have done a lot of testing and experimentation.The experimental results show that dMigrate consumes less resources in offline migration,but the downtime increases with the increase of the container.When the iterative memory pre-copy scheme is used,the downtime increases with the increase of the memory size modified by the container per second.In most cases,the use of iterative memory pre-copy technology will consume more resources,but the downtime is much smaller than the offline migration.The experimental data show that when the total memory size is 500 M and the memory modification size is less than200 M per second,the offline memory migration time is stable at about 4s,while the iterative memory pre-copying technique can reduce it to less than 1s. |