Internet of Vehicles (IoV) is a popular application scenario that combines edge computing and the Internet of Things. Among them, service migration caused by IoV application mobility is a research hotspot in this field. This paper studies the migration strategy of container applications based on edge computing in the IoV business scenario. In order to solve the difficulty in selecting the target server of the application to be migrated in the crossroads scenario, this paper converts the migration decision to the shortest path problem based on dynamic programming, and obtains the best migration choice at the current time by finding the migration path with the least total cost in a limited observation time, then use the container live migration technology to implement application pre-deployment, thereby greatly reducing service downtime, and enabling user-unaware application migration. Simulation results show that the dynamic programming method proposed in this paper reduces the long-term average migration total cost by 33.88% and 24.53%, respectively, compared to the nearest selection method and the local optimal method.
In recent years, the rapid development of the Internet of Things has resulted in massive data generated by network edge devices [
Internet of Vehicles (IoV) is one of the most popular application scenarios combining edge computing and the Internet of Things. Edge computing technology is hoped to solve the ultra-low-latency business needs of IoV applications [
Through the above scenario description, the research content of this paper can be divided into the following three questions: (1) When will the migration action happen? i.e., to define the triggering conditions for the migration decision; (2) Where will the application be migrated? i.e., to judge the best target edge server; (3) How to carry out the migration process? i.e., to design the migration model and migration algorithm.
The organization of the rest paper is as follows: Section 2 describes the process of establishing a container application migration model based on edge computing in the IoV business scenario. Section 3 introduces the process of designing a container application migration algorithm based on dynamic programming. Section 4 shows the results of simulation experiments and compares the algorithm proposed in this paper with the other two algorithms. Section 5 summarizes the research work of this paper and discusses some subsequent problems to be solved.
This section introduces the process of establishing the migration model that used in this paper.
(1) When to migrate?
This part defines the trigger conditions for migration.
Define the pre-judgment radius as
(2) Where to migrate?
This part describes how to select the target server.
This paper mainly discusses two driving road scenes. One is a straight road scene without branch roads, as is shown in
For the straight road scene, since the connected vehicle can only keep going ahead (as is shown in
(3) How to migrate?
This part introduces three ideas to design the migration strategy [
In the migration scenario of single-vehicle and single-application, this paper focuses on the migration scenario of crossroads. For vehicles that are on the edge of crossroads and are about to undergo application migration, based on the acquired vehicle trajectory data, this paper considers three selection standards:
The first is the nearest selection method: select the available edge server closest to the connected vehicle at the current time as the target server.
The second is the local optimal method: select the available edge server with the least migration cost at the current time as the target server.
The third is the dynamic programming method: select the next-turn edge server corresponding to the migration path that minimizes the total migration cost in the future limited observation time as the target server.
This paper proposes the third one, the dynamic programming method. Based on the goal of minimizing the total migration cost, to design the migration model (in Section 2.2) and migration algorithm (in Section 3) and then compare the third method with the first and the second method (in Section 4).
First, make some definitions. Set the time slot
(1) Communication delay
(a) Transmission delay
where
(b) Calculation delay
where
In summary, define the communication delay as follows:
(2) Migration delay
where
(3) Target server status
In order to avoid service interruption, when performing the migration decision, consider the communication delay and the migration delay and also consider whether the target server can provide enough resource space for the migrating application.
Suppose that the application
(4) Direction of movement
In addition to the above factors, the moving trend of vehicles will also affect the migration decision. Suppose the vehicle moves from point
where
(5) Optimization problem
Define the cost function as:
where
The above formulas show that the migration decision is meaningful only when the target server has sufficient resource space for the migrating application and the vehicle follows the direction of driving away from the local service domain.
This paper takes a limited time
Then the optimization problem can be expressed as:
This problem can be converted into the shortest path problem and use dynamic programming to solve it.
This section introduces the design process of the migration algorithm based on dynamic programming. Define all possible deployment schemes of
When the initial state
This section introduces the results of the simulation experiments, then analyzes the results compared with the other two algorithms.
This experiment was conducted using MATLAB simulation software to compare the container application migration algorithm based on dynamic programming proposed in this paper (hereinafter referred to as DPMA) with the container application migration algorithm based on the standard of selecting the nearest available target server (hereinafter referred to as NRMA) and the container application migration algorithm based on the standard of choosing the target server that minimizes the current migration cost (hereinafter referred to as LOMA), respectively. In the simulation experiment, set the same map, the same distribution of edge servers, and the same vehicle trajectory for the three algorithms, then compare and analyze the results from the following aspects: total migration times, total migration cost, long-term average total cost and average single migration cost.
The values of the model parameters used in this experiment are shown in
Name | Value (Unit) |
---|---|
1800 (bit) | |
The matrix elements are randomly generated |
|
42 | |
5000000 (bit) | |
24000 (bit) | |
0.00005 (s) | |
0.00005 (s) | |
0.0005 (s) | |
0.04 (s) |
This experiment randomly generated 20 sets of data to form the data transmission rate matrix
In
(1) Total migration times
As is shown in
(2) Total migration cost and long-term average total cost
As is shown in
(3) Average single migration cost
The standard of LOMA is to select the target server with the least migration cost at the current migrating moment, so in most cases, its value of the cost that averages to a single migration is the smallest (as is shown in
However, LOMA is easy to fall into the local optimal deadlock (as is shown in
In summary, the container application migration algorithm based on dynamic programming can ensure the minimal total migration cost and the minimal total migration times, as well as, it can adapt to different network channel capacity conditions. Therefore, it is suitable for single vehicle and single application migration scenarios. The comparative analysis of DPMA, NRMA and LOMA is shown in
Evaluation Index | DPMA | NRMA | LOMA |
---|---|---|---|
Long-term average total cost | Low | High | Medium |
Migration times | Few | Many | Medium |
Results stability | Good | Good | Poor |
Algorithm complexity | High | Low | Medium |
1: |
2: |
3: |
4: |
5: |
6: |
7: |
8: |
9: update |
10: |
11: put the corresponding deployment plan |
12: |
13: |
14: |
15: |
16: |
17: |
18: |
19: |
20: |
This paper builds a container application migration model based on edge computing in the IoV business scenario, uses time delay to measure the migration cost, divides the migration cost into communication delay and migration delay, and considers the target server status and vehicle movement trends to judge whether to perform the migration decision. Then, this paper designs an application migration algorithm based on dynamic programming and uses the shortest path principle to obtain the global optimal solution of the migration decision. Finally, the simulation experiments show that the long-term average migration cost of the dynamic programming migration method proposed in this paper is significantly lower than the other two migration algorithms used for comparison, i.e., the dynamic programming migration method performs better.
The future research work would consider the migration scenarios of multiple vehicles and multiple applications.
The work is supported by the Science and Technology Project of State Grid Zhejiang Electric Power Co., Ltd (5211XT19006F).