Optimizing Layerwise Microservice Management in Heterogeneous Wireless Networks
Abstract
Small cells with edge computing are densely deployed in 5G mobile networks to provide high throughput communication and low-latency computation. The flexibility of edge computation is empowered by the deployment of lightweight container-based microservices. In this paper, we take the first step toward optimizing the microservice management in small-cell networks. The prominent feature is that each microservice consists of multiple image layers and different microservices may share some basic layers, thus bringing deep coupling in their placement and service provision. Our objective is to minimize the expected total latency of microservice requests under the storage, communication and computing constraints of the sparsely interconnected small cell nodes. We formulate a binary quadratic program (BQP) with the multi-dimensional strategy of the image layer placement, the access selection and the task assignment. The BQP problem is then transformed into an ILP problem, and is solved by use of a novel sphere-box alternating direction multipliers method (ADMM) with reasonable complexity , where is the number of variables in the transformed problem. Trace-driven experiments show that the gap between our proposed algorithm and the optimal is reduced by 35 compared with benchmark algorithms.
Index Terms:
Microservice management; small cell networks; mobile edge computing; binary quadratic program; sphere-box ADMM.1 Introduction
The complex services (e.g., mobile video , smart healthy care, real-time entertainment, augmented virtual reality) require lower latency and higher reliability for mobile network. Edge cloud has emerged as a promising platform complementary to central cloud systems by provisioning computing resources and mini data bases at the edge. By placing the cloud closer to the users, the mobile edge computing (MEC) network allows mobile users to acquire web service from nearby edge network. By doing so, MEC contributes to reduce the latency and mitigate the congestion in the backhual link [LYCT17]. Despite all the advantages, mobile edge computing is faced with some inherent challenges, e.g., various users’ demands, unbalanced workload, small coverage, and limited capacity [HNN+18]. To deal with it, small cells are introduced in 5G as a fundamental element of edge network. Benefiting from dense deployment, small cell nodes can operate in high frequencies, covering a range of 10 meters to 2 kilometers [HH18].
Under the requirement of improving users’ experience, container-based microservice is regarded as a promising pattern which organizes the traditional monolithic web application into a series of small web services [RN16, FFRR15, WLZ+18]. Each web service runs in a container with lower overhead. Cgroup and Kubernetes can effectively manage the containers on individual server or cluster while KubeEdge extend containerized orchestration capability to edge host. To provide certain web services, SCN needs to download the corresponding microservice image first. Microservice image is organized as layer structure and each layer provides necessary data, file or compilation environment. According to the downloading record of the Docker Hub, the image size of the most popular microservices can vary from 109MB to 2045MB which poses a great challenge to the limited storage resources of edge nodes. A recent study[HSL+16] pointed out that 57 most popular microservices images have 19 common base layers. Taking microservices of Cassandra, JAVA, Python, and gcc as examples, their images all require one non-latest Linux distribution layer of Debian. Layer sharing means that only one replica of common layer should be stored by SCN. According to Docker, microservice images can be pulled from repositories and stored in SCNs by layers with required functionalities instead of downloading the whole image.
Recently a great number of papers have investigated on microservice deployment strategies. [LAMC19, SJMW19] do not pay attention to the characteristics of microservices themselves, and only regard microservice containers as lightweight virtual machine. Without fully exploring the characteristics of microservices, the deployment strategies proposed by these papers often fail to make full use of the capacity of SCNs which results in a big gap between their solutions and optimal solution. Gu et al.[GZH+21b, GZH+21a] explored the layer structure and designed strategies to maximize the throughput. But in their model, they assume that if a microservice is requested then its image must be deployed in one and only in one server. After studying the real data, we find that the request frequency of microservices follows the long-tail distribution, that is, a small number of microservice requests occupy the majority of user requests while a large number of microservices are rarely requested. Therefore, deploying every requested microservices will contribute little to the improvement of users’ experience but will pay great cost.
In this paper, we aim to minimize the global latency of users in the 5G dense edge network. Given the distribution of users and the type of their requested microservice, diverse SCNs storage capacity and computing capacity, and edge network topology (i.e., connection relationship between SCNs and bandwidth), we will jointly deal with four essential questions: (1)for each SCN, what microservices should be deployed? (2)for each SCN, what layers should be deployed? (3)for each user, which AP should be selected to connect? (4)for each user, which SCN or central cloud should his task be assigned to? We formulate the above problem as a BQP problem. Due to the strong mutual dependency between microservice deployment and task assignment, our optimization problem turns to be intractable. In particular, microservice deployment can influence task assignment. Likewise, if a task is assigned to a SCN, the SCN must download the corresponding microservice image to provide web service.
On the principle of divide and conquer, we decompose the problem into several simple sub-problems. By completely solving these sub-problems, our BQP problem can be transformed into an ILP problem. But the transformed ILP is still intractable which is proved to be NP-hard. To tackle it, we propose a novel algorithm which is composed of two subroutine. First, we propose sphere-box ADMM algorithm which combines replacement method and ADMM to solve the ILP problem. We replace the binary constraint of the ILP problem with sphere constraint and box constraint and adopt ADMM algorithm to optimize it. This step will output a continuous solution whose elements are all close to 0 or 1. Second, we design a problem-specific rounding algorithm to turn the continuous solution obtained by sphere-box ADMM into final integer solution. Our major contribution are summarized below:
To our best knowledge, this is the first work consider both the layer structure of microservice image and 5G dense edge network, and investigate how to minimize the global latency by jointly dealing with microservice deployment, layer deployment, AP selection and task assignment. We formulate the problem into a BQP problem.
We propose a novel decomposition method to handle the BQP problem. By completely solving the sub-problems, the intractable BQP problem is transformed to an equivalent ILP problem which is much simpler and can be solved effectively.
We design sphere-box ADMM to optimize the ILP problem and get continuous solution whose element are all close to 0 or 1. Then we design a problem specific rounding policy to convert the continuous solution into final integer solution.
We analyze the date of Alibaba’s 2021 cluster-trace to figure out the characteristics of microservice requests distribution. Then the analysis results are used for experiment simulation. Extensive experiments are performed to verify that our algorithm can obtain close-to-optimal solution.
The remainder of this paper is organized as follows. Section 2 describes the proposed novel network architecture and formulate our problem. In section 3 we decompose our problem and propose our algorithm. The data analysis of real data trace and performance evaluation results are reported in Section 4. Finally, conclusions are then drawn in Section 5.
2 System Model
In this section, we describe the architecture of heterogeneous wireless networks in support of layer-wise microservices. Then we formulate the joint microservice deployment, AP selection and task assignment as a BQP problem.
2.1 Heterogeneous Edge Network
The architecture of our heterogeneous wireless networks is illustrated in Fig. 1 which conforms to European Telecommunication Standards Institute (ETSI) [KFF+18] and Federal Communications Commission (FCC) standards.
It consists of a macro cell node (MCN) and a number of densely deployed small cell nodes (SCNs). MCN directly connects to all the SCNs. Some SCNs are directly connected to each other through wired or fast wireless connection. Each user can connect to MCN or a SCN if he is within their overlapped transmission range. MCN and SCNs can connect to the central cloud through backhaul network. However, in practice, the bandwidth between the central cloud and the MCN is much higher than among SCNs [PIA+16]. Therefore we can consider that only MCN are connected to the central cloud. MCN can also be seen as a special SCN.
MCN and SCNs in support of microservices are equipped with computing and storage units with limited computing capability and storage space respectively. Hence, it cannot store all the microservice images locally and may not be able to handle multiple concurrent computations by itself. The central cloud has sufficient resource so we consider that the central cloud has deployed all the microservice images and can run infinite containers concurrently. MCN and SCNs also utilize a user plane function (UPF). With the help of UPF, the data traffic can be routed to other SCN. This enables collaboration between directly connected SCNs which means user requests web service from one SCN, but the service is actually performed by another SCN.
When a mobile user want to acquire web service from the edge cloud, he can connect to one of Sons which covers him to access the edge network. He can upload the data that he want to process and the type of microservice he wants to request. A SCN want to provide web service to user must corresponding microservice and has enough computing resource to start a container. Deploying a microservice means that the all the layers required by image have been stored. We call a SCN is available to a user when the SCN can provide service to the user [SHND19]. If the accessed SCN or one of its neighbor Sons is available, web service can be provide in the edge. Otherwise, the data will be offloaded to the central cloud and web service is provided by the cloud [PIST16].
2.2 Model Description
We consider an edge computing of a set of SCNs. Among them, the index denotes MCN. For SCN-, , and to denote its storage capacity, computing capacity and location, respectively. They can be rewritten as the vectors , . For the connection relationship between the SCNs, we use a 0-1 matrix to depict the topology. For , is 1 which means that SCN- and SCN- are directly connected. Otherwise, SCN- and SCN- are not directly connected. Without loss of generality, we make all the elements in ’s diagonal be 1. If SCN- and SCN- are connected, the bandwidth between them are denoted as . For the consistency of expression, we use to denote the backhaul bandwidth between MCN and the central cloud.
We use set to denote all the microservices. We simply write the th microservice as MS-i. Each microservice image is composed of some sharable layers and non-sharable layers. We denote the set of all layers existing in as set . The storage space occupied by layer- is . We use , , to indicate whether layer- is required by MS- or not. To satisfy the service level agreement (SLA), when the mobile edge nodes provides service to mobile user, it must allocate some amount of computing resource to the container. Different micorservices require different amounts of computing resource. For MS-, we let denote the required computation resource.
We consider the set of all users as . We simply write the th user as MU-. presents his location. We let , and denote the type of microservice requested by MU-, the size of data to be processed and transmitting power of his end device, respectively. We use to denote the bandwidth between MU- and SCN-.
The user’s latency consists of three parts: latency of uploading data, latency of computing and latency of returning result. Considering the computation time only relates to the size of data and the type of microservice. The size of calculation results is much smaller than the size of data which can be ignored [LHL+21]. We actually optimize the latency of data uploading.
3 Problem Formulation And Transformation
We will describe the decisions, constraints and objective function involved in our problem in detail.
3.1 Decision Variables
3.1.1 Microservice deployment
We define , where and , as the zero-one microservice deployment decision vector. The decision variable is an indicator variable defined as below:
3.1.2 Layer Deployment
We define , where , as the zero-one layer deployment decision vector. The decision variable is an indicator variable defined as below:
3.1.3 AP Selection
We define , where and , as the zero-one AP selection vector. The decision variable is an indicator variable defined as below:
Each mobile user is capable of offloading his time-consuming and computation-intensive task to the SCNs or MCN through wireless channel. If MU- locates at the intersection of multiple SCNs’ coverage, then he can select one of them to access. We define indicator as below:
3.1.4 Task Assignment
For the ease of expression, we use index to denote the central cloud.
We define , where , as the zero-one task assignment decision vector. The decision variable is an indicator variable defined as below:
For the sake of expression convenience, we add the th column to the topology matrix which indicates whether a SCN can offload data to the central cloud or not. The elements in the new column are all 1.
3.1.5 Latency Description
We use to denote the bandwidth of wireless channel between MU- and one of accessible SCN-.
Case1: task is assigned to accessed SCN. MU- uploads his request and data to SCN- and SCN- performs the computing task. The latency of MU- is only the latency of wireless communication between mobile device and access point:
Case2: task is assigned to a neighbor SCN. MU- connects to SCN- to access the network and task is performed by its neighbor SCN-. Therefore, we have the latency:
Case3: task is assigned to the central cloud. In this case, the task of MU- is assigned to the central cloud.
If MU- accessed SCN-, , his request and data must be routed to the MCN first and then can be offloaded to the central cloud. Therefore, the latency is:
If MU- accesses MCN, his request can be offloaded to the central cloud straightforward. Therefore, the latency is:
In convenience of expression, we define where the is a large enough positive number when the situation where MU- can not access SCN- or task can not be assigned to SCN-.
Considering for a user, the above mentioned three cases are complementary relationship, the latency of MU- can be expressed as the sum of the above expressions.
3.2 Problem Formulation
To minimize the global latency of all users, we can formulate our optimization problem into following form:
(1) | ||||
(2) | ||||
(3) | ||||
(4) | ||||
(5) | ||||
(6) | ||||
(7) | ||||
(8) | ||||
(9) | ||||
Constraint (2) ensures that for each SCN, the layers deployed at it will not exceed its storage capacity. (3) indicates that when deploying a microservice, all the layers required by it need to be deployed first. Constraints (4) and (5) guarantee that a user will connect to one of his accessible SCNs. Constraint (6) ensures that a user’s task will be assigned to a SCN or to the central cloud. Constraint (7) indicates that when the task is assigned to a SCN, corresponding microservice need to be deployed first. In constraint (8), the total computing resource consumed by all tasks assigned to SCN- cannot exceed its capacity . Constraint (9) ensures that the relationship between AP selection and task assignment is one of the three cases in section 3.1.5.
It’s a BQP problem with binary variables. Its objective function (1) and constraints (9) are quadratic. Its extremely non-convex nature makes it difficult to be analyzed theoretically, and it cannot be solved efficiently by off-the-shelf optimization algorithm. It is computationally prohibited in large size case when either the number of mobile user or the number of microservice is large.
3.3 Problem Decomposition and Transformation
Given a set of binary solution satisfying the constraint (2),(3),(6),(7),(8), we consider the sub-problem about .
This sub-problem is an ILP problem where each user accesses an accessible SCN to minimize the global latency. Since different users’ decisions are not coupled, the global latency is minimized if and only if the latency of each user is minimized.
We use to denote the shortest upload latency from MU- to SCN-.
We define to denote which SCN is selected to access when the latency achieves . If there are multiple SCNs can achieve such latency, we randomly choose one from them.
So the optimal value of the sub-problem () is . The optimal solution about can be presented as follow:
(10) |
By solving with respect to completely, can be transformed to an ILP formulation about as follows:
s.t.: (2),(3),(6),(7),(8), | |||
This problem is still difficult to solve because of the tight coupling between micorservice deployment and task assignment. In Lemma 1, we show that the optimization problem () is an NP-hard problem. However, through decomposition and transformation, the problem is greatly simplified when compared to the original problem (), which is very important to design efficient algorithm to solve later.
Lemma 1. The transformed optimization problem is NP-hard.
Proof. Given a solution satisfying the constraints (1)(2), we explore the sub-problem with respect to the variables .
(11) |
We add an extra constraint(21), but it is satisfied naturally when the decision variables are binary. In , we can regard the central cloud as a SCN with computing capability .
We regard the tasks as U items which need to be assigned and regard the SCNs and the central cloud as bins. The budget of bin- is the computing capability of SCN-. The computing resource required by MU- is the weight of the th item. The latency of MU- is the cost of the th item. Constraints (5) and (6) indicate that some items can only be assigned to limited bins. Constraints (7) and (21) indicate that them items placed in a bin can not exceed the bin’s budget. The objective function is to minimize the total cost. This is a General Assignment Problem(GAP), which is NP-hard[ÖBT10].
Since sub-problem is NP-hard, the main problem is also NP-hard.
4 Algorithm
To address , in this section, we introduce sphere-box ADMM and a well-designed rounding policy which can effectively solve the transformed problem.
4.1 Sphere-box ADMM
The difficulty of solving () mainly comes from the discontinuity caused by its domain of definition. Handling discrete space well is the key to solve the problem. Since our problem is not submodular like min-cut, the performance of heuristic algorithms such as greedy algorithm is neither good nor guaranteed performance. Exact algorithms such as branch and bound, cutting planes are computationally prohibited because it is NP-hard. Linear relaxation performs badly while semi-definition relation achieve better performance at the cost of much higher memory and computation. Therefore, we use replacement method to handle the discrete domain.
4.1.1 Sphere-box Replacement
We consider a binary space with variables. which is a binary vector. Box space is a convex continuous space and sphere space is a non-convex continuous space. According to Lemma2, we can replace the binary constraints in problem with constraint that the variables are in both the box space and the sphere space.
Lemma 2. The binary set can be equivalently replaced by the intersection between as box and a sphere , as follows:
The detail proof can be seen in [WG18]
4.1.2 ADMM Iteration Step
We concatenate the decision variables to form a variable vector . We directly replace the binary constraints with them in (). We introduce auxiliary variables in box space and auxiliary variables in sphere space , where .
Since () is an ILP problem, we can use matrix and vector to rewrite it as compact form as follows:
s.t.:, | |||
Where the specific definition of each matrix and vector in () can be found in Appendix A. Therefore, our ADMM update step is based on the following augmented Lagrangian expression:
(12) | ||||
Here, indicate dual variables, while are positive penalty parameters.
Update . We need to solve a sub-problem with respect to as follows:
This is a quadratic problem with box constraints. We relax the box constraint. The relaxed problem is a simple quadratic problem which can be solved by setting its gradient to zero. The optimal solution is . Since the contour of the objective function has a spherical shape, the optimal solution of () is the point closest to in . Since each of the faces of is perpendicular to each other, the point can be found by projecting vertically onto each dimension and limit the coordinates to between 0 and 1. This projection process can be expressed in the following mathematical form:
Therefore, the optimal solution of is:
(13) |
Update . We need to solve a sub-problem with respect to as follows:
This is a quadratic problem with a non-convex constraint , which is a -dimensional sphere centered at with radius . We relax the sphere constraints. The relaxed problem is a simple quadratic problem which can be solved by setting its gradient to zero. The optimal solution is . Since the contour of the objective function has a spherical shape, the optimal solution of the original sub-problem is the point closest to in the hollow sphere shell defined by . The point is where the line between and intersects the sphere . This projection process can be expressed in the following mathematical form:
where . Therefore, can be exactly solved by the following closed-form solution:
(14) |
Update . Update the auxiliary variable as the following method:
(15) |
Update . We are required to solve three strongly convex quadratic problem without any constraints. We set the partial derivatives of the augmented lagrangian formula with respect to the variables .
We rearrange these above equation as the following positive-definite linear system for :
(16) |
For (), there are many efficient algorithms available. We can obtain the solution of the problem quickly by adopting preconditioned conjugated gradient (PCG) method, especially for large sparse matrices.
Update duality variables. We let to be update step for duality variables:
(17) |
4.2 Rounding Policy
Even though above sphere-box ADMM can provide a solution whose elements are close to 0 or 1, simple rounding may still results in solution that do not satisfy the constraints. Because the hard constraints in are regarded as soft constraints and put into the augmented Lagrangian expression (12), simple rounding sometimes does not yield feasible solution. For example, when the storage resource of SCN- is just completely occupied, layer- actually can not be deployed at SCN-. The microservice whose images requires layer- can not be deployed at SCN-. This results some task assignments in are impracticable. Therefore, we design a novel rounding policy according to the problem.
The rounding policy is composed of two subroutines. First, considering both and storage constraints, we get layer deployment strategy . Specifically, we view as the priority of layer- deployment at SCN-. We greedily deploy the layers with higher priority until the SCN can not deploy the next high priority layer. By doing this, layer deployment strategy . Then we can obtain microservice deployment strategy by checking if all layers required have been deployed. The pseudo-code can be seen in Algorithm 2.
Second, we will obtain task assignment strategy , based on . Experiment indicates that the largest element of is usually close to 1 where the gap is smaller than while other elements are very close to 0. We iteratively assign task for every user. For MU-, when is the largest element of , if SCN- is available we assign his task to SCN-. Otherwise, we put in set .
Next we need to consider the task assignment for the users in . It’s a general assignment problem (GAP) when we regard the computing resource of SCN as the size of an agent, the required computing resource of a task as the size of a task, the latency as the cost of a task. And the size of the GAP problem for is much smaller than the GAP problem for the whole . For , we use to denote the difference between the second shortest latency and the shortest latency among the SCNs which has deployed corresponding microservice. Then according to the descending order of , we assign each user’s task to the available SCN whose latency is shortest. Finally, according to the solution and (10) we obtain . The pseudo-code can be seen in Algorithm 3.
4.3 Algorithm Complexity
The complexity of our algorithm is mainly reflected in sphere-box ADMM. According to [WG18], the computational complexity of sphere-box algorithm is determined by the number of iterations and the computational complexity of each round. Each iteration our algorithm need to solve a linear equation system, the complexity of such procedure is smaller than . Due to the sparsity of the linear equations, PCG algorithm can solved the problem with linear complexity. The number of iteration depends on requirement, more iterations yield a solution closer to binary solution. Our computation experience shows that when the number of iterations is greater than the number of variables, the difference between the elements of the output solution and 0 or 1 is less than . The complexity of rounding policy is . Therefore, our algorithm is within complexity
5 Performance Evaluation
5.1 Microservice Request Trace
In order to make our experiment more reliable, we analyzed Alibaba’s cluster-trace-microservice-2021[LXL+21]. This dataset records 1300 micorservices that were requested on Alibaba cloud over a 12-hour period. We counted the frequency with which these microservices are requested and show them from highest to lowest in Fig.2.
The vertical axis represents the portion of microservices requested during this period, and the horizontal axis represents the transition from the most requested microservice to the least requested one. We can see clearly that the portion of requests for these microservices follows a long-tail distribution. Among the 1300 microservices, the 263 most frequently requested microservices accounted for of user requests. Such a long-tail distribution suggests that it is reasonable in our model to allow some microservice images to be deployed on multiple SCNs and some microservice imaged not to be deployed on the edge. Deploying all kinds of microservices like [GZH+21b, GZH+21a] is expensive in storage and contributes little to improve users’ experience.
5.2 Experiment Settings
We consider an MCN with an effective coverage area of 1km radius, and its storage and computing capacities are 2250BM and 3GHz respectively. In this area, there are 100 users whose location obeys random two-dimensional Poisson distribution. There are 15 SCNs with an effective coverage area of 350m radius whose location also obeys random two-dimensional Poisson distribution but with lower density. The SCNs are directly connected to each other with a certain probability. Considering the practice that two directly connected SCNs are often placed in the same area or close to each other where wired or fast wireless connections can be used [PIA+16, AP15]. There is a negative correlation between the probability of edge between two SCNs and the distance between them. Based on above settings, one of the scenarios generated is shown in Fig.3. The SCNs are equipped with finite storage capacity and computing capacity in range 500MB1500MB and 1.6GHz2.4GHz. In this case, we choose 20 different microservices and they are composed of 116 different layers with size in range 10MB 400MB. Each microservice consists of layers and of the image are shareable layers. Each microservice required computing resource is in range . The data size of tasks is randomly distributed between 5 Mbit and 20 Mbit[ZZQ+20].
Wireless Communication Model. Our method can be applied to any wireless communication model, this paper chooses a common model to study. We use dbm to denote the transmitting power of MU-. All the signals experiences path loss with the same loss exponent . Therefore, the received power for SCN- from MU- is , where denote the channel power gains which are Rayleigh distributed with unitary average power, . The power of the noise of all channels is the same . Therefore, the uplink bandwidth can be calculated by Shannon formula as below:
The bandwidth between the SCNs, SCN and MCN, MCN and central cloud are 30 45 Mbps, 8 12 Mbps and 20 Mbps respectively[SHND19]. For the wireless upload of user data, we set the channel bandwidth allocated to a user by SCN or MCN 6MHz[ZKA21].
To evaluate the performance of our algorithm, we have prepared three benchmark algorithms. These benchmarks are used to solve directly instead of solving .
The benchmark algorithms are Latency Difference Greedy (LDG) algorithm, Microservice Deployment Greedy (MDG) algorithm, Greedy Rounding(GR) algorithm, respectively [GZH+21a]. We also explored Random Rounding(RR) algorithm inspired by [GCX+22]. Due to the large size of our problem and strong mutual dependency between microservice deployment and task assignment, RR cannot obtain a feasible solution even in hours.
Latency Difference Greedy(LDG). We calculate the difference between the second lowest latency and the lowest latency for each user. The larger the difference is, the higher priority is given the task assignment. In descending order of priority, we assign the task to the SCN with lowest latency and deploy the corresponding microservice.
Microservice Deployment Greedy(MDG). Each SCN preferentially deploys the microservices that are requested more frequently in the coverage area until the storage space is insufficient to deploy more microservice. Then it greedily assigns the user’s task to the available SCN with lowest latency.
Greedy Rounding(GR). This algorithm is inspired by [GZH+21a]. This algorithm relaxes as a LP problem and adopts ADMM to solve it and then greedily rounds the liner solution into integer solution.
In addition, we also present the optimal solution which is called (IP) of by time-consuming branch and bound algorithm.
We conduct four series of experiments to explore the impact of workload, storage resources, computing resources, and SCN density respectively. The edge networks in the first, third and forth series of experiments are heterogeneous, with each SCN having identical storage and computing capabilities while the edge networks in the second set of experiments are homogeneous. We simulated two different groups of microservice request popularity, respectively based on the distribution of microservice request in two different periods of time in Alibaba’s 2021 trace. The first, second and forth series of experiments are conducted with the first set of microservice popularity while the third experiment is conducted with the second set of microservice popularity.
We first show the impact of workload which can be expressed in terms of the number of users in the area. Fig.4(a), Fig.6(a) and Fig.8(a) show the impact of the workload on the global latency, with the number of users increasing from 40 to 100. As expected, the global latency tends to increase for all algorithms which is a natural phenomenon. These experimental results show that our algorithm outperforms benchmark algorithm and is close to the optimal policy in almost all cases. Comparing Fig.4(a) and Fig.6(a), it shows that under the same workload, the global latency in homogeneous edge networks is always lower than that in the in the heterogeneous network. This seems to indicate that homogeneous edge network may have better performance than heterogeneous edge network. However, this is not always true in other simulation experiments. The main reason is that the workload of each SCN is imbalanced, when the SCNs with more resource cover more user, grater portion of user can enjoy low-latency web service from nearby SCN. As shown in Fig.5(a), Fig.7(a) and Fig.9(a) with the increase of workload, more microservice container are running to provide web service. However, even when workload is low, the number of running containers is significantly smaller than the number of users. That is the storage capacity is the bottleneck of performance in this case so that some requested microservices are not deployed in the edge. Even though there are sufficient computing resource remains, tasks are still needed to be assigned to the central cloud.
Then we consider the average storage of SCNs varying from 500MB to 2000MB in Fig4(b), Fig6(b) and Fig8(b). As expected, increasing storage capacity will make the global latency tend to decrease for all algorithms because more kinds of microservice and more replicas can be deployed in the edge. More users can enjoy web service from a nearby SCN with low latency. The experiment results show that both in homogeneous networks and in the heterogeneous network, our algorithm outperforms other algorithms. In addition, the results show that the rate of latency reduction slows down as storage resources increase. This is because the limited computing resources gradually become the main factor affecting the performance improvement after the storage becomes sufficient. Fig.5(b), Fig.7(b) and Fig.9(b) show that as the storage resource increases, the number of containers running in the edge network also increase, which conforms our interpretation of the global latency decrease. It’s noticing that when storage capacity varies from 1600MB to 2000MB, the number of containers running in the edge decreases. The reason for this phenomenon is that the rounding strategy in the second step is heuristic which sometimes may outputs a relatively poor result.
Next, we explore the impact of computation capacity in Fig.4(c), Fig.6(c) and Fig.8(c). The average computation capacity varies from 0.5GHz to 3.0GHz. The global latency tends to decrease for all algorithms as the computational power increases. This is because the SCN can start more containers to provide service. The experiment results also show that the solution of our proposed algorithm is better than all other algorithms. In addition, the results show that the rate of latency reduction slows down as computing resources increase. This is because the limited storage resources gradually become the main factor affecting the performance improvement after the computing resource becomes sufficient. As shown in Fig.5(c), Fig.7(c) and Fig.9(c), our algorithm can run more containers in the edge in most situations. As a result of our optimization goal is global delay, the more the number of tasks performed on the edge of the network, does not necessarily mean lower latency.
Last but not least, we will show the effect of SCN density in Fig.10(a) and Fig.10(b). As the number of SCNs increases from 5 to 15, the global latency decreases. One reason is that, as shown in Fig.10(b), with the increase of the number of SCNs, the total computing resource of the edge network increases, and more users are served by the edge. Another reason is that more users can uploading data to a nearby SCN instead of uploading data to MCN with longer latency. As the number of SCNs grows from 11 to 13, the global latency decreases sharply while the number of containers increases gently. After analyzing, it is found that SCN- just covers a large number of users at the edge of the area who are covered only by MCN before. They suffer terrible network condition when they upload their data to MCN. SCN- enables them to enjoy low latency web service. This phenomenon just validates our second explanation for the latency reduction.
6 Conclusion
In this paper, we consider both 5G edge network with densely deployed SCNs and the prominent layer structure of microservice. To study microservice deployment, layer deployment, AP selection and task assignment, we formulate a BQP problem () to minimize the global latency. We decompose it and transform it to an ILP form (). We propose sphere-box ADMM and a heuristic rounding policy to solve it. By analyzing alibaba’s trace, we design simulation experiments. And the results show the efficiency of our algorithm.
References
- [AP15] Weng Chon Ao and Konstantinos Psounis. Distributed caching and small cell cooperation for fast content delivery. In Proceedings of the 16th ACM international symposium on mobile ad hoc networking and computing, pages 127–136, 2015.
- [FFRR15] Wes Felter, Alexandre Ferreira, Ram Rajamony, and Juan Rubio. An updated performance comparison of virtual machines and linux containers. In 2015 IEEE international symposium on performance analysis of systems and software (ISPASS), pages 171–172. IEEE, 2015.
- [GCX+22] Lin Gu, Zirui Chen, Honghao Xu, Deze Zeng, Bo Li, and Hai Jin. Layer-aware collaborative microservice deployment toward maximal edge throughput. In IEEE INFOCOM 2022-IEEE Conference on Computer Communications, pages 71–79. IEEE, 2022.
- [GZH+21a] Lin Gu, Deze Zeng, Jie Hu, Hai Jin, Song Guo, and Albert Y Zomaya. Exploring layered container structure for cost efficient microservice deployment. In IEEE INFOCOM 2021-IEEE Conference on Computer Communications, pages 1–9. IEEE, 2021.
- [GZH+21b] Lin Gu, Deze Zeng, Jie Hu, Bo Li, and Hai Jin. Layer aware microservice placement and request scheduling at the edge. In IEEE INFOCOM 2021-IEEE Conference on Computer Communications, pages 1–9. IEEE, 2021.
- [HH18] Lih-Tyng Hwang and Tzyy-sheng Jason Horng. 3D IC and RF SiPs: Advanced Stacking and Planar Solutions for 5G Mobility. John Wiley & Sons, 2018.
- [HNN+18] Dinh Thai Hoang, Dusit Niyato, Diep N Nguyen, Eryk Dutkiewicz, Ping Wang, and Zhu Han. A dynamic edge caching framework for mobile 5g networks. IEEE Wireless Communications, 25(5):95–103, 2018.
- [HSL+16] Tyler Harter, Brandon Salmon, Rose Liu, Andrea C Arpaci-Dusseau, and Remzi H Arpaci-Dusseau. Slacker: Fast distribution with lazy docker containers. In 14th USENIX Conference on File and Storage Technologies (FAST 16), pages 181–195, 2016.
- [KFF+18] Sami Kekki, Walter Featherstone, Yonggang Fang, Pekka Kuure, Alice Li, Anurag Ranjan, Debashish Purkayastha, Feng Jiangping, Danny Frydman, Gianluca Verin, et al. Mec in 5g networks. ETSI white paper, 28(2018):1–28, 2018.
- [LAMC19] Yan Li, Bo An, Junming Ma, and Donggang Cao. Comparison between chunk-based and layer-based container image storage approaches: an empirical study. In 2019 IEEE International Conference on Service-Oriented System Engineering (SOSE), pages 197–1975. IEEE, 2019.
- [LHL+21] Quyuan Luo, Shihong Hu, Changle Li, Guanghui Li, and Weisong Shi. Resource scheduling in edge computing: A survey. IEEE Communications Surveys & Tutorials, 23(4):2131–2165, 2021.
- [LXL+21] Shutian Luo, Huanle Xu, Chengzhi Lu, Kejiang Ye, Guoyao Xu, Liping Zhang, Yu Ding, Jian He, and Chengzhong Xu. Characterizing microservice dependency and performance: Alibaba trace analysis. In Proceedings of the ACM Symposium on Cloud Computing, pages 412–426, 2021.
- [LYCT17] Kuikui Li, Chenchen Yang, Zhiyong Chen, and Meixia Tao. Optimization and analysis of probabilistic caching in -tier heterogeneous networks. IEEE Transactions on Wireless Communications, 17(2):1283–1297, 2017.
- [ÖBT10] Lale Özbakir, Adil Baykasoğlu, and Pınar Tapkan. Bees algorithm for generalized assignment problem. Applied Mathematics and Computation, 215(11):3782–3795, 2010.
- [PIA+16] Konstantinos Poularakis, George Iosifidis, Antonios Argyriou, Iordanis Koutsopoulos, and Leandros Tassiulas. Caching and operator cooperation policies for layered video content delivery. In IEEE INFOCOM 2016-The 35th Annual IEEE International Conference on Computer Communications, pages 1–9. IEEE, 2016.
- [PIST16] Konstantinos Poularakis, George Iosifidis, Vasilis Sourlas, and Leandros Tassiulas. Exploiting caching and multicast for 5g wireless networks. IEEE Transactions on Wireless Communications, 15(4):2995–3007, 2016.
- [RN16] Flávio Ramalho and Augusto Neto. Virtualization at the network edge: A performance comparison. In 2016 IEEE 17th International Symposium on A World of Wireless, Mobile and Multimedia Networks (WoWMoM), pages 1–6. IEEE, 2016.
- [SHND19] Yuris Mulya Saputra, Dinh Thai Hoang, Diep N Nguyen, and Eryk Dutkiewicz. A novel mobile edge network architecture with joint caching-delivering and horizontal cooperation. IEEE Transactions on Mobile Computing, 20(1):19–31, 2019.
- [SJMW19] Amit Samanta, Lei Jiao, Max Mühlhäuser, and Lin Wang. Incentivizing microservices for online resource sharing in edge clouds. In 2019 IEEE 39th International Conference on Distributed Computing Systems (ICDCS), pages 420–430. IEEE, 2019.
- [WG18] Baoyuan Wu and Bernard Ghanem. p-box admm: A versatile framework for integer programming. IEEE transactions on pattern analysis and machine intelligence, 41(7):1695–1708, 2018.
- [WLZ+18] Liang Wang, Mengyuan Li, Yinqian Zhang, Thomas Ristenpart, and Michael Swift. Peeking behind the curtains of serverless platforms. In 2018 USENIX Annual Technical Conference (USENIX ATC 18), pages 133–146, 2018.
- [ZKA21] Yongqiang Zhang, Mustafa A Kishk, and Mohamed-Slim Alouini. Computation offloading and service caching in heterogeneous mec wireless networks. IEEE Transactions on Mobile Computing, 22(6):3241–3256, 2021.
- [ZZQ+20] Ruiting Zhou, Xueying Zhang, Shixin Qin, John CS Lui, Zhi Zhou, Hao Huang, and Zongpeng Li. Online task offloading for 5g small cell networks. IEEE Transactions on Mobile Computing, 21(6):2103–2115, 2020.
Haojie Yan received the B.Eng. degree from the School of Information Science and Technology, Fudan University, Shanghai, China, in 2021. He is currently pursuing the M.S. degree at Fudan University, Shanghai, China. His research interests include deep reinforcement learning, mixed integer programming. |
Yuedong Xu received the B.S. degree from Anhui University, the M.S. degree from the Huazhong University of Science and Technology, and the Ph.D. degree from The Chinese University of Hong Kong. From 2009 to 2012, he held a post-doctoral position with INRIA Sophia Antipolis and Universite d’Avignon, France. He is a Professor with the School of Information Science and Technology, Fudan University, China. He has published nearly 20 conference and journal papers in premium vents such as CoNEXT, Mobisys, Mobihoc, Infocom and IEEE/ACM ToN. His research interests include performance evaluation, optimization, machine learning and economic analysis of communication networks and mobile computing. |
Liangui Dai Liangui Dai received Ph.D. degree in Control Theory and Application from Northeastern University, ShenYang, China in 1997. He is a senior researcher with the intelligent transportation system (ITS) research institute of Guangdong Litong Corp. His research interests include data analytics of ITS and information system development for ITS. |
Appendix A Specific definition fro matrix and vector
There are inequation in constraint 2. We can use a matrix and a vector to rewritten them as a compact form as follows:
(18) |
There are inequality constraints in constraint 3. We user a matrix , and a vector to rewrite constraints as below compact form:
(19) |
We can use the matrix and vector to rewrite the equations in constraint (6) as following compact form:
(20) |
By defining matrix , matrix and vector , constraints in (7) can be reorganized as following:
(21) |
Considering matrix and vector , we obtain the equivalent expression of constraint (8):
(22) |
We introduce positive auxiliary variables , , and to transform the inequality constraints in constraint (18),(19),(21),(22) to equality constraints:
(23) | ||||
(24) | ||||
(25) | ||||
(26) |
Based on the above definition, the matrixes and vectors in () are defined as following:
Appendix B Notations
Notation | Meaning |
Set of SCNs | |
Set of users | |
Set of microservices | |
Set of layers | |
Storage capacity of SCN- | |
Computation capacity of SCN- | |
Place of SCN- | |
Bandwidth between SCN- and SCN- | |
Indicator whether layer- is required by MS- | |
Size of layer- | |
Required computation by MS- | |
The place of MU- | |
The microservice requested by MU- | |
The size of data which MU- want to process | |
The transmitting power of MU-’s device | |
The bandwidth between MU- and SCN- | |
Decision variable whether SCN- deploys MS- | |
Decision variable whether SCN- deploys layer- | |
Decision variable whether MU- connets to SCN- | |
Decision variable whether MU-’s task is assigned to SCN- | |
Indicator whether MU- can connect to SCN- | |
Topology of the edge network | |
The lowest latency from MU- to SCN- | |
The SCN which MU- connects when is achieved | |
The number of variable in | |
Wireless channel power gain | |
Wireless path channel loss |