CN115664988A - Kubernetes-oriented complex service deployment and scheduling method - Google Patents

Kubernetes-oriented complex service deployment and scheduling method Download PDF

Info

Publication number
CN115664988A
CN115664988A CN202211378010.XA CN202211378010A CN115664988A CN 115664988 A CN115664988 A CN 115664988A CN 202211378010 A CN202211378010 A CN 202211378010A CN 115664988 A CN115664988 A CN 115664988A
Authority
CN
China
Prior art keywords
pod
service deployment
node
capacity
deployment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211378010.XA
Other languages
Chinese (zh)
Inventor
褚伟波
海梁
於志文
张晓妍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northwestern Polytechnical University
Original Assignee
Northwestern Polytechnical University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Northwestern Polytechnical University filed Critical Northwestern Polytechnical University
Priority to CN202211378010.XA priority Critical patent/CN115664988A/en
Publication of CN115664988A publication Critical patent/CN115664988A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a Kubernets-oriented complex service deployment and scheduling method, which comprises the following steps: 1. the Pod sets a label in the application program; 2. establishing a service deployment optimization model for the Pod set to be deployed, wherein the service deployment optimization model is a 0-1 integer linear programming model; 3. solving the service deployment optimization model to obtain an optimal service deployment scheme, and executing the fourth step; otherwise, the optimal service deployment scheme is not obtained, and the steps from the second step to the third step are continued to wait for the next deployment; 4. deploying the Pod set to be deployed according to the optimal service deployment scheme; 5. monitoring resource capacity of N nodes during running of a plurality of application programs, and migrating a service deployment scheme for dynamic scheduling. The method has simple steps, fully considers the local resource requirement and the communication requirement, deploys and migrates the Pod according to the optimization target, and improves the service quality.

Description

Kubernetes-oriented complex service deployment and scheduling method
Technical Field
The invention belongs to the technical field of virtual machine container cloud, and particularly relates to a Kubernetes-oriented complex service deployment and scheduling method.
Background
Currently, services become more and more complex as application scenarios and services develop. The processing of a complex service often requires multiple functional modules/services to cooperate with each other. Meanwhile, with the progress of technology, services also show an integrated trend, and the services with correlation relation need to be treated as a whole, namely complex services, corresponding to the service deployment and management, and the complex services are formed by a plurality of pods.
The Kubernetes service management technology is designed for a single Pod, the Kubernetes service deployment is realized through a scheduler, and the native scheduler deploys each Pod to nodes with more surplus resources according to the resource use conditions of a CPU (Central processing Unit), a memory and the like of a system. When a complex service composed of a group of applications needs to be deployed, the native scheduler may also sequentially deploy the individual pods as independent individuals, which may result in that the communication requirement relationship between the individual pods is not satisfied, thereby affecting the service quality of the entire service. Likewise, when the system is running, the native scheduler also schedules these individual Pod as independent individuals.
Therefore, a complex service deployment and scheduling method facing Kubernetes is lacked, the local resource requirement and the communication requirement of an application program forming a complex service are fully considered, and Pod is deployed and migrated according to an optimization target, so that the resource requirement of the service is ensured to be met, and the service quality is improved.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a Kubernetes-oriented complex service deployment and scheduling method aiming at the defects in the prior art, the method has simple steps and reasonable design, the local resource requirement and the communication requirement of an application program forming a complex service are fully considered, and the Pod is deployed and migrated according to an optimization target, so that the resource requirement of the service is ensured to be met, and the service quality is improved.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows: a Kubernetes-oriented complex service deployment and scheduling method is characterized in that the complex service relates to a plurality of nodes, the complex service corresponds to an application program and comprises a plurality of Pods, and the Kubernetes-oriented complex service deployment and scheduling method comprises the following steps:
step one, setting a label by Pod in an application program:
step 101, printing the same label on the Pod belonging to the same application program to obtain the same group of Pod sets;
step 102, setting the total number of nodes as N; wherein N is a positive integer;
103, recording the same group of Pod sets of the application program to be deployed as Pod sets to be deployed;
step two, establishing a service deployment optimization model for the Pod to be deployed set:
establishing a service deployment optimization model; the service deployment optimization model comprises an optimization target of service deployment and resource constraint conditions of the service deployment, wherein the parameters of the resource constraint conditions of the service deployment are a CPU (central processing unit), a memory, an uplink bandwidth and a downlink bandwidth, and the service deployment optimization model is a 0-1 integer linear programming model;
step three, solving the service deployment optimization model, and executing step four when the optimal service deployment scheme is obtained; otherwise, the optimal service deployment scheme is not obtained, and the steps from the second step to the third step are continued to wait for the next deployment; the optimal service deployment scheme comprises nodes deployed by each Pod in the Pod set;
deploying the Pod set to be deployed according to the optimal service deployment scheme;
and step five, monitoring the resource capacity of the N nodes during the running of the plurality of application programs, and migrating the service deployment scheme to dynamically schedule.
The Kubernetes-oriented complex service deployment and scheduling method is characterized in that: in step 103, the Pod to be deployed set K is { Pod } 1 ,...,Pod k ,...,Pod K },Pod k Represents the kth Pod, wherein K and K are positive integers, and K is more than or equal to 1 and less than or equal to K;
the node set N includes N nodes and is { Note 1 ,...,Note i ,...,Note N },Note i Represents the ith node, and i and N are positive integers, and i is more than or equal to 1 and less than or equal to N.
The Kubernetes-oriented complex service deployment and scheduling method is characterized in that: in the second step, the optimization goal of service deployment is that the number of the deployment nodes is minimum or the distance between the deployment nodes is shortest;
and the resource constraint conditions of the service deployment in the step two comprise CPU resource constraint, memory resource constraint, uplink bandwidth constraint and downlink bandwidth constraint.
The Kubernetes-oriented complex service deployment and scheduling method is characterized in that: when the optimization target of the service deployment is that the number of the deployment nodes is minimum, establishing a service deployment optimization model, which specifically comprises the following steps:
Figure BDA0003927213850000031
wherein min represents the minimum value, s.t. represents the constraint, Y i Represents the occupation status of the ith node service deployment, and Y i ∈{0,1},Y i =1, indicating that the ith node service deployment is occupied; y is i =0, indicating that the i-th node service deployment is unoccupied;
X ik a state indicating whether the kth Pod is deployed to the ith node, and X ik ∈{0,1},X ik =1, representing that the kth Pod is deployed onto the ith node; x ik =0, which means that the kth Pod is not deployed onto the ith node;
Nc i indicates the available CPU capacity, ns, of the ith node i Indicates the available capacity of the memory of the ith node, nu i Representing the upstream bandwidth available capacity, nd, of the ith node i Indicating the available capacity of the downlink bandwidth of the ith node; pc k CPU demanded capacity, ps, representing the kth Pod k Represents the memory requirement capacity, pu, of the kth Pod k Represents the uplink bandwidth demand capacity, pd, of the kth Pod k Indicating the downstream bandwidth demand capacity of the kth Pod.
The Kubernetes-oriented complex service deployment and scheduling method is characterized in that: when the optimization target of service deployment is that the distance between deployment nodes is shortest, establishing a service deployment optimization model, which specifically comprises the following steps:
step 201, setting an intermediate variable Z ij And Z is ij =Y i ×Y j (ii) a Wherein, Y j Represents the occupancy state of the jth node service deployment, and Y j ∈{0,1},Y j =1, indicating that the jth node service deployment is occupied; y is j =0, indicating that the jth node service deployment is unoccupied; and Z is ij ≤Y i ,Z ij ≤Y j ,Z ij ≤Y i +Y j -1,Z ij Belongs to {0,1}, j is a positive integer and takes a value of 1-N;
step 202, establishing a service deployment optimization model, which specifically comprises the following steps:
Figure BDA0003927213850000041
wherein D is ij Indicating the distance between the ith node and the jth node.
The Kubernetes-oriented complex service deployment and scheduling method is characterized in that: in the fifth step, the resource capacity of the N nodes is monitored during the running of the plurality of application programs, and the service deployment scheme is migrated to be dynamically scheduled, wherein the specific process is as follows:
step 501, monitoring node resource capacity during the running of a plurality of application programs, acquiring the actual capacity of a CPU (central processing unit), the actual capacity of a memory, the actual capacity of an uplink bandwidth and the actual capacity of a downlink bandwidth of an ith node, and comparing the actual capacity of the CPU, the actual capacity of the memory, the maximum capacity of the uplink bandwidth and the maximum capacity of the downlink bandwidth of the ith node respectively;
step 502, when any actual capacity in step 501 is larger than 90% of any maximum capacity, marking as a node to be migrated, and acquiring each Pod on the node to be migrated;
step 503, analyzing each Pod deployed on the node to be migrated by adopting an analytic hierarchy process according to the actual resource usage capacity of each Pod deployed on the node to be migrated, and acquiring the Pod to be migrated on the node to be migrated;
step 504, traversing and judging the N nodes according to the method from step 501 to step 503 to obtain the Pod to be migrated on the N' migration nodes; wherein N 'is a positive integer, and N' is less than N;
505, according to the same group of Pod sets of the tags marked in step 101, taking the pods to be migrated on the N' migration nodes that have the same tag as the same group of Pod sets to be migrated, and taking the other pods that have the same tag as the same group of Pod sets that do not need to be migrated;
step 506, adding constraint conditions to nodes corresponding to the same group of Pod sets which do not need to be migrated according to the same group of Pod sets to be migrated, modeling and solving according to the method in the steps from the second step to the third step to obtain a deployment scheme of the same group of Pod sets to be migrated, and migrating according to the deployment scheme of the same group of Pod sets to be migrated; otherwise, the deployment schemes of the same group of Pod to be migrated are not acquired, and the steps 501 to 506 are continuously circulated to wait for the next migration.
Compared with the prior art, the invention has the following advantages:
1. the method has simple steps and reasonable design, and solves the problem that the Kubernets lack the integral deployment and scheduling of a complex service aiming at the single Pod design at present.
2. In the service deployment and scheduling process, the invention not only considers the local resource requirements of the application programs forming a complex service, such as CPU, memory and the like, but also considers the network bandwidth requirement relationship between the local resource requirements, such as uplink bandwidth and downlink bandwidth and the like, thereby ensuring that the application programs can meet various resource requirements and simultaneously realize the optimal deployment according to the optimization target.
3. The service deployment optimization model established by the invention comprises an optimization target of service deployment and a resource constraint condition of the service deployment, the resource constraint condition of the service deployment comprises parameters including a CPU, a memory, an uplink bandwidth and a downlink bandwidth, the number of the deployment nodes of the optimization target of the service deployment is minimum or the distance between the deployment nodes is shortest, the optimization target of the service deployment is adjusted according to actual requirements, and the adaptation range is improved.
4. The service deployment problem is converted into a 0-1 integer linear programming problem in the service deployment optimization model established by the invention, so that the target node scheme of each Pod deployment is quickly obtained.
5. The optimal service deployment scheme is deployed, the resource capacity of each node is monitored during service operation, the service deployment scheme is dynamically scheduled, and the Pod to be migrated is migrated, so that the load of the node is reduced and the service quality is improved.
In conclusion, the method has simple steps and reasonable design, fully considers the local resource requirement and the communication requirement of the application program forming a complex service, and deploys and migrates the Pod according to the optimization target, thereby ensuring that the resource requirement of the service is met and improving the service quality.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
FIG. 1 is a block diagram of the process flow of the present invention.
Detailed Description
As shown in fig. 1, the Kubernetes-oriented complex service deployment and scheduling method of the present invention is a complex service deployment and scheduling method for Kubernetes, where the complex service involves multiple nodes, the complex service corresponds to one application and includes multiple Pod applications, and is characterized in that:
step one, setting a label by Pod in an application program:
step 101, printing the same label on the Pod belonging to the same application program to obtain the same group of Pod sets;
102, setting the total number of nodes to be N; wherein N is a positive integer;
103, recording the same group of Pod sets of the application program to be deployed as Pod sets to be deployed;
step two, establishing a service deployment optimization model for the Pod to be deployed set:
establishing a service deployment optimization model; the service deployment optimization model comprises an optimization target of service deployment and resource constraint conditions of the service deployment, wherein the parameters of the resource constraint conditions of the service deployment are a CPU (central processing unit), a memory, an uplink bandwidth and a downlink bandwidth, and the service deployment optimization model is a 0-1 integer linear programming model;
step three, solving the service deployment optimization model, and executing step four when the optimal service deployment scheme is obtained; otherwise, the optimal service deployment scheme is not obtained, and the steps from two to three are continuously circulated to wait for the next deployment; the optimal service deployment scheme comprises nodes deployed by each Pod in the Pod set;
deploying the Pod set to be deployed according to the optimal service deployment scheme;
and step five, monitoring the resource capacity of the N nodes during the running of the plurality of application programs, and migrating the service deployment scheme to dynamically schedule.
In this embodiment, the Pod set K to be deployed in step 103 is { Pod } 1 ,...,Pod k ,...,Pod K },Pod k Represents the kth Pod, wherein K and K are positive integers, and K is more than or equal to 1 and less than or equal to K;
the node set N includes N nodes and is { Note 1 ,...,Note i ,...,Note N },Note i Represents the ith node, and i and N are positive integers, and i is more than or equal to 1 and less than or equal to N.
In this embodiment, the optimization goal of service deployment in step two is that the number of deployment nodes is minimum or the distance between the deployment nodes is shortest;
and the resource constraint conditions of the service deployment in the step two comprise CPU resource constraint, memory resource constraint, uplink bandwidth constraint and downlink bandwidth constraint.
In this embodiment, when the optimization goal of service deployment is that the number of deployed nodes is minimum, a service deployment optimization model is established, which is specifically as follows:
Figure BDA0003927213850000081
wherein min represents the minimum value, s.t. represents the constraint, Y i Occupancy state representing the service deployment of the ith nodeState, and Y i ∈{0,1},Y i =1, indicating that the i-th node service deployment is occupied; y is i =0, indicate that the ith node service deployment is unoccupied;
X ik a state indicating whether the kth Pod is deployed to the ith node, and X ik ∈{0,1},X ik =1, representing that the kth Pod is deployed onto the ith node; x ik =0, indicating that the kth Pod is not deployed on the ith node;
Nc i indicates the available CPU capacity, ns, of the ith node i Indicates the available capacity of the memory of the ith node, nu i Representing the upstream bandwidth available capacity, nd, of the ith node i Indicating the available capacity of the downlink bandwidth of the ith node; pc k CPU demanded capacity, ps, representing the kth Pod k Represents the memory requirement capacity, pu, of the kth Pod k Represents the uplink bandwidth demand capacity, pd, of the kth Pod k Indicating the downstream bandwidth demand capacity of the kth Pod.
In this embodiment, when the optimization goal of service deployment is that the distance between deployment nodes is shortest, a service deployment optimization model is established, which is specifically as follows:
step 201, setting an intermediate variable Z ij And Z is ij =Y i ×Y j (ii) a Wherein, Y j Represents the occupancy state of the jth node service deployment, and Y j ∈{0,1},Y j =1, indicating that the jth node service deployment is occupied; y is j =0, indicating that the jth node service deployment is unoccupied; and Z is ij ≤Y i ,Z ij ≤Y j ,Z ij ≤Y i +Y j -1,Z ij Belongs to {0,1}, j is a positive integer and takes a value of 1-N;
step 202, establishing a service deployment optimization model, specifically as follows:
Figure BDA0003927213850000091
wherein D is ij Indicating the distance between the ith node and the jth node.
In this embodiment, in step five, the resource capacity of the N nodes is monitored during the running of the multiple application programs, and the service deployment scheme is migrated to perform dynamic scheduling, specifically, the process is as follows:
step 501, monitoring node resource capacity during the running of a plurality of application programs, acquiring the actual capacity of a CPU (central processing unit), the actual capacity of a memory, the actual capacity of an uplink bandwidth and the actual capacity of a downlink bandwidth of an ith node, and comparing the actual capacity of the CPU, the actual capacity of the memory, the maximum capacity of the uplink bandwidth and the maximum capacity of the downlink bandwidth of the ith node respectively;
step 502, when any actual capacity in step 501 is larger than 90% of any maximum capacity, marking as a node to be migrated, and acquiring each Pod on the node to be migrated;
step 503, analyzing each Pod deployed on the node to be migrated by using an analytic hierarchy process according to the actual resource usage capacity of each Pod deployed on the node to be migrated, and acquiring the Pod to be migrated on the node to be migrated;
step 504, traversing and judging the N nodes according to the method from step 501 to step 503 to obtain the Pod to be migrated on the N' migration nodes; wherein N 'is a positive integer, and N' is less than N;
505, according to the same group of Pod sets of the tags marked in step 101, taking the Pod to be migrated on the N' migration nodes with the same tag as the same group of Pod sets to be migrated, and taking the other Pod with the same tag as the same group of Pod sets not to be migrated;
step 506, adding constraint conditions to nodes corresponding to the same group of Pod sets which do not need to be migrated according to the same group of Pod sets to be migrated, modeling and solving according to the method from the second step to the third step to obtain the deployment scheme of the same group of Pod sets to be migrated, and migrating according to the deployment scheme of the same group of Pod sets to be migrated; otherwise, the deployment schemes of the same group of Pod to be migrated are not acquired, and the steps 501 to 506 are continuously circulated to wait for the next migration.
In this embodiment, K is the total number of Pod in the Pod set to be deployed.
In this embodiment, it should be noted that Pod is a basic unit for Kubernetes service management, and Pod needs to be deployed to a Node when service deployment is performed.
In this embodiment, the resource unit of the CPU is the capacity of the CPU (Core), and is an absolute value rather than a relative value. In Kubernetes, one thousandth of CPU quota is usually expressed in m as the minimum unit. Namely: if a node has 5 logical CPUs, the total resource capacity of the CPU is 500m, each logical CPU is 100m, and 0.5 CPU is 50m.
Memory: according to the default memory unit Mi of Kubernets, the memory 100Mi is 100M.
Uplink bandwidth: according to the original bandwidth unit M of the bandwidth.
Downlink bandwidth: according to the original bandwidth unit M of the bandwidth.
In this embodiment, the requests field represents at least the resource capacity allocated to the Pod, and the limits field represents the maximum resource capacity that can be used by the Pod.
In the present embodiment of the present invention,
Figure BDA0003927213850000101
representing that the sum of CPU resource requirements of all the Pod deployed to the ith node is less than the available CPU capacity of the ith node;
Figure BDA0003927213850000102
representing that the sum of the memory resource requirements of all the Pod deployed to the ith node is less than the memory available capacity of the ith node;
Figure BDA0003927213850000103
representing that the sum of the uplink bandwidth resource requirements of all the Pod deployed to the ith node is less than the uplink bandwidth available capacity of the ith node;
Figure BDA0003927213850000104
indicating that the sum of the downlink bandwidth resource requirements of all the Pod deployed to the ith node is less than the downlink bandwidth available capacity of the ith node;
in this embodiment, the optimal service deployment scheme is stored in a Pod _ Name-Node _ Name (Key-Value) manner, and when the deployment scheme of the Pod to be migrated is stored, the scheme stored before is overwritten.
In this embodiment, when the optimal service deployment scheme is obtained and stored in the redis, any Pod is allocated and deployed to the corresponding target node, which is implemented through Schduler-extender scheduling provided by Kubernetes.
In this embodiment, the Kubernetes native system has no description of bandwidth resource requirements, and therefore, the communication requirement relationship between services cannot be guaranteed. Network service is provided for the cluster by introducing a Calico network plug-in, and the plug-in can limit uplink bandwidth and downlink bandwidth through an announcement field, so that the limit of the bandwidth use capacity of the Pod does not exceed the set capacity.
In this embodiment, the CPU demand capacity of the Pod, the memory demand capacity of the Pod, the uplink bandwidth demand capacity, and the downlink bandwidth demand capacity of the Pod are defined by the yaml file of the Pod.
In this embodiment, during service operation, the node resource capacity is obtained by using the monitoring component Prometheus.
In this embodiment, the resource capacity of each Node is obtained at a fixed time interval (every ten minutes) by the Prometheus service monitoring component.
In this embodiment, both the CPU resource constraint and the memory resource constraint of the Pod set constraints through the requests field and the limits field, and the uplink bandwidth constraint and the downlink bandwidth constraint of the Pod set constraints through the network plug-in Calico of Kubernetes.
In this embodiment, for example, in step 506, for the same group of Pod sets, adding the constraint condition to the node corresponding to the Pod set that does not need to be migrated in the same group is X ef =1, wherein e denotes the e-th Pod in the same group of Pod not requiring migration, f denotes the corresponding f-th node deployed by the e-th Pod in the same group of Pod not requiring migration, and e and f are positive integers.
In this embodiment, when any actual capacity in step 501 is greater than 90% of any maximum capacity, it means that the actual capacity of the CPU of the ith node is greater than 90% of the maximum capacity of the CPU of the ith node, or the actual capacity of the memory of the ith node is greater than 90% of the maximum capacity of the memory of the ith node, or the actual capacity of the uplink bandwidth of the ith node is greater than 90% of the maximum capacity of the uplink bandwidth of the ith node, or the actual capacity of the downlink bandwidth of the ith node is greater than 90% of the maximum capacity of the downlink bandwidth of the ith node.
In this embodiment, the service deployment optimization model is established
Figure BDA0003927213850000121
In this embodiment, the distance between the ith node and the jth node is a spatial euclidean distance or a network hop count, and if the ith node is the same as the jth node, the distance is zero.
In this embodiment, it should be noted that the constraint condition of the jth node is the same as the constraint condition of the ith node in the service deployment optimization model.
In conclusion, the method has simple steps and reasonable design, fully considers the local resource requirement and the communication requirement of the application program forming a complex service, and deploys and migrates the Pod according to the optimization target, thereby ensuring that the resource requirement of the service is met and improving the service quality.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and any simple modifications, changes and equivalent structural changes made to the above embodiment according to the technical essence of the present invention still fall within the protection scope of the technical solution of the present invention.

Claims (6)

1. A Kubernetes-oriented complex service deployment and scheduling method is characterized in that the complex service relates to a plurality of nodes, the complex service corresponds to an application program and comprises a plurality of Pods, and the Kubernetes-oriented complex service deployment and scheduling method comprises the following steps:
step one, setting a label by Pod in an application program:
step 101, printing the same label on the Pod belonging to the same application program to obtain the same group of Pod sets;
step 102, setting the total number of nodes as N; wherein N is a positive integer;
103, recording the same group of Pod sets of the application program to be deployed as Pod sets to be deployed;
step two, establishing a service deployment optimization model for the Pod to be deployed:
establishing a service deployment optimization model; the service deployment optimization model comprises an optimization target of service deployment and resource constraint conditions of the service deployment, wherein the parameters of the resource constraint conditions of the service deployment are a CPU (central processing unit), a memory, an uplink bandwidth and a downlink bandwidth, and the service deployment optimization model is a 0-1 integer linear programming model;
step three, solving the service deployment optimization model, and executing step four when the optimal service deployment scheme is obtained; otherwise, the optimal service deployment scheme is not obtained, and the steps from two to three are continuously circulated to wait for the next deployment; the optimal service deployment scheme comprises nodes deployed by each Pod in the Pod set;
deploying the Pod set to be deployed according to the optimal service deployment scheme;
and step five, monitoring the resource capacity of the N nodes during the running of the plurality of application programs, and migrating the service deployment scheme to dynamically schedule.
2. The Kubernetes-oriented complex service deployment and scheduling method according to claim 1, characterized in that: in step 103, the Pod to be deployed set K is { Pod } 1 ,...,Pod k ,...,Pod K },Pod k Represents the kth Pod, wherein K and K are positive integers, and K is more than or equal to 1 and less than or equal to K;
the node set N includes N nodes and is { Note 1 ,...,Note i ,...,Note N },Note i And i and N are positive integers, and i is more than or equal to 1 and less than or equal to N.
3. A kubernets-oriented complex service deployment and scheduling method according to claim 1, characterized in that: in the second step, the optimization target of service deployment is that the number of the deployment nodes is minimum or the distance between the deployment nodes is shortest;
and the resource constraint conditions of service deployment in the second step comprise CPU resource constraint, memory resource constraint, uplink bandwidth constraint and downlink bandwidth constraint.
4. A kubernets-oriented complex service deployment and scheduling method according to claim 3, characterized in that: when the optimization target of service deployment is that the number of deployment nodes is minimum, establishing a service deployment optimization model, specifically as follows:
Figure FDA0003927213840000021
wherein min represents the minimum value, s.t. represents the constraint, Y i Represents the occupation status of the ith node service deployment, and Y i ∈{0,1},Y i =1, indicating that the i-th node service deployment is occupied; y is i =0, indicating that the i-th node service deployment is unoccupied;
X ik a state indicating whether the kth Pod is deployed to the ith node, and X ik ∈{0,1},X ik =1, representing that the kth Pod is deployed onto the ith node; x ik =0, indicating that the kth Pod is not deployed on the ith node;
Nc i indicates the CPU available capacity, ns, of the ith node i Indicates the available capacity of the memory of the ith node, nu i Representing the upstream bandwidth available capacity, nd, of the ith node i Indicating the available capacity of the downlink bandwidth of the ith node; pc k CPU demanded capacity, ps, representing the kth Pod k Indicates the memory requirement capacity, pu, of the kth Pod k Represents the uplink bandwidth demand capacity, pd, of the kth Pod k Indicating the downstream bandwidth demand capacity of the kth Pod.
5. The Kubernetes-oriented complex service deployment and scheduling method according to claim 3, characterized in that: when the optimization target of service deployment is that the distance between deployment nodes is shortest, establishing a service deployment optimization model, specifically as follows:
step 201, setting an intermediate variable Z ij And Z is ij =Y i ×Y j (ii) a Wherein, Y j Represents the occupancy state of the jth node service deployment, and Y j ∈{0,1},Y j =1, indicating that the jth node service deployment is occupied; y is j =0, representing that the jth node service deployment is unoccupied; and Z is ij ≤Y i ,Z ij ≤Y j ,Z ij ≤Y i +Y j -1,Z ij Belongs to {0,1}, j is a positive integer and takes a value of 1-N;
step 202, establishing a service deployment optimization model, specifically as follows:
Figure FDA0003927213840000031
wherein D is ij Indicating the distance between the ith node and the jth node.
6. A kubernets-oriented complex service deployment and scheduling method according to claim 1, characterized in that: and fifthly, monitoring the resource capacity of the N nodes during the running of the plurality of application programs, and migrating the service deployment scheme to dynamically schedule, wherein the specific process is as follows:
step 501, monitoring node resource capacity during the running of a plurality of application programs, acquiring the actual capacity of a CPU (central processing unit), the actual capacity of a memory, the actual capacity of an uplink bandwidth and the actual capacity of a downlink bandwidth of an ith node, and comparing the actual capacity of the CPU, the actual capacity of the memory, the maximum capacity of the uplink bandwidth and the maximum capacity of the downlink bandwidth of the ith node respectively;
step 502, when any actual capacity in step 501 is larger than 90% of any maximum capacity, marking as a node to be migrated, and acquiring each Pod on the node to be migrated;
step 503, analyzing each Pod deployed on the node to be migrated by adopting an analytic hierarchy process according to the actual resource usage capacity of each Pod deployed on the node to be migrated, and acquiring the Pod to be migrated on the node to be migrated;
step 504, according to the method from step 501 to step 503, traversing and judging the N nodes to obtain Pods to be migrated on the N' migration nodes; wherein N 'is a positive integer, and N' is less than N;
505, according to the same group of Pod sets of the tags marked in step 101, taking the pods to be migrated on the N' migration nodes that have the same tag as the same group of Pod sets to be migrated, and taking the other pods that have the same tag as the same group of Pod sets that do not need to be migrated;
step 506, adding constraint conditions to nodes corresponding to the same group of Pod sets which do not need to be migrated according to the same group of Pod sets to be migrated, modeling and solving according to the method from the second step to the third step to obtain the deployment scheme of the same group of Pod sets to be migrated, and migrating according to the deployment scheme of the same group of Pod sets to be migrated; otherwise, the deployment schemes of the same group of Pod to be migrated are not acquired, and the steps 501 to 506 are continuously circulated to wait for the next migration.
CN202211378010.XA 2022-11-04 2022-11-04 Kubernetes-oriented complex service deployment and scheduling method Pending CN115664988A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211378010.XA CN115664988A (en) 2022-11-04 2022-11-04 Kubernetes-oriented complex service deployment and scheduling method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211378010.XA CN115664988A (en) 2022-11-04 2022-11-04 Kubernetes-oriented complex service deployment and scheduling method

Publications (1)

Publication Number Publication Date
CN115664988A true CN115664988A (en) 2023-01-31

Family

ID=85015321

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211378010.XA Pending CN115664988A (en) 2022-11-04 2022-11-04 Kubernetes-oriented complex service deployment and scheduling method

Country Status (1)

Country Link
CN (1) CN115664988A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116594784A (en) * 2023-07-17 2023-08-15 中移(苏州)软件技术有限公司 Method, device and system for scheduling edges and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116594784A (en) * 2023-07-17 2023-08-15 中移(苏州)软件技术有限公司 Method, device and system for scheduling edges and readable storage medium
CN116594784B (en) * 2023-07-17 2023-10-20 中移(苏州)软件技术有限公司 Method, device and system for scheduling edges and readable storage medium

Similar Documents

Publication Publication Date Title
US8656404B2 (en) Statistical packing of resource requirements in data centers
CA2154791C (en) Process for allocating frequencies to base stations of a mobile radiotelephone network
TWI763156B (en) Machine learning workload orchestration in heterogeneous clusters
CN107729126A (en) A kind of method for scheduling task and device of container cloud
US6487455B1 (en) Distributed real time operating system
CN108965014A (en) The service chaining backup method and system of QoS perception
CN113672391B (en) Parallel computing task scheduling method and system based on Kubernetes
CN113886034A (en) Task scheduling method, system, electronic device and storage medium
CN115664988A (en) Kubernetes-oriented complex service deployment and scheduling method
CN115118327B (en) Satellite communication resource scheduling method and system based on dynamic measurement feedback
CN114461357A (en) Remote sensing satellite raw data real-time processing flow scheduling engine
Tseng et al. An mec-based vnf placement and scheduling scheme for ar application topology
CN116074260A (en) Service slice scheduling method in power network
WO2020108337A1 (en) Cpu resource scheduling method and electronic equipment
CN112068964A (en) Slice type edge computing force management method
CN114691372A (en) Group intelligent control method of multimedia end edge cloud system
CN117608760A (en) Cloud application hybrid deployment method applied to Kubernetes
CN115866059B (en) Block chain link point scheduling method and device
CN113867736B (en) Deployment scheme generation method and device
CN115712572A (en) Task testing method and device, storage medium and electronic device
CN115858126A (en) Distributed computing power resource allocation method, device and medium
CN111950869B (en) Iterative solution method and system for improving initial solution of scheduling problem of aerospace measurement and control network
CN113204433B (en) Dynamic allocation method, device, equipment and storage medium for cluster resources
CN110427217B (en) Content-based publish-subscribe system matching algorithm lightweight parallel method and system
CN109756981B (en) Battlefield wireless spectrum resource allocation method and system based on auction mechanism

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination