The real-time migration technology of cross-cluster stateful virtual containers is an important technology in the cloud application of network services. The optimization of stateful container real-time migration technology can achieve the purpose of shortening the downtime of cloud services, which is of great practical significance in practical applications. At present, there are relatively few studies on cross-cluster container real-time migration optimization, of which iterative migration is a migration method that can effectively reduce downtime, but there are still many problems to be solved in practical applications of this technology. Firstly, a container real-time migration method is proposed for the impact of network latency on the service downtime in cross-cluster scenarios, which focuses on the network latency between clusters, and a mathematical model is established accordingly. Secondly, The influence of network latency on migration performance during cross-cluster migration is analyzed by mathematical model theory, which determines the starting conditions and the termination conditions for enabling the iterative migration process, and gives the method to calculate the number of iterations that satisfy the termination condition. The proposed model fully considers the impact of network latency on cross-cluster container real-time migration, and experimental results show that the proposed method can effectively reduce service downtime.