Dynamic micro-service migration and route redirection method and system based on topology awareness

By adopting topology-aware dynamic microservice migration and routing redirection methods based on topology awareness in cloud computing data centers, the problem of lack of topology awareness of microservice deployment and migration in the existing technology is solved, the optimal deployment and routing strategy of microservices is realized, and the operation efficiency and service quality of cloud computing data centers are improved.

CN119676150AActive Publication Date: 2025-03-21STATE GRID HUBEI ELECTRIC POWER INFORMATION & TELECOMMUNICATION COMPANY +1

Patent Information

Application Number
CN202411582164.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-03-21
Estimated Expiration
2044-11-07

AI Technical Summary

Technical Problem

In cloud computing data centers, existing microservice deployment and migration methods lack perception of network topology, resulting in unbalanced resource utilization, increased communication delays and service quality declines. Especially in dynamic request flow scenarios, how to quickly respond and adjust the deployment location and routing solutions of microservices has become an urgent problem.

Method used

The dynamic microservice migration and routing redirection method based on topology perception is adopted. By obtaining cloud computing data center and edge server resource information, application request flow collection, and initializing the image deployment matrix, the input request flow characteristics based on time slots are divided, and the multi-mirroring scheme and proportional probability routing model of microservices are obtained based on the optimal marginal gain. According to the image deployment matrix redirecting node routing scheme of physical server nodes, topological dependencies pairs with abnormal bandwidth are filtered out and microservice image migration operations are performed.

Benefits of technology

The optimal migration and routing strategy of microservices is realized, the bandwidth resource occupation is optimized, the success rate of requested services is improved, the end-to-end average response time is reduced, and the overall operation efficiency and service quality of cloud computing data centers are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119676150A_ABST
    Figure CN119676150A_ABST
Patent Text Reader

Abstract

A dynamic micro-service migration and route redirection method based on topology awareness comprises the following steps: S1, acquiring cloud computing data center and edge server resource information, an application request stream set and an initialized mirror image deployment matrix in a dynamic scene, and dividing time slot-based input request stream features; s2, in each time slot, a multi-mirror-image preliminary deployment scheme of the micro-service is obtained in a marginal gain optimal mode, and a node routing scheme is redirected according to a mirror image deployment matrix of a physical server node; and S3, according to the resource cost, the multi-mirror-image preliminary deployment scheme and the node routing scheme, screening out topology dependence pairs with abnormal bandwidths in a request stream, and based on topology perception, executing migration operation for micro-service mirror images on server nodes of links with abnormal bandwidths to obtain an optimal joint decision of micro-service deployment and request routing. According to the method, topology-aware micro-service mirror image migration and online redirection probability routing are realized in a dynamic cloud computing data center scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of edge computing technology, and in particular to a topology-aware dynamic microservice migration and routing redirection method and system. Background Art

[0002] In modern cloud computing data centers, microservices architecture has become the main way of application development and deployment due to its high flexibility and scalability. As a lightweight and loosely coupled architecture, services decouple Internet applications into a series of small components or modules with single responsibilities. This modular architecture is conducive to development and management due to its flexibility, superior scalability, and easy reusability. However, as the number of microservices increases, how to efficiently manage these services and the communication between them has become a key issue. The migration and routing management of microservices has a direct impact on the system's performance, resource utilization, and service quality.

[0003] In cloud computing data centers, microservice-based applications receive a large number of user requests per second, resulting in recursive call dependencies and frequent data communication. In addition, high concurrent communication, complex call dependencies, and strict latency constraints pose severe challenges to image-level orchestration. Due to the complex data communication and call dependencies, deployment, migration, and routing are tightly coupled and interdependent. On the one hand, if the routing strategy is not determined, the effectiveness of the deployment and migration scheme cannot be evaluated; on the other hand, if the deployment and migration scheme is not determined, the request routing cannot be carefully planned. However, most works investigate service deployment, migration, and routing separately, ignoring the complex service topology dependencies. In addition, the deployment and migration of existing microservices are often based on static strategies and lack the perception of network topology, resulting in uneven resource utilization, increased communication latency, and degraded service quality. Especially in the face of dynamic request flows, how to quickly respond to and adjust the deployment location and routing scheme of microservices has become an urgent problem to be solved. Summary of the invention

[0004] The purpose of the present invention is to overcome the problems existing in the prior art and provide a topology-aware dynamic microservice migration and routing redirection method and system, which realizes the optimal migration and routing strategy of microservices by comprehensively considering the request flow characteristics, server node resource status and network topology structure, solves the problems of bandwidth bottleneck, server resource waste and increased service response time associated with the existing microservice orchestration scheme in dynamic scenarios, and improves the overall operation efficiency and service quality of cloud computing data centers.

[0005] To achieve the above objectives, the technical solution of the present invention is:

[0006] In a first aspect, the present invention provides a topology-aware dynamic microservice migration and routing redirection method, comprising the following steps:

[0007] S1, obtains cloud computing data center and edge server resource information, application request flow set and initialization image deployment matrix in dynamic scenarios, and divides input request flow characteristics based on time slots;

[0008] S2, in each divided time slot, based on the characteristics of the input request flow, the preliminary multi-image deployment plan of the microservice is obtained in a marginal gain optimal way, and based on the proportional probability routing model, the node routing plan is redirected according to the image deployment matrix of the physical server node;

[0009] S3, based on the resource cost of the cloud computing data center and the preliminary deployment plan of multiple images and the node routing plan, screen out the topological dependency pairs with bandwidth anomalies in the request flow, perform migration operations on the microservice images on the server nodes connected to the links with bandwidth anomalies based on topology awareness, and obtain the optimal joint decision of microservice deployment and request routing for all requests.

[0010] S11, obtain cloud computing data network and edge server resource information G = (V, E), where V = {v1, v2, ..., v |V|} represents the set of edge server nodes, and E represents the connection between two edge servers v i , v j The collection of links, Indicates v i , v j The maximum bandwidth capacity between them, get the microservice type set For the i-th microservice One core on the server can only containerize one corresponding microservice image, and due to the heterogeneity of microservices, the core of the same server has different processing capabilities for task requests of different types of microservices. The unit processing capacity is expressed as

[0011] S12, the user request flow input is planned into different time slots, and the duration of each time slot is the same. The scheduler of the cloud computing data center deploys and migrates the microservice image at the beginning of each time slot, and obtains the set of all microservice-based request flows received by the cloud computing data center in different time slots. in, Represents a set of time slots; at time slot t, the microservice-based application request flow is characterized into four parameters to obtain the time slot-based input request flow characteristics: in represents the time when the request flow f(t) of the microservice-based application arrives at the data center, λ f(t)is the real-time average request arrival rate of the request flow f(t), is the topology of the microservice request flow f(t), Represents the set of directed dependencies in the microservice request flow f(t), is the maximum request response time threshold predefined by the request flow f(t) according to user requirements. In addition, C(t) is used v represents the current remaining computing resources of the physical server v∈V, Indicates link e i,j ∈E's current remaining bandwidth resources;

[0012] S13, initialize the microservice image deployment matrix Y(t) at time slot t, Representing microservices The number of microservice images occupied on the physical server v∈V, which are used to execute user requests during time slot t; to ensure that the total number of microservice images deployed in each time slot does not exceed the total computing resources of the physical server, the following computing resource constraints are defined:

[0013]

[0014] In the formula, is the decision variable, Indicates that the server node v∈V is allocated to the microservice at time slot t The number of images.

[0015] S21, build a proportional probability routing model, and in each time slot t, allocate a probabilistic routing solution according to the number of microservice images deployed on each physical node:

[0016]

[0017] In the formula, Indicates that during the execution of the request flow f(t), from the node deployed on node v i Previous microservices on m p Routing to the node v j The subsequent microservice m s probability;

[0018] S22, in each time slot t, counts the log information of the cloud data center, calculates the average data transmission delay, and the topology of all real-time changing microservice-based request flows Sort all request flows in descending order according to the equivalent average request arrival rate, recalculate the transmission delay and tolerance delay, and allocate the number of mirrors to each microservice based on the service intensity;

[0019] The calculation formula for transmission delay is:

[0020] Among them, D f(t) It represents the average data size under the unit request arrival rate of the request flow f(t); Represents node v i and node v j The remaining bandwidth resources between Represents node v i and node v j The transmission delay between is the number of microservices m in the request flow f(t) s Real-time average request arrival rate;

[0021] The bandwidth constraint formula is:

[0022] The formula for delay tolerance and mirror update is:

[0023]

[0024] in, Indicates the number of microservices m in the request flow f(t) assigned to it j The number of images; Represents the microservice m in the request flow f(t) j The average arrival rate; Represents the microservice m in the request flow f(t) j Unit processing capacity; Indicates the updated request flow tolerance delay. and They are the average communication delay and average transmission bandwidth between data center server nodes;

[0025] S23, for each required microservice, a polling placement method is used to distribute the microservice images on U server nodes, form U request queues according to the topological order of the request flow, and calculate the probability p of each request service path u∈U ; Then, add a mirror for each microservice while satisfying the time constraint, update the probability synchronously and calculate the time gain, recalculate the response delay after each round of mirror number update, select the lowest delay as the multi-mirror preliminary deployment plan with the best marginal gain, update the microservice mirror deployment matrix Y(t), and redirect the node routing plan according to the updated microservice mirror deployment matrix Y(t) through the method described in S21.

[0026] S31, first count the resource cost consumption of the data center, and calculate the resource utilization of all activated nodes at the current moment in the preliminary deployment plan And update the remaining bandwidth resources according to Sort the activated server nodes Vactive in ascending order, and according to Sort the set of physical links in ascending order The calculation formula is as follows:

[0027]

[0028] in, represents the resource utilization of node v, C v represents the total computing resources of node v;

[0029] S32, filter out the collection Abnormal links, sort the negative value parts in ascending order to initialize an abnormal link set For the service image topology pairs on the server nodes connected by abnormal links, i.e., links with negative remaining bandwidth resources, we look for a microservice image migration solution based on minimum cost. Once the topology dependency pairs and number of images to be migrated are determined, we need to find destination server nodes that meet the requirements for all corresponding containerized images, migrate the microservice images using the first-fit greedy solution, and update the global deployment solution to complete the migration of all topology link pairs that do not meet the bandwidth constraints.

[0030] S321, to optimize bandwidth resources, perform request flow level tracking analysis. For each link with abnormal bandwidth resources, Probabilistic Routing Scheme Confirm through the link All possible request flows f(t) and the corresponding topological dependency pairs (m p ,m s ), for each topology dependency pair, calculate the sum of the data communication volume D(m p ,v i ,m s ,v j ), sort each topology dependency pair in ascending order according to the data communication volume increasesort(D(m p ,v i ,m s ,v j ));

[0031] S322, initialize the list of microservice images to be migrated Migration_List, loop through each topology dependency pair (m p ,m s ) Determine the maximum number of images that can be migrated, determine the set of migration objects, and update the above list; traverse the list of objects to be migrated, for each microservice m that needs to be migratedp According to the topological dependency of F(t), the statistical routing passes through the microservice mirror m p A collection of all predecessor microservice nodes and subsequent microservice node collection And calculate m respectively p Aggregation of data traffic from predecessor microservices and the data traffic collection forwarded to subsequent microservices Calculate the sum of the number of predecessor and successor microservice images on each activated server node According to the communication delay and m p The weighted sum of the number of images with topological dependencies is obtained by sorting the server nodes in descending order. p The set of activated server nodes V sorted by dependency active ;

[0032] S323, loop each topology dependency pair (m p ,m s ) to migrate, in the dependency relationship m p Represents the source end, m s Represents the destination, which is equivalent to determining the migration object that must be migrated. The migration modes include migration source (priority, low cost) or migration source + destination (delayed, high cost). Here, the on-demand migration of the corresponding microservice image source is considered;

[0033] Initialize the number of pre-migration images Represents node v i About Microservices p The actual number of images that need to be migrated, initialized Indicates the bandwidth resource consumption that needs to be reduced in this abnormal link. Keep increasing the number of pre-migration images Calculate the data communication change ΔD (m p ,v i ,m s ,v j ), minus the corresponding data communication change ΔD(m p ,v i ,m s ,v j ),renew Until you are not satisfied Stop when the remaining bandwidth resources are updated So far is a topological dependency pair (m p ,m s )The number of images to migrate;

[0034] Once the topological dependency pairs to be migrated are determined (m p ,m s ) and the number of images It is necessary to find the destination server nodes that meet the requirements for all corresponding containerized images, and determine the actual migration plan for the image objects to be migrated based on the topological dependencies:

[0035] For topological dependency pairs (m p ,m s ) in the source microservice m p , the activated server node set V sorted by dependency is obtained by the method described in S322 active ;

[0036] First, loop through V active ,initialization Represents the slave node v i To node v j About Microservices p The actual number of images to be migrated, set computing resource constraints in and Respectively represent the node v j The number of cores and the number of remaining cores; Indicates the upper limit of average network resource utilization; when the constraint is met, add a mirror to be migrated According to the mirror ratio Computing predecessor microservices and subsequent microservices Topology dependency on varying data traffic and The above process is repeated until the number of migrated images causes bandwidth link communication resources or node computing resources to be insufficient, then one image to be migrated is reduced. The number of mirrors and the destination node that meets the requirements Add to the list Migration_Destination_List;

[0037] Next, for each migration target in Migration_Destination_List Calculate the number of nodes v i and v j Microservices on m p The sum of the average response delays of all routing paths Will mirror slave nodes v i Migrate to node v j , update node v i and vj Microservices p The number of microservices m p Perform global redirect request routing based on proportional probability and calculate the number of nodes v after migration i and v j Microservices on m p The sum of the average response delays of all routing paths Calculate the delay gain caused by the migration of the unit image according to The server nodes in Migration_Destination_List are sorted in descending order to obtain Decrease_Migration_Destination_List;

[0038] S324, use the first-fit greedy solution to migrate microservice images and update the global deployment solution And for m p The predecessor microservice dependency pair and the successor microservice dependency pair are redirected, and the global probabilistic routing solution is determined according to the resource proportion-aware routing principle.

[0039] Use the first-fit greedy solution to migrate microservice images and update the global deployment solution For each migration destination in Decrease_Migration_Destination_List Directly perform the migration operation and update the number of pre-migration images. The formula is as follows:

[0040]

[0041] When all the images to be migrated are migrated, After that, update the migrated microservice m p Image deployment scheme And for m p Redirect the previous and subsequent microservice dependency pairs, and determine the global probabilistic routing solution based on the resource ratio routing principle.

[0042] S325: If the network resources of the existing activated server nodes are insufficient and there are still some remaining microservice images that have not completed timely migration, select the newly added server node as the destination migration node based on the principle of minimum latency and maximum bandwidth capacity; update the decision variables that need to be determined And recalculate the bandwidth of each link and update the heterogeneous link set Return to S321 and repeat the above process until there are no abnormal links in the data center system, and all dynamic microservice migration processes are completed.

[0043] In a second aspect, the present invention provides a topology-aware dynamic microservice migration and routing redirection system, which is used to execute the above-mentioned topology-aware dynamic microservice migration and routing redirection method, and specifically includes: a dynamic information acquisition and initialization module, a microservice deployment and routing redirection module, and a microservice migration module;

[0044] The dynamic information acquisition and initialization module is used to obtain cloud computing data center and edge server resource information, application request flow set and initialization image deployment matrix in dynamic scenarios, and divide the input request flow characteristics based on time slots;

[0045] The microservice deployment and routing redirection module is used to obtain the preliminary multi-image deployment plan of the microservice in each divided time slot based on the characteristics of the input request flow in a marginal gain optimal way, and redirect the node routing plan according to the image deployment matrix of the physical server node based on the proportional probability routing model;

[0046] The microservice migration module is used to screen out topological dependency pairs with bandwidth anomalies in the request flow according to the resource cost of the cloud computing data center and the multi-image preliminary deployment plan and node routing plan, and perform migration operations on the microservice images on the server nodes connected to the links with bandwidth anomalies based on topology awareness to obtain the optimal microservice deployment and request routing joint decision for all requests.

[0047] The deployment migration redirection module includes: a resource perception unit and a mirror migration unit;

[0048] The resource sensing unit is used to: first, count the resource cost consumption of the data center, and calculate the resource utilization of all active nodes at the current moment in the preliminary deployment plan. And update the remaining bandwidth resources according to To activate the server node V active Sort in ascending order, and according to Sort the set of physical links in ascending order The calculation formula is as follows:

[0049]

[0050] in, represents the resource utilization of node v, C v represents the total computing resources of node v;

[0051] The image migration unit is used to: filter out Abnormal links, sort the negative value parts in ascending order to initialize an abnormal link set For the service image topology pairs on the server nodes connected by abnormal links, i.e., links with negative remaining bandwidth resources, we look for a microservice image migration solution based on minimum cost. Once the topology dependency pairs and number of images to be migrated are determined, we need to find destination server nodes that meet the requirements for all corresponding containerized images, migrate the microservice images using the first-fit greedy solution, and update the global deployment solution to complete the migration of all topology link pairs that do not meet the bandwidth constraints.

[0052] In a third aspect, the present invention provides a topology-aware dynamic microservice migration and routing redirection device, comprising a memory and a processor, wherein the memory is used to store computer program code and transmit the computer program code to the processor;

[0053] The processor is used to execute the aforementioned topology-aware dynamic microservice migration and routing redirection method according to the instructions in the computer program code.

[0054] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the aforementioned topology-aware dynamic microservice migration and routing redirection method is implemented.

[0055] Compared with the prior art, the present invention has the following beneficial effects:

[0056] 1. In a topology-aware dynamic microservice migration and routing redirection method of the present invention, in a dynamic cloud computing center, all microservice images can automatically select the optimal deployment plan according to the actual resource situation, and can perform topology-aware image migration in each time slot, optimize the occupancy of bandwidth resources, improve the success rate of request services, and further reduce the end-to-end average response time of each microservice-based application. Since the topology relationship level analysis is performed on the request flow, the present invention can make more full use of fine-grained fragmented resources between server clusters in image migration, while achieving higher resource utilization and reducing the communication load between servers, effectively solving the problems of high data migration cost and network congestion in the cloud computing center service network.

[0057] 2. A dynamic microservice migration and routing redirection system based on topology perception of the present invention includes: a dynamic information acquisition and initialization module: used to obtain cloud computing data center and edge server resource information, application request flow set and initialization image deployment matrix in dynamic scenarios, and divide the input request flow characteristics based on time slots; a microservice deployment and routing redirection module: used to obtain a multi-image preliminary deployment plan of microservices in each divided time slot based on the characteristics of the input request flow in a marginal gain optimal manner, and redirect the node routing plan according to the image deployment matrix of the physical server node based on the proportional probability routing model; a microservice migration module: used to screen out the topological dependency pairs with bandwidth anomalies in the request flow according to the resource cost of the cloud computing data center and the multi-image preliminary deployment plan and node routing plan, and perform migration operations on the microservice images on the server nodes connected to the links with bandwidth anomalies based on topology perception, and obtain the optimal microservice deployment and request routing joint decision for all requests. The system is used to implement the steps of the dynamic microservice migration and routing redirection method based on topology perception as provided in any of the above technical solutions. Therefore, the system also includes all the beneficial effects of the dynamic microservice migration and routing redirection method based on topology perception as provided in any of the above technical solutions, which will not be repeated here.

[0058] 3. A topology-aware dynamic microservice migration and routing redirection device of the present invention includes a processor and a memory, the memory is used to store computer program code, and transmit the computer program code to the processor, and the processor is used to execute the topology-aware dynamic microservice migration and routing redirection method provided in any of the above technical solutions according to the instructions in the computer program code. Therefore, the device also includes all the beneficial effects of the topology-aware dynamic microservice migration and routing redirection method provided in any of the above technical solutions, which will not be repeated here.

[0059] 4. The present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for dynamic microservice migration and routing redirection based on topology awareness as provided in any of the above technical solutions are implemented. Therefore, the computer-readable storage medium also includes all the beneficial effects of the method for dynamic microservice migration and routing redirection based on topology awareness as provided in any of the above technical solutions, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 is a flow chart of the method of the present invention.

[0061] Figure 2 This is a schematic diagram of the network structure of the cloud computing data center in Example 1.

[0062] Figure 3It is a step flow chart of S32 in the present invention.

[0063] Figure 4 It is a comparison chart of average delay optimization performance between Example 1 and Comparative Example 1 under different request arrival rates.

[0064] Figure 5 It is a comparison chart of average delay optimization performance between Example 1 and Comparative Example 1 under different numbers of request flows.

[0065] Figure 6 It is a schematic diagram of the structure of the system of the present invention.

[0066] Figure 7 It is a schematic diagram of the device of the present invention. DETAILED DESCRIPTION

[0067] The present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0068] Comparative Example 1:

[0069] S1, obtains cloud computing data center and edge server resource information, application request flow set and initialization image deployment matrix in dynamic scenarios, and divides input request flow characteristics based on time slots;

[0070] S2, in each divided time slot, the initial deployment of multiple images of microservices is performed based on a simple greedy method, and the microservice images called by user requests are placed on the same edge server node as much as possible. During the deployment process, if the total resource demand required by the user request exceeds the provided by the server node, the microservices will be split and deployed to the adjacent server nodes with the shortest communication delay until all microservice images are deployed. Based on the proportional probability routing model, the node routing scheme is redirected according to the image deployment matrix of the physical server node;

[0071] S3, based on the preliminary deployment plan, clusters microservices of the same type in a greedy manner and allocates them to the same or nearby servers to reduce the communication cost between adjacent microservices. At the same time, it checks whether the computing resources and bandwidth constraints are met. If not, it randomly selects candidate nodes from the remaining nodes in the cloud computing data center as migration targets, and continuously migrates the microservice image on the current node to the target node until the computing resources and bandwidth constraints are met.

[0072] Embodiment 1:

[0073] See also Figure 1 , Figure 2 , a topology-aware dynamic microservice migration and routing redirection method, comprising the following steps:

[0074] S1, obtains cloud computing data center and edge server resource information, application request flow set and initialization image deployment matrix in dynamic scenarios, and divides input request flow characteristics based on time slots;

[0075] S11, obtain cloud computing data network and edge server resource information G = (V, E), where V = {v1, v2, ..., v |V|} represents the set of edge server nodes, and E represents the connection between two edge servers v i , v j The collection of links, Indicates v i , v j The maximum bandwidth capacity between them, get the microservice type set For the i-th microservice One core on the server can only containerize one corresponding microservice image, and due to the heterogeneity of microservices, the core of the same server has different processing capabilities for task requests of different types of microservices. The unit processing capacity is expressed as

[0076] Get the maximum computing resource capacity of the physical server The computing resources are reflected in the number of cores of the server. Each core can only mirror one container, and one container can only hold one microservice image. That is to say, the core is the smallest resource granularity. This patent only considers single-dimensional resource constraints. Other resource constraints, such as storage, can also be considered, but will not affect the difficulty and solution of the problem, because multi-dimensional resource constraints are linear.

[0077] S12, based on the Alibaba service tracking data set, builds a user request flow. The user request flow consists of a microservice chain. We select 40 types of microservices with large characteristic differences from the Alibaba data set. Different microservices have different computing resource occupancy amounts. We build random [100, 1000] request flows. These request flows arrive at the cloud computing data center in the form of a Poisson distribution with arrival rates of different sizes [1, 9]. We plan the above user request flow inputs into different time slots. The duration of each time slot is the same. The scheduler of the cloud computing data center deploys and migrates the microservice image at the beginning of each time slot. We obtain the set of all microservice-based request flows received by the cloud computing data center in different time slots. in, Represents a set of time slots; at time slot t, the microservice-based application request flow is characterized into four parameters to obtain the time slot-based input request flow characteristics: in represents the time when the request flow f(t) of the microservice-based application arrives at the data center, λ f(t)is the real-time average request arrival rate of the request flow f(t), is the topology of the microservice request flow f(t), Represents the set of directed dependencies in the microservice request flow f(t), is the maximum request response time threshold predefined by the request flow f(t) according to user requirements. In addition, C(t) is used v represents the current remaining computing resources of the physical server v∈V, Indicates link e i,j ∈E's current remaining bandwidth resources;

[0078] This patent uses M / M / C queuing network to analyze the average response delay in transient steady state and capture complex microservice dependencies. In the time slot t, the requests arriving at the data center are dynamically changing. In order to maintain generality, the user arrival process in the time slot t is modeled as a Poisson process. Therefore, the request flow of the microservice-based application f(t) is a Poisson flow, and its average request arrival rate is λ f(t) ; In order to meet real-time user needs, at the beginning of each time slot, the microservice orchestration strategy will be updated at intervals to perform service image migration and probabilistic routing redirection based on constraints and optimization goals.

[0079] S13, initialize the microservice image deployment matrix Y(t) at time slot t, Representing microservices The number of microservice images occupied on the physical server v∈V, which are used to execute user requests during time slot t; to ensure that the total number of microservice images deployed in each time slot does not exceed the total computing resources of the physical server, the following computing resource constraints are defined:

[0080]

[0081] In the formula, is the decision variable, Indicates that the server node v∈V is allocated to the microservice at time slot t The number of images.

[0082] S2, in each divided time slot, based on the characteristics of the input request flow, the preliminary multi-image deployment plan of the microservice is obtained in a marginal gain optimal way, and based on the proportional probability routing model, the node routing plan is redirected according to the image deployment matrix of the physical server node;

[0083] For the dynamically changing data center G(t) and the time-varying microservice application set F(t), it is necessary to find the optimal multi-image deployment solution and refined probabilistic routing strategy in each time slot to maximize the utilization of computing resources and the success rate of requests. Since data centers and user requests are highly dynamic and random, service deployment and request routing must be performed dynamically. Given the time-varying and unpredictable characteristics of user requests, the long-term performance of the system is optimized under the premise of a given long-term cost budget. Specifically, in the face of dynamic user requests, especially when the average request arrival rate and the type and number of microservice applications change, the total number of microservice images required and their corresponding increments are quickly determined, and user needs are met under the premise of minimizing the ideal deployment cost.

[0084] S21, build a proportional probability routing model, and in each time slot t, allocate a probabilistic routing solution according to the number of microservice images deployed on each physical node:

[0085]

[0086] In the formula, Indicates that during the execution of the request flow f(t), from the node deployed on node v i Previous microservices on m p Routing to the node v j The subsequent microservice m s probability;

[0087] S22, in each time slot t, counts the log information of the cloud data center, calculates the average data transmission delay, and the topology of all real-time changing microservice-based request flows Sort all request flows in descending order according to the equivalent average request arrival rate, recalculate the transmission delay and tolerance delay, and allocate the number of mirrors to each microservice based on the service intensity;

[0088] The calculation formula for transmission delay is:

[0089] Among them, D f(t) It represents the average data size under the unit request arrival rate of the request flow f(t); Represents node v i and node v j The remaining bandwidth resources between Represents node v i and node v j The transmission delay between is the number of microservices m in the request flow f(t) s Real-time average request arrival rate;

[0090] The bandwidth constraint formula is:

[0091] The formula for delay tolerance and image update is:

[0092]

[0093] in, Indicates the number of microservices m in the request flow f(t) assigned to it j The number of images; Represents the microservice m in the request flow f(t) j The average arrival rate; Represents the microservice m in the request flow f(t) j Unit processing capacity; Indicates the updated request flow tolerance delay. and They are the average communication delay and average transmission bandwidth between data center server nodes;

[0094] S23, for each required microservice, a polling placement method is used to distribute the microservice images on U server nodes, form U request queues according to the topological order of the request flow, and calculate the probability p of each request service path u∈U ; Then, add a mirror for each microservice while satisfying the time constraint, update the probability synchronously and calculate the time gain, recalculate the response delay after each round of mirror number update, select the lowest delay as the multi-mirror preliminary deployment plan with the best marginal gain, update the microservice mirror deployment matrix Y(t), and redirect the node routing plan according to the updated microservice mirror deployment matrix Y(t) through the method described in S21.

[0095] S3, based on the resource cost of the cloud computing data center and the preliminary deployment plan of multiple images and the node routing plan, screen out the topological dependency pairs with bandwidth anomalies in the request flow, perform migration operations on the microservice images on the server nodes connected to the links with bandwidth anomalies based on topology awareness, and obtain the optimal joint decision of microservice deployment and request routing for all requests.

[0096] Specifically, although the marginal gain solution can quickly implement microservice deployment and request routing and eliminate the impact of highly dynamic and high-concurrency requests on the environment, the deployment solution based on the minimum response delay may lead to situations where bandwidth constraints cannot be met. Congested physical links in turn affect the total processing time of the request flow. Therefore, migration operations are performed on the server images on the server nodes connected to the links with abnormal bandwidth to eliminate abnormal microservice topology image pairs, improve the success rate of request services, and further reduce the end-to-end average response to each microservice-based application.

[0097] S31, first count the resource cost consumption of the data center, and calculate the resource utilization of all activated nodes at the current moment in the preliminary deployment plan And update the remaining bandwidth resources according to To activate the server node V active Sort in ascending order, and according to Sort the set of physical links in ascending order The calculation formula is as follows:

[0098]

[0099] in, represents the resource utilization of node v, C v represents the total computing resources of node v;

[0100] S32, see Figure 3 , filter out the collection Abnormal links, sort the negative value parts in ascending order to initialize an abnormal link set For the service image topology pairs on the server nodes connected by abnormal links, i.e., links with negative remaining bandwidth resources, we look for a microservice image migration solution based on minimum cost. Once the topology dependency pairs and number of images to be migrated are determined, we need to find destination server nodes that meet the requirements for all corresponding containerized images, migrate the microservice images using the first-fit greedy solution, and update the global deployment solution to complete the migration of all topology link pairs that do not meet the bandwidth constraints.

[0101] S321, in order to achieve fine-grained bandwidth resource optimization, request flow level tracking analysis is performed. For each link with abnormal bandwidth resources, Probabilistic Routing Scheme Confirm through the link All possible request flows f(t) and the corresponding topological dependency pairs (m p ,m s ), for each topology dependency pair, calculate the sum of the data communication volume D(m p ,v i ,m s ,v j ), sort each topology dependency pair in ascending order according to the data communication volume increasesort(D(m p ,v i ,m s ,v j ));

[0102] S322, initialize the list of microservice images to be migrated Migration_List, loop through each topology dependency pair (m p ,m s ) Determine the maximum number of images that can be migrated, determine the set of migration objects, and update the above list; traverse the list of objects to be migrated, for each microservice m that needs to be migrated p According to the topological dependency of F(t), the statistical routing passes through the microservice mirror m p A collection of all predecessor microservice nodes and subsequent microservice node collection And calculate m respectively p Aggregation of data traffic from predecessor microservices and the data traffic collection forwarded to subsequent microservices Calculate the sum of the number of predecessor and successor microservice images on each activated server node According to the communication delay and m p The weighted sum of the number of images with topological dependencies is obtained by sorting the server nodes in descending order. p The set of activated server nodes V sorted by dependency active ;

[0103] S323, loop each topology dependency pair (m p ,m s ) to migrate, in the dependency relationship m p Represents the source end, m s Represents the destination, which is equivalent to determining the migration object that must be migrated. The migration modes include migration source (priority, low cost) or migration source + destination (delayed, high cost). Here, the on-demand migration of the corresponding microservice image source is considered;

[0104] Initialize the number of pre-migration images Represents node v i About Microservices p The actual number of images that need to be migrated, initialized Indicates the bandwidth resource consumption that needs to be reduced in this abnormal link. Keep increasing the number of pre-migration images Calculate the data communication change ΔD (m p ,v i ,m s ,v j ), minus the corresponding data communication change ΔD(m p ,v i ,m s ,v j ),renew Until you are not satisfied Stop when the remaining bandwidth resources are updated So far is a topological dependency pair (m p ,m s )The number of images to migrate;

[0105] Once the topological dependency pairs to be migrated are determined (m p ,m s ) and the number of images It is necessary to find the destination server nodes that meet the requirements for all corresponding containerized images, and determine the actual migration plan for the image objects to be migrated based on the topological dependencies:

[0106] For topological dependency pairs (m p ,m s ) in the source microservice m p , the activated server node set V sorted by dependency is obtained by the method described in S322 active ;

[0107] First, loop through V active ,initialization Represents the slave node v i To node v j About Microservices p The actual number of images to be migrated, set computing resource constraints in and Respectively represent the node v j The number of cores and the number of remaining cores; Indicates the upper limit of average network resource utilization; when the constraint is met, add a mirror to be migrated According to the mirror ratio Computing predecessor microservices and subsequent microservices Topology dependency on varying data traffic and The above process is repeated until the number of migrated images causes bandwidth link communication resources or node computing resources to be insufficient, then one image to be migrated is reduced. The number of mirrors and the destination node that meets the requirements Add to the list Migration_Destination_List;

[0108] Next, for each migration target in Migration_Destination_List Calculate the number of nodes v i and v jMicroservices on m p The sum of the average response delays of all routing paths Will mirror slave nodes v i Migrate to node v j , update node v i and v j Microservices p The number of microservices m p Perform global redirect request routing based on proportional probability and calculate the number of nodes v after migration i and v j Microservices on m p The sum of the average response delays of all routing paths Calculate the delay gain caused by the migration of the unit image according to The server nodes in Migration_Destination_List are sorted in descending order to obtain Decrease_Migration_Destination_List;

[0109] S324, use the first-fit greedy solution to migrate microservice images and update the global deployment solution And for m p The predecessor microservice dependency pair and the successor microservice dependency pair are redirected, and the global probabilistic routing solution is determined according to the resource proportion-aware routing principle.

[0110] Use the first-fit greedy solution to migrate microservice images and update the global deployment solution For each migration destination in Decrease_Migration_Destination_List Directly perform the migration operation and update the number of pre-migration images. The formula is as follows:

[0111]

[0112] When all the images to be migrated are migrated, After that, update the migrated microservice m p Image deployment scheme And for m p Redirect the previous and subsequent microservice dependency pairs, and determine the global probabilistic routing solution based on the resource ratio routing principle.

[0113] S325: If the network resources of the existing activated server nodes are insufficient and there are still some remaining microservice images that have not completed timely migration, select the newly added server node as the destination migration node based on the principle of minimum latency and maximum bandwidth capacity; update the decision variables that need to be determined And recalculate the bandwidth of each link and update the heterogeneous link set Return to S321 and repeat the above process until there are no abnormal links in the data center system, and all dynamic microservice migration processes are completed.

[0114] Compared with the coarse-grained greedy and random microservice migration methods, this patent quantifies the microservice migration cost in a fine-grained manner based on the analysis of the topological relationship level, achieves the elimination of abnormal microservice topology dependency pairs at a lower cost, improves the success rate of request services, and further optimizes the end-to-end experiment of the request flow. Cloud computing data centers can be regarded as an autonomous network system in which node resources and link bandwidth are shared, so congestion control is a crucial factor in maintaining the long-term stability of system performance. When the deployment location of a microservice image is changed, the link connecting its predecessor microservice node and successor microservice node will change. The microservice migration algorithm of this patent achieves a fairer link allocation plan through the analysis and sorting of the degree of dependency, effectively reducing the degree of network congestion and improving the quality of user requests.

[0115] Through simulation experiments, the optimization performance of the patented algorithm under different scale dynamics is tested. Different user request flows are constructed based on the Alibaba service tracking data set. Two algorithms are used to control variables to test the performance. One is the average request processing delay of the cloud computing data center under different request arrival rates (see Figure 4 ), and the other is the average request processing delay of cloud computing data centers under different scales of user request numbers (see Figure 5 ).

[0116] Figure 4 and Figure 5 The optimization performance of the two algorithms under different scales of user requests is demonstrated. It can be seen that the algorithm of this patent always maintains a lower average request processing delay under different scales of user requests. This is because the algorithm of this patent has more fine-grained modeling and analysis than the existing methods in terms of microservice deployment and modeling, and as the scale of input requests increases, the gap between the optimization effects of the two algorithms gradually increases.

[0117] Embodiment 2:

[0118] See also Figure 6, a topology-aware dynamic microservice migration and routing redirection system, the system is used to execute the above-mentioned topology-aware dynamic microservice migration and routing redirection method, specifically including: a dynamic information acquisition and initialization module, a microservice deployment and routing redirection module, and a microservice migration module;

[0119] Dynamic information acquisition and initialization module: used to obtain cloud computing data center and edge server resource information, application request flow set and initialization image deployment matrix in dynamic scenarios, and divide input request flow characteristics based on time slots;

[0120] First, obtain the cloud computing data network and edge server resource information G = (V, E), where V = {v1, v2, ..., v |V|} represents the set of edge server nodes, and E represents the connection between two edge servers v i , v j The collection of links, Indicates v i , v j The maximum bandwidth capacity between them, get the microservice type set For the i-th microservice One core on the server can only containerize one corresponding microservice image, and due to the heterogeneity of microservices, the core of the same server has different processing capabilities for task requests of different types of microservices. The unit processing capacity is expressed as

[0121] Then, the massive user request flow input is planned into different time slots. The duration of each time slot is the same. The scheduler of the cloud computing data center deploys and migrates the microservice image at the beginning of each time slot, and obtains the collection of all microservice-based request flows received by the cloud computing data center in different time slots. in, Represents a set of time slots; at time slot t, the microservice-based application request flow is characterized into four parameters to obtain the time slot-based input request flow characteristics: in represents the time when the request flow f(t) of the microservice-based application arrives at the data center, λ f(t) is the real-time average request arrival rate of the request flow f(t), is the topology of the microservice request flow f(t), Represents the set of directed dependencies in the microservice request flow f(t), is the maximum request response time threshold predefined by the request flow f(t) according to user requirements. In addition, C(t) is used v represents the current remaining computing resources of the physical server v∈V, Indicates link ei,j ∈E's current remaining bandwidth resources;

[0122] Finally, initialize the microservice image deployment matrix Y(t) at time slot t, Representing microservices The number of microservice images occupied on the physical server v∈V, which are used to execute user requests during time slot t; to ensure that the total number of microservice images deployed in each time slot does not exceed the total computing resources of the physical server, the following computing resource constraints are defined:

[0123]

[0124] In the formula, is the decision variable, Indicates that the server node v∈V is allocated to the microservice at time slot t The number of images.

[0125] Microservice deployment and routing redirection module: used to obtain the preliminary multi-image deployment plan of microservices in each divided time slot based on the characteristics of the input request flow in a marginal gain-optimal manner, and redirect the node routing plan according to the image deployment matrix of the physical server node based on the proportional probability routing model;

[0126] First, a proportional probability routing model is constructed. In each time slot t, a probabilistic routing scheme is assigned according to the number of microservice images deployed on each physical node:

[0127]

[0128] In the formula, Indicates that during the execution of the request flow f(t), from the node deployed on node v i Previous microservices on m p Routing to the node v j The subsequent microservice m s probability;

[0129] Then, in each time slot t, the log information of the cloud data center is counted, the average data transmission delay is calculated, and the topology of all real-time changing microservice-based request flows is calculated. Sort all request flows in descending order according to the equivalent average request arrival rate, recalculate the transmission delay and tolerance delay, and allocate the number of mirrors to each microservice based on the service intensity;

[0130] The calculation formula for transmission delay is:

[0131] Among them, D f(t) It represents the average data size under the unit request arrival rate of the request flow f(t); Represents node v i and node v j The remaining bandwidth resources between Represents node v i and node v j The transmission delay between is the number of microservices m in the request flow f(t) s Real-time average request arrival rate;

[0132] The bandwidth constraint formula is:

[0133] The formula for delay tolerance and image update is:

[0134]

[0135] in, Indicates the number of microservices m in the request flow f(t) assigned to it j The number of images; Represents the microservice m in the request flow f(t) j The average arrival rate; Represents the microservice m in the request flow f(t) j Unit processing capacity; Indicates the updated request flow tolerance delay. and They are the average communication delay and average transmission bandwidth between data center server nodes;

[0136] Finally, for each required microservice, a polling placement method is used to distribute the microservice images on U server nodes. According to the topological order of the request flow, U request queues are formed and the probability p of each request service path is calculated. u∈U ; Then, add a mirror for each microservice under the condition of satisfying the time constraint, update the probability synchronously and calculate the time gain. After each round of mirror number update, recalculate the response delay, select the lowest delay as the multi-mirror preliminary deployment plan with the best marginal gain, update the microservice mirror deployment matrix Y(t), and redirect the node routing plan according to the method described in the proportional probability routing model based on the updated microservice mirror deployment matrix Y(t).

[0137] Microservice migration module: used to screen out topological dependency pairs with bandwidth anomalies in the request flow according to the resource cost of the cloud computing data center and the preliminary deployment plan of multiple images and the node routing plan, perform migration operations on the microservice images on the server nodes connected to the links with bandwidth anomalies based on topology awareness, and obtain the optimal joint decision of microservice deployment and request routing for all requests.

[0138] The deployment migration redirection module includes: a resource perception unit and a mirror migration unit;

[0139] The resource sensing unit is used to: first, count the resource cost consumption of the data center, and calculate the resource utilization of all active nodes at the current moment in the preliminary deployment plan. And update the remaining bandwidth resources according to To activate the server node V active Sort in ascending order, and according to Sort the set of physical links in ascending order The calculation formula is as follows:

[0140]

[0141] in, represents the resource utilization of node v, C v represents the total computing resources of node v;

[0142] The image migration unit is used to: filter out Abnormal links, sort the negative value parts in ascending order to initialize an abnormal link set For the service image topology pairs on the server nodes connected by abnormal links, i.e., links with negative remaining bandwidth resources, we look for a microservice image migration solution based on minimum cost. Once the topology dependency pairs and number of images to be migrated are determined, we need to find destination server nodes that meet the requirements for all corresponding containerized images, migrate the microservice images using the first-fit greedy solution, and update the global deployment solution to complete the migration of all topology link pairs that do not meet the bandwidth constraints.

[0143] a. Perform request flow level tracing analysis. For each link with abnormal bandwidth resources, Probabilistic Routing Scheme Confirm through the link All possible request flows f(t) and the corresponding topological dependency pairs (m p ,m s ), for each topology dependency pair, calculate the sum of the data communication volume D(m p ,v i ,m s ,v j ), sort each topology dependency pair in ascending order according to the data communication volume increasesort(D(m p ,v i ,m s ,v j ));

[0144] b. Initialize the list of microservice images to be migrated, Migration_List, and loop through each topology dependency pair (m p ,m s ) Determine the maximum number of images that can be migrated, determine the set of migration objects, and update the above list; traverse the list of objects to be migrated, for each microservice m that needs to be migrated p According to the topological dependency of F(t), the statistical routing passes through the microservice mirror m p A collection of all predecessor microservice nodes and subsequent microservice node collection And calculate m respectively p Aggregation of data traffic from predecessor microservices and the data traffic collection forwarded to subsequent microservices Calculate the sum of the number of predecessor and successor microservice images on each activated server node According to the communication delay and m p The weighted sum of the number of images with topological dependencies is obtained by sorting the server nodes in descending order. p The set of activated server nodes V sorted by dependency active ;

[0145] c, loop through each topology dependency pair (m p ,m s ) to migrate, in the dependency relationship m p Represents the source end, m s Represents the destination, which is equivalent to determining the migration object that must be migrated. The migration modes include migration source (priority, low cost) or migration source + destination (delayed, high cost). Here, the on-demand migration of the corresponding microservice image source is considered;

[0146] Initialize the number of pre-migration images Represents node v i About Microservices p The actual number of images that need to be migrated, initialized Indicates the bandwidth resource consumption that needs to be reduced in this abnormal link. Keep increasing the number of pre-migration images Calculate the data communication change ΔD (m p ,v i ,m s ,v j ), minus the corresponding data communication change ΔD(m p ,v i ,m s ,v j ),renew Until you are not satisfied Stop when the remaining bandwidth resources are updated So far is a topological dependency pair (m p ,m s )The number of images to migrate;

[0147] Once the topological dependency pairs to be migrated are determined (m p ,m s ) and the number of images It is necessary to find the destination server nodes that meet the requirements for all corresponding containerized images, and determine the actual migration plan for the image objects to be migrated based on the topological dependencies:

[0148] For topological dependency pairs (m p ,m s ) in the source microservice m p , the activated server node set V sorted by dependency is obtained by the method described in step b active ;

[0149] First, loop through V active ,initialization Represents the slave node v i To node v j About Microservices p The actual number of images to be migrated, set computing resource constraints in and Respectively represent the node v j The number of cores and the number of remaining cores; Indicates the upper limit of average network resource utilization; when the constraint is met, add a mirror to be migrated According to the mirror ratio Computing predecessor microservices and subsequent microservices Topology dependency on varying data traffic and The above process is repeated until the number of migrated images causes bandwidth link communication resources or node computing resources to be insufficient, then one image to be migrated is reduced. The number of mirrors and the destination node that meets the requirements Add to the list Migration_Destination_List;

[0150] Next, for each migration target in Migration_Destination_List Calculate the number of nodes v i and vj Microservices on m p The sum of the average response delays of all routing paths Will mirror slave nodes v i Migrate to node v j , update node v i and v j Microservices p The number of microservices m p Perform global redirect request routing based on proportional probability and calculate the number of nodes v after migration i and v j Microservices on m p The sum of the average response delays of all routing paths Calculate the delay gain caused by the migration of the unit image according to The server nodes in Migration_Destination_List are sorted in descending order to obtain Decrease_Migration_Destination_List;

[0151] d. Use the first-fit greedy solution to migrate microservice images and update the global deployment solution And for m p The predecessor microservice dependency pair and the successor microservice dependency pair are redirected, and the global probabilistic routing solution is determined according to the resource proportion-aware routing principle.

[0152] Use the first-fit greedy solution to migrate microservice images and update the global deployment solution For each migration destination in Decrease_Migration_Destination_List Directly perform the migration operation and update the number of pre-migration images. The formula is as follows:

[0153]

[0154] When all the images to be migrated are migrated, After that, update the migrated microservice m p Image deployment scheme And for m p Redirect the previous and subsequent microservice dependency pairs, and determine the global probabilistic routing solution based on the resource ratio routing principle.

[0155] e. If the network resources of the existing activated server nodes are insufficient and there are still some remaining microservice images that have not completed timely migration, select the newly added server nodes as the destination migration nodes based on the principle of minimum latency and maximum bandwidth capacity; update the decision variables that need to be determined And recalculate the bandwidth of each link and update the heterogeneous link set Return to step a and repeat the above process until there are no abnormal links in the data center system, and all dynamic microservice migration processes are completed.

[0156] Embodiment 3:

[0157] See also Figure 7 , a topology-aware dynamic microservice migration and routing redirection device, comprising a memory and a processor, wherein the memory is used to store a computer program code and transmit the computer program code to the processor;

[0158] The processor is used to execute the topology-aware dynamic microservice migration and routing redirection method described in Example 1 according to the instructions in the computer program code.

[0159] Embodiment 4:

[0160] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the topology-aware dynamic microservice migration and routing redirection method described in Example 1.

[0161] Generally speaking, the computer instructions for implementing the method of the present invention may be carried in any combination of one or more computer-readable storage media. Non-transitory computer-readable storage media may include any computer-readable media, except for the signal itself that is temporarily propagating.

[0162] Computer-readable storage media, for example, may be, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or devices, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with a system, device or device for executing instructions.

[0163] One or more programming languages ​​or their combinations can be used to write computer program codes for performing the operation of the present invention. These programming languages ​​include object-oriented programming languages, such as Java, Smalltalk, C++, and also include conventional procedural programming languages, such as C language or similar programming languages. In particular, Python language suitable for neural network calculations and platform frameworks based on TensorFlow, PyTorch, etc. can be used. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through various types of networks, including a local area network (LAN) or a wide area network (WAN), or an Internet connection is performed through an Internet service provider.

[0164] Although the embodiments of the present invention have been shown and described above, it should be understood that the above embodiments are exemplary and should not be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A dynamic microservice migration and routing redirection method based on topology awareness, characterized in that: The steps include: S1, obtain cloud computing data center and edge server resource information, application request flow set and initialization image deployment matrix in dynamic scenarios, and divide input request flow characteristics based on time slots; S2, in each divided time slot, based on the characteristics of the input request flow, the preliminary multi-image deployment plan of the microservice is obtained in a marginal gain optimal way, and based on the proportional probability routing model, the node routing plan is redirected according to the image deployment matrix of the physical server node; S3, based on the resource cost of the cloud computing data center and the preliminary deployment plan of multiple images and the node routing plan, screen out the topological dependency pairs with bandwidth anomalies in the request flow, perform migration operations on the microservice images on the server nodes connected to the links with bandwidth anomalies based on topology awareness, and obtain the optimal joint decision of microservice deployment and request routing for all requests.

2. According to the topology-aware dynamic microservice migration and routing redirection method of claim 1, it is characterized in that: S1 includes, S11, obtain cloud computing data network and edge server resource information G = (V, E), where V = {v1, v2, ..., v |V| } represents the set of edge server nodes, and E represents the connection between two edge servers v i , v j The collection of links, Indicates v i , v j The maximum bandwidth capacity between them, get the microservice type set For the i-th microservice One core on the server can only containerize one corresponding microservice image, and due to the heterogeneity of microservices, the core of the same server has different processing capabilities for task requests of different types of microservices. The unit processing capacity is expressed as S12, the user request stream is input and planned into different time slots. The duration of each time slot is the same. The scheduler of the cloud computing data center deploys and migrates the microservice image at the beginning of each time slot, and obtains the set of all microservice-based request streams received by the cloud computing data center in different time slots F(t) = {f1(t), f2(t), ..., f |F(t)| (t)}, in, Represents a set of time slots; at time slot t, the microservice-based application request flow is characterized into four parameters to obtain the time slot-based input request flow characteristics: in represents the time when the request flow f(t) of the microservice-based application arrives at the data center, λ f(t) is the real-time average request arrival rate of the request flow f(t), is the topology of the microservice request flow f(t), Represents the set of directed dependencies in the microservice request flow f(t), is the maximum request response time threshold predefined by the request flow f(t) according to user requirements. In addition, C(t) is used v represents the current remaining computing resources of the physical server v∈V, Indicates link e i,j ∈E's current remaining bandwidth resources; S13, initialize the microservice image deployment matrix Y(t) at time slot t, Representing microservices The number of microservice images occupied on the physical server v∈V, which are used to execute user requests during time slot t; to ensure that the total number of microservice images deployed in each time slot does not exceed the total computing resources of the physical server, the following computing resource constraints are defined: In the formula, is the decision variable, Indicates that the server node v∈V is allocated to the microservice at time slot t The number of images.

3. According to the topology-aware dynamic microservice migration and routing redirection method of claim 1, it is characterized in that: S2 includes, S21, build a proportional probability routing model, and in each time slot t, allocate a probabilistic routing solution according to the number of microservice images deployed on each physical node: In the formula, Indicates that during the execution of the request flow f(t), from the node deployed on node v i Previous microservices on m p Routing to the node v j The subsequent microservice m s probability; S22, in each time slot t, counts the log information of the cloud data center, calculates the average data transmission delay, and the topology of all real-time changing microservice-based request flows Sort all request flows in descending order according to the equivalent average request arrival rate, recalculate the transmission delay and tolerance delay, and allocate the number of mirrors to each microservice based on the service intensity; The calculation formula for transmission delay is: Among them, D f(t) It represents the average data size under the unit request arrival rate of the request flow f(t); Represents node v i and node v j The remaining bandwidth resources between Represents node v i and node v j The transmission delay between is the number of microservices m in the request flow f(t) s Real-time average request arrival rate; The bandwidth constraint formula is: The formula for delay tolerance and image update is: in, Indicates the number of microservices m in the request flow f(t) assigned to it j The number of images; Represents the microservice m in the request flow f(t) j The average arrival rate; Represents the microservice m in the request flow f(t) j Unit processing capacity; Indicates the updated request flow tolerance delay. and They are the average communication delay and average transmission bandwidth between data center server nodes; S23, for each required microservice, a polling placement method is used to distribute the microservice images on U server nodes, form U request queues according to the topological order of the request flow, and calculate the probability p of each request service path u∈U ; Then, add a mirror for each microservice while satisfying the time constraint, update the probability synchronously and calculate the time gain, recalculate the response delay after each round of mirror number update, select the lowest delay as the multi-mirror preliminary deployment plan with the best marginal gain, update the microservice mirror deployment matrix Y(t), and redirect the node routing plan according to the updated microservice mirror deployment matrix Y(t) through the method described in S21.

4. According to a topology-aware dynamic microservice migration and routing redirection method according to claim 1, it is characterized in that: S3 includes, S31, first count the resource cost consumption of the data center, and calculate the resource utilization of all activated nodes at the current moment in the preliminary deployment plan And update the remaining bandwidth resources according to To activate the server node V active Sort in ascending order, and according to Sort the set of physical links in ascending order The calculation formula is as follows: in, represents the resource utilization of node v, C v represents the total computing resources of node v; S32, filter out the collection Abnormal links, sort the negative value parts in ascending order to initialize an abnormal link set For the service image topology pairs on the server nodes connected by abnormal links, i.e., links with negative remaining bandwidth resources, we look for a microservice image migration solution based on minimum cost. Once the topology dependency pairs and number of images to be migrated are determined, we need to find destination server nodes that meet the requirements for all corresponding containerized images, migrate the microservice images using the first-fit greedy solution, and update the global deployment solution to complete the migration of all topology link pairs that do not meet the bandwidth constraints.

5. According to the topology-aware dynamic microservice migration and routing redirection method of claim 4, it is characterized in that: S3 includes, S321, to optimize bandwidth resources, perform request flow level tracking analysis. For each link with abnormal bandwidth resources, Probabilistic Routing Scheme Confirm through the link All possible request flows f(t) and the corresponding topological dependency pairs (m p ,m s ), for each topology dependency pair, calculate the sum of the data communication volume D(m p ,v i ,m s ,v j ), sort each topology dependency pair in ascending order according to the data communication volume increasesort(D(m p ,v i ,m s ,v j )); S322, initialize the list of microservice images to be migrated Migration_List, loop through each topology dependency pair (m p ,m s ) Determine the maximum number of images that can be migrated, determine the set of migration objects, and update the above list; Traverse the list of objects to be migrated, for each microservice m that needs to be migrated p According to the topological dependency of F(t), the statistical routing passes through the microservice mirror m p A collection of all predecessor microservice nodes and subsequent microservice node collection And calculate m respectively p Aggregation of data traffic from predecessor microservices and the data traffic collection forwarded to subsequent microservices Calculate the sum of the number of predecessor and successor microservice images on each activated server node According to the communication delay and m p The weighted sum of the number of images with topological dependencies is obtained by sorting the server nodes in descending order. p The set of activated server nodes V sorted by dependency active ; S323, loop each topology dependency pair (m p ,m s ) to migrate, in the dependency relationship m p Represents the source end, m s Represents the destination, which is equivalent to determining the migration object that must be migrated. The migration modes include migration source (priority, low cost) or migration source + destination (delayed, high cost). Here, the on-demand migration of the corresponding microservice image source is considered; Initialize the number of pre-migration images Represents node v i About Microservices p The actual number of images that need to be migrated, initialized Indicates the bandwidth resource consumption that needs to be reduced in this abnormal link. Increase the number of pre-migration images Calculate the data communication change ΔD (m p ,v i ,m s ,v j ), minus the corresponding data communication change ΔD(m p ,v i ,m s ,v j ),renew ΔD(m p ,v i ,m s ,v j ) until it is not satisfied Stop when the remaining bandwidth resources are updated So far is a topological dependency pair (m p ,m s )The number of images to migrate; Once the topological dependency pairs to be migrated are determined (m p ,m s ) and the number of images It is necessary to find the destination server nodes that meet the requirements for all corresponding containerized images, and determine the actual migration plan for the image objects to be migrated based on the topological dependencies: For topological dependency pairs (m p ,m s ) in the source microservice m p , the activated server node set V sorted by dependency is obtained by the method described in S322 active ; First, loop through V active ,initialization Represents the slave node v i To node v j About Microservices p The actual number of images to be migrated, set computing resource constraints in and Respectively represent the node v j The number of cores and the number of remaining cores; Indicates the upper limit of average network resource utilization; when the constraint is met, add a mirror to be migrated According to the mirror ratio Computing predecessor microservices and subsequent microservices Topology dependency on varying data traffic and The above process is repeated until the number of migrated images causes bandwidth link communication resources or node computing resources to be insufficient, then one image to be migrated is reduced. The number of mirrors and the destination node that meets the requirements Add to the list Migration_Destination_List; Next, for each migration target in Migration_Destination_List Calculate the number of nodes v i and v j Microservices on m p The sum of the average response delays of all routing paths Will mirror slave nodes v i Migrate to node v j , update node v i and v j Microservices p The number of microservices m p Perform global redirection request routing based on proportional probability and calculate the number of nodes v after migration i and v j Microservices on m p The sum of the average response delays of all routing paths Calculate the delay gain caused by the migration of the unit image according to The server nodes in Migration_Destination_List are sorted in descending order to obtain Decrease_Migration_Destination_List; S324, use the first-fit greedy solution to migrate microservice images and update the global deployment solution And for m p The predecessor microservice dependency pair and the successor microservice dependency pair are redirected, and the global probabilistic routing solution is determined according to the resource proportion-aware routing principle. Use the first-fit greedy solution to migrate microservice images and update the global deployment solution For each migration destination in Decrease_Migration_Destination_List Directly perform the migration operation and update the number of pre-migration images. The formula is as follows: When all the images to be migrated are migrated, After that, update the migrated microservice m p Image deployment scheme And for m p Redirect the previous and subsequent microservice dependency pairs, and determine the global probabilistic routing solution based on the resource ratio routing principle. S325: If the network resources of the existing activated server node are insufficient and there are still some remaining microservice images that have not completed the timely migration, a newly added server node is selected as the destination migration node based on the principle of minimum latency and maximum bandwidth capacity; Update the decision variables that need to be determined And recalculate the bandwidth of each link and update the heterogeneous link set Return to S321 and repeat the above process until there are no abnormal links in the data center system, and all dynamic microservice migration processes are completed.

6. A topology-aware dynamic microservice migration and routing redirection system, characterized in that: The system is used to execute the topology-aware dynamic microservice migration and routing redirection method according to any one of claims 1 to 5, specifically comprising: a dynamic information acquisition and initialization module, a microservice deployment and routing redirection module, and a microservice migration module; The dynamic information acquisition and initialization module is used to obtain cloud computing data center and edge server resource information, application request flow set and initialization image deployment matrix in dynamic scenarios, and divide the input request flow characteristics based on time slots; The microservice deployment and routing redirection module is used to obtain the preliminary multi-image deployment plan of the microservice in each divided time slot based on the characteristics of the input request flow in a marginal gain optimal way, and redirect the node routing plan according to the image deployment matrix of the physical server node based on the proportional probability routing model; The microservice migration module is used to screen out topological dependency pairs with bandwidth anomalies in the request flow according to the resource cost of the cloud computing data center and the multi-image preliminary deployment plan and node routing plan, and perform migration operations on the microservice images on the server nodes connected to the links with bandwidth anomalies based on topology awareness to obtain the optimal microservice deployment and request routing joint decision for all requests.

7. A topology-aware dynamic microservice migration and routing redirection system according to claim 6, characterized in that: The deployment migration redirection module includes: a resource perception unit and a mirror migration unit; The resource sensing unit is used to: first, count the resource cost consumption of the data center, and calculate the resource utilization of all active nodes at the current moment in the preliminary deployment plan. And update the remaining bandwidth resources according to To activate the server node V active Sort in ascending order, and according to Sort the set of physical links in ascending order The calculation formula is as follows: in, represents the resource utilization of node v, C v represents the total computing resources of node v; The image migration unit is used to: filter out Abnormal links, sort the negative value parts in ascending order to initialize an abnormal link set For the service image topology pairs on the server nodes connected by abnormal links, i.e., links with negative remaining bandwidth resources, we look for a microservice image migration solution based on minimum cost. Once the topology dependency pairs and number of images to be migrated are determined, we need to find destination server nodes that meet the requirements for all corresponding containerized images, migrate the microservice images using the first-fit greedy solution, and update the global deployment solution to complete the migration of all topology link pairs that do not meet the bandwidth constraints.

8. A topology-aware dynamic microservice migration and routing redirection device, characterized in that: The method comprises a memory and a processor, wherein the memory is used to store computer program code and transmit the computer program code to the processor; The processor is used to execute the topology-aware dynamic microservice migration and routing redirection method according to any one of claims 1 to 5 according to the instructions in the computer program code.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the method for dynamic microservice migration and routing redirection based on topology awareness described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Mobile edge computing-oriented multi-instance micro-service migration method

    CN113037805A

  • Heterogeneous multi-edge cloud collaborative micro-service deployment and routing joint optimization method and system

    CN116915686A

  • Flow routing and container deployment method facing network cloud node to sense network state

    CN117014323A

  • Rapid and efficient micro-service migration method in intelligent manufacturing scene

    CN117311940A

  • Joint optimization method and system for dynamic micro-service graph deployment and probability request routing

    CN117692503A

Cited By

  • Geographically distributed data center resource scheduling method

    CN120011028A

  • A Geographically Distributed Data Center Resource Scheduling Method

    CN120011028B

  • Industrial edge network micro-service optimization method based on dynamic arrangement and migration expansion

    CN120915666A

  • Micro-service deployment and request routing method and system based on edge network

    CN120935186A

  • SDN controller dynamic deployment method based on adaptive time window

    CN121037240A