Cluster Pod scheduling method, device, equipment and medium based on SRv6 protocol
By using a mirror database and preset calculation rules in an SRv6 networking environment to calculate and compare data sets and schedule Pods to new nodes, the problem of inefficient cluster Pod scheduling is solved, and intelligent and efficient scheduling of cluster Pods and orderly forwarding of IPv6 packets are achieved.
Patent Information
- Application Number
- CN202211735605.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-31
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2042-12-31
AI Technical Summary
Existing technologies make it difficult to efficiently schedule Pods to new nodes in an SRv6 networking cluster, resulting in low cluster Pod scheduling efficiency.
In an SRv6 networking environment, the server configuration data of the Pod is obtained by using the historical mirror data in the mirror database. The comparison data set is calculated according to the preset calculation rules. When the comparison value is greater than the current server configuration data, the Pod is placed in the scheduling queue for scheduling to the new node. At the same time, the IPv6 packets are forwarded in an orderly manner according to the preset forwarding rules.
It realizes the intelligent and efficient scheduling of cluster Pods to new nodes, and flexibly, orderly and efficiently schedules IPv6 packets within the network, improving the efficiency of cluster Pod scheduling.
Smart Images

Figure CN115865922B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network technology, and in particular to a cluster Pod scheduling method, device, equipment and medium based on the SRv6 protocol. Background Art
[0002] With the advancement of enterprise digital transformation and the large-scale application of IPv6, the scale of IoT platform clusters is becoming increasingly large. Therefore, in the process of upgrading large-scale IPv6 applications to SRv6, the pain point of efficient scheduling of cluster Pods is faced. In other words, existing technologies make it difficult to solve the problem of efficiently scheduling Pods to new nodes in SRv6 networking clusters. Summary of the Invention
[0003] The embodiments of the present invention provide a cluster Pod scheduling method, apparatus, device and medium based on the SRv6 protocol, aiming to solve the problem in the prior art that cluster Pods cannot be efficiently scheduled to new nodes.
[0004] In a first aspect, an embodiment of the present invention provides a cluster Pod scheduling method based on the SRv6 protocol. The method is applied to a cluster management server in an SRv6 networking environment. The cluster management server belongs to an initial cluster based on Kubernetes. The initial cluster also includes nodes and Pods. The method includes:
[0005] Deploy the master node and the mirror database according to the received deployment request. The mirror database stores all versions of Pod;
[0006] Get the server configuration data of each version of Pod through the historical image data in the image database;
[0007] Processing the server configuration data of all versions of Pod according to preset calculation rules to calculate a comparison data set, wherein the comparison data set includes comparison values corresponding to different time periods;
[0008] Determine the comparison value corresponding to the current Pod based on the comparison data set and the time period of the current Pod;
[0009] If the comparison value is greater than the current server configuration data of the current Pod, the current Pod is placed in the queue to be scheduled to the new node.
[0010] In a second aspect, an embodiment of the present invention provides a cluster Pod scheduling device based on the SRv6 protocol, wherein the device is configured in a cluster management server in an SRv6 networking environment, wherein the cluster management server belongs to an initial cluster based on Kubernetes, wherein the initial cluster also includes nodes and Pods, and the device includes:
[0011] A deployment unit, configured to deploy a master node and a mirror database according to a received deployment request, wherein the mirror database stores all versions of Pods;
[0012] A data acquisition unit is used to obtain the server configuration data of each version of the Pod through the historical image data in the image database;
[0013] A data processing unit, configured to process the server configuration data of all versions of Pod according to a preset calculation rule to calculate a comparison data set, wherein the comparison data set includes comparison values corresponding to different time periods;
[0014] A comparison analysis unit, configured to determine a comparison value corresponding to the current Pod based on the comparison data set and the time period of the current Pod;
[0015] The scheduling processing unit is configured to place the current Pod into a queue to be scheduled for scheduling to a new node if the comparison value is greater than the current server configuration data of the current Pod.
[0016] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and runnable on the processor. When the processor executes the computer program, it implements the cluster Pod scheduling method based on the SRv6 protocol as described in the first aspect above.
[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the cluster Pod scheduling method based on the SRv6 protocol as described in the first aspect above is implemented.
[0018] The embodiment of the present invention provides a cluster Pod scheduling method, device, equipment and medium based on the SRv6 protocol. The method includes deploying a master node and a mirror database according to a received deployment request; obtaining the server configuration data of each version of the Pod through the historical mirror data in the mirror database; processing the server configuration data of all versions of the Pod according to a preset calculation rule to calculate a comparison data set; determining the comparison value corresponding to the current Pod according to the comparison data set and the time period of the current Pod; if the comparison value is greater than the current server configuration data of the current Pod, the current Pod is placed in a queue to be scheduled and scheduled to a new node. Through the above method, the efficiency of cluster Pod scheduling can be greatly improved; in particular, the above method can also forward the corresponding IPv6 message to the new node in an orderly manner through the preset forwarding rules when the cluster Pod is scheduled to the new node, that is, the Pod in the cluster can be intelligently and efficiently scheduled to the new node while combining the SRv6 protocol to flexibly, orderly and efficiently schedule IPv6 messages within the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 A schematic diagram of a cluster Pod scheduling method based on the SRv6 protocol provided in an embodiment of the present invention;
[0021] Figure 2 A schematic diagram of another sub-process of the cluster Pod scheduling method based on the SRv6 protocol provided in an embodiment of the present invention;
[0022] Figure 3 A schematic diagram of another sub-process of the cluster Pod scheduling method based on the SRv6 protocol provided in an embodiment of the present invention;
[0023] Figure 4 A schematic diagram of another sub-process of the cluster Pod scheduling method based on the SRv6 protocol provided in an embodiment of the present invention;
[0024] Figure 5 Another schematic diagram of a cluster Pod scheduling method based on the SRv6 protocol provided in an embodiment of the present invention;
[0025] Figure 6 A schematic diagram of another sub-process of the cluster Pod scheduling method based on the SRv6 protocol provided in an embodiment of the present invention;
[0026] Figure 7 A schematic block diagram of a cluster Pod scheduling device based on the SRv6 protocol provided in an embodiment of the present invention;
[0027] Figure 8 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0029] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0030] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0031] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0032] See also Figure 1 , Figure 1A flow chart of a cluster Pod scheduling method based on the SRv6 protocol provided in an embodiment of the present invention; the cluster Pod scheduling method based on the SRv6 protocol is applied to a cluster management server in an SRv6 networking environment, wherein the cluster management server belongs to an initial cluster based on Kubernetes, and the initial cluster includes a Master (master node), a Node (node), and a Pod, wherein the cluster management server can exist as a master node. Specifically, the Master (master node) is used to control the Kubernetes nodes and is also the place where job tasks are created; the Node (node) is used to execute assigned tasks under the control of the Kubernetes master node; a Pod is a collection of one or more containers, which are deployed as a whole to a single node; containers in the same pod share IP addresses, inter-process communication (IPC), host names, and other resources; the Pod abstracts the network and storage of the underlying containers, making container migration within the cluster more convenient.
[0033] This cluster Pod scheduling method based on the SRv6 protocol solves the problem of efficient Pod scheduling in the Kubernetes cluster through the introduction of the SRv6 protocol in the IPv6 multi-cluster transformation of the Internet of Things device management platform. It mainly obtains the server configuration data of each version of the Pod through the historical mirror data in the mirror database; processes the server configuration data of all versions of the Pod according to the preset calculation rules to calculate a comparison data set, and determines the comparison value corresponding to the current Pod according to the comparison data set and the time period of the current Pod; if the comparison value is greater than the current server configuration data of the current Pod, the current Pod is placed in the queue to be scheduled and scheduled to the new node. Based on the above method, the problems of complex application relationships, multiple dependency levels, and complex cluster Pod scheduling in complex cluster scenarios are transformed. The Pod in the Kubernetes cluster is scheduled to the new node through the SRv6 networking. Furthermore, the IPv6 packets can be flexibly and orderly scheduled, so that the Pod scheduling is more intelligent and efficient. Figure 1 As shown, the method includes steps S110 to S150.
[0034] S110. Deploy the master node and the mirror database according to the received deployment request, where the mirror database stores all versions of Pods.
[0035] Specifically, create an initial Kubernetes-based cluster on a server in an SRv6 networking environment and determine the cluster management server for the initial cluster. A Kubernetes-based cluster mainly includes three objects: Master (master node), Node (node), and Pod.
[0036] If a deployment request is received from a user, the cluster management server can deploy the master node and the mirror database that stores all Pod versions based on the received deployment request. The mirror database is usually a fully synchronized copy of the main database. It stores historical mirror data, that is, version information for each Pod version, such as CPU usage, memory usage, disk I / O data, network I / O data, and other server configuration data.
[0037] S120. Obtain server configuration data of each version of the Pod through historical image data in the image database.
[0038] Historical image data can be obtained in the deployed image database, and the historical image data includes all historical server configuration data of each version of the Pod. Therefore, the cluster management server can obtain the server configuration data of each different version of the Pod by analyzing the historical image data in the image database, such as CPU usage, memory usage, disk IO data, network IO data, etc., which is not limited in this embodiment.
[0039] In one embodiment, if Figure 2 As shown, step S120 includes sub-steps S121 and S122.
[0040] S121. Obtain the version information data of each version of the Pod through the historical image data in the image database.
[0041] S122. Determine server configuration data for each version of the Pod according to the version information data.
[0042] Among them, the user can determine the version information data of each version of the Pod based on the historical image data in the image database, such as CPU usage, memory usage size, disk IO data, network IO data, etc., so as to determine the server configuration data of each version of the Pod, that is, the server configuration data of each version of the Pod can be one or more of CPU usage, memory usage size, disk IO data, and network IO data, which is not specifically limited in this embodiment.
[0043] S130 : Process the server configuration data of all versions of Pod according to a preset calculation rule to calculate a comparison data set, where the comparison data set includes comparison values corresponding to different time periods.
[0044] Preset calculation rules can be set in the cluster management server to calculate and process the server configuration data of Pods. After processing the server configuration data of all versions of Pods using these preset calculation rules, a comparison data set can be obtained. The comparison data set can include comparison values corresponding to Pods in different time periods.
[0045] In one embodiment, if Figure 3 As shown, step S130 includes sub-steps S131 to S133.
[0046] S131. Segment the server configuration data of all versions of Pod according to a certain time period.
[0047] Among them, it can be understood that in order to achieve efficient scheduling of Pods, the server configuration data of all versions of Pods can be divided into a certain time period. For example, the 24 hours of each day can be divided into a certain time period. The time period can be a 3-hour period, specifically 0:00-3:00, 3:00-6:00, 6:00-9:00, 9:00-12:00... The specific time period division method is not limited in this embodiment.
[0048] S132. Perform weighted averaging on the server configuration data of all versions of Pod in each time period to obtain an average value for each time period.
[0049] The cluster management server can also perform a weighted average of the server configuration data of all versions of Pod in each time period to obtain an average value for each time period.
[0050] S133: Determine the obtained average value of each time period as a corresponding comparison value and add it to a comparison data set.
[0051] The cluster management server can also determine the obtained average value of each time period as the comparison value corresponding to the time period, and classify all the comparison values into a comparison data set.
[0052] S140 : Determine a comparison value corresponding to the current Pod according to the comparison data set and the time period of the current Pod.
[0053] Specifically, the cluster management server may determine the current Pod, and determine the corresponding comparison value in the comparison data set according to the current time period of the current Pod.
[0054] S150: If the comparison value is greater than the current server configuration data of the current Pod, the current Pod is placed in a queue to be scheduled and scheduled to a new node.
[0055] Specifically, if the cluster management server detects that the determined comparison value is greater than the current server configuration data of the current Pod, it indicates that the current Pod's server configuration is low and the current Pod needs to be scheduled to another node. In other words, it is placed in the scheduling queue as a Pod to be scheduled so that it can be scheduled to the new node, thereby improving scheduling efficiency. If the comparison value is not greater than the current server configuration data of the current Pod, the current Pod remains in its current state. Of course, it can also be scheduled as needed, which is not limited in this embodiment.
[0056] In one embodiment, if Figure 4 As shown, step S150 includes sub-steps S151 to S153.
[0057] S151. Put the current Pod into a queue to be scheduled.
[0058] S152. Sort the Pods in the queue to be scheduled according to the size of their current server configuration data.
[0059] S153. Schedule the Pod to the new node according to the sorting order.
[0060] The cluster management server can place the current Pod into a queue for scheduling, which temporarily caches Pods that need to be scheduled. Once placed in the queue, the Pods can be sorted based on the size of their current server configuration data; for example, they can be sorted from largest to smallest or from smallest to largest to determine scheduling priority. Once sorted, the Pods can be scheduled to new nodes based on the sorted order.
[0061] In another embodiment, Figure 5 As shown, step S150 further includes step S160.
[0062] S160. When the current Pod is scheduled to a new node, the IPv6 packets belonging to the same node as the current Pod are forwarded to the new node in an orderly manner according to preset conversion rules.
[0063] In one embodiment, when the current Pod is scheduled to a new node, the cluster management server can determine all IPv6 packets belonging to the same node as the current Pod, and forward all IPv6 packets to the new node in an orderly manner according to preset conversion rules, thereby improving the overall scheduling and forwarding efficiency.
[0064] In one embodiment, if Figure 6 As shown, step S160 includes sub-steps S161 to S163.
[0065] S161. All IPv6 messages belonging to the same node as the current Pod are determined as messages to be forwarded, and the priorities of all messages to be forwarded are determined through quintuple analysis.
[0066] Among them, the cluster management server can determine all IPv6 messages belonging to the same node as the current Pod as messages to be forwarded, and classify the messages to be forwarded according to protocol rules. It first obtains the IPv6 message data of all Pods belonging to the same node as the current Pod through the mirror server, and determines the priority of all messages to be forwarded through quintuple analysis.
[0067] In one embodiment, the priorities of all messages to be forwarded are determined through quintuple analysis. Specifically, the priorities of all messages to be forwarded can be determined by analyzing the message data percentage of all messages to be forwarded through the quintuple analysis, and the priorities of all messages to be forwarded can be determined based on the size of the message data percentage. Specifically, for example, the protocol data with the highest message data percentage can be assigned the highest priority, and the priorities can be divided into 1-7 levels by analogy. All messages exceeding 7 are defined as level 8.
[0068] S162: Setting a priority parameter value in the cos field added to the message header information of all messages to be forwarded, where different priorities correspond to different priority parameter values.
[0069] Specifically, the cluster management server can set a priority parameter value in the cos field added to the message header information of all messages to be forwarded. For example, the priority parameter value can be set by adding the 802.1Q-Tag (i.e., 802.1q) cos field to the message header information of all messages to be forwarded, i.e., IPv6 messages. The value range of the priority parameter value can be between 8 and 15. At the same time, it can be determined that the smaller the value, the higher the priority of the message to be sent, and the message forwarding can be completed. Of course, the numerical setting range of the priority parameter value is not limited in this embodiment.
[0070] S163 : Associating the priority of each message to be forwarded with the corresponding priority parameter value, and forwarding the messages to be forwarded to the new node in the order of the associated priority parameter values.
[0071] Specifically, the cluster management server can associate the priority of each message to be forwarded with the corresponding priority parameter value, so as to achieve different priority parameter values corresponding to different priorities; for example, for the message to be forwarded with the highest priority, the priority parameter value set is the smallest number in the value range, and for the message to be forwarded with the lowest priority, the priority parameter value set is the largest number in the value range; after completing the association, the message to be forwarded can be forwarded to the new node according to the order of the priority parameter values.
[0072] The method includes deploying a master node and a mirror database according to a received deployment request; obtaining the server configuration data of each version of the Pod through the historical mirror data in the mirror database; processing the server configuration data of all versions of the Pod according to preset calculation rules to calculate a comparison data set; determining the comparison value corresponding to the current Pod according to the comparison data set and the time period of the current Pod; if the comparison value is greater than the current server configuration data of the current Pod, placing the current Pod in a queue to be scheduled to a new node. The above method can greatly improve the efficiency of cluster Pod scheduling; in particular, the above method can also forward the corresponding IPv6 packets to the new node in an orderly manner through preset forwarding rules when the cluster Pod is scheduled to a new node, that is, the Pod in the cluster can be intelligently and efficiently scheduled to the new node while combining the SRv6 protocol to flexibly, orderly and efficiently schedule IPv6 packets within the network.
[0073] The embodiment of the present invention also provides a cluster Pod scheduling device based on the SRv6 protocol. The cluster Pod scheduling device based on the SRv6 protocol can be configured in a cluster management server in an SRv6 networking environment. The cluster management server belongs to an initial cluster based on Kubernetes. The initial cluster also includes nodes and Pods. The cluster Pod scheduling device based on the SRv6 protocol is used to execute any embodiment of the aforementioned cluster Pod scheduling method based on the SRv6 protocol. Specifically, please refer to Figure 7 , Figure 7 A schematic block diagram of a cluster Pod scheduling device based on the SRv6 protocol provided by an embodiment of the present invention.
[0074] like Figure 7 As shown, the cluster Pod scheduling device 100 based on the SRv6 protocol includes a deployment unit 110, a data acquisition unit 120, a data processing unit 130, a comparison and analysis unit 140 and a scheduling processing unit 150.
[0075] The deployment unit 110 is configured to deploy a master node and a mirror database according to the received deployment request, wherein the mirror database stores all versions of Pods.
[0076] The data acquisition unit 120 is configured to obtain the server configuration data of each version of the Pod through the historical image data in the image database.
[0077] In a specific embodiment, the data acquisition unit 120 includes subunits: a version information acquisition unit, which is used to obtain version information data of each version of the Pod through historical image data in the image database; and a configuration data determination unit, which is used to determine the server configuration data of each version of the Pod based on the version information data.
[0078] The data processing unit 130 is configured to process the server configuration data of all versions of Pod according to a preset calculation rule to calculate a comparison data set, where the comparison data set includes comparison values corresponding to different time periods.
[0079] In a specific embodiment, the data processing unit 130 includes subunits: a data segmentation unit, which is used to segment the server configuration data of all versions of Pod according to a certain time period; a data analysis unit, which is used to perform weighted averaging on the server configuration data of all versions of Pod in each time period to obtain an average value for each time period; and a data collection unit, which is used to determine the obtained average value for each time period as a corresponding comparison value and include it in a comparison data set.
[0080] The comparison and analysis unit 140 is configured to determine a comparison value corresponding to the current Pod according to the comparison data set and the time period of the current Pod.
[0081] The scheduling processing unit 150 is configured to place the current Pod into a queue to be scheduled for scheduling to a new node if the comparison value is greater than the current server configuration data of the current Pod.
[0082] In a specific embodiment, the scheduling processing unit 150 includes sub-units: an adjustment unit, which is used to put the current Pod into the queue to be scheduled; a data sorting unit, which is used to sort the Pods in the queue to be scheduled according to the size of the current server configuration data; and a scheduling execution unit, which is used to schedule the Pods to the new node according to the sorting order.
[0083] In another embodiment, the cluster Pod scheduling device 100 based on the SRv6 protocol further includes: a message forwarding unit, which is used to forward IPv6 messages belonging to the same node as the current Pod to the new node in an orderly manner according to preset conversion rules when the current Pod is scheduled to the new node.
[0084] In a specific embodiment, the message forwarding unit includes subunits: a priority determination unit, which is used to determine all IPv6 messages belonging to the same node as the current Pod as messages to be forwarded, and determine the priority of all messages to be forwarded through quintuple analysis; a parameter value setting unit, which is used to set the priority parameter value in the cos field added to the message header information of all messages to be forwarded, and different priorities correspond to different priority parameter values; a forwarding execution unit, which is used to associate the priority of each message to be forwarded with the corresponding priority parameter value, and forward the messages to be forwarded to the new node according to the order of the associated priority parameter values.
[0085] The cluster Pod scheduling device based on the SRv6 protocol provided in the embodiment of the present invention applies the above-mentioned cluster Pod scheduling method based on the SRv6 protocol, including deploying the main node and the mirror database according to the received deployment request; obtaining the server configuration data of each version of the Pod through the historical mirror data in the mirror database; processing the server configuration data of all versions of the Pod according to the preset calculation rules to calculate a comparison data set; determining the comparison value corresponding to the current Pod according to the comparison data set and the time period of the current Pod; if the comparison value is greater than the current server configuration data of the current Pod, the current Pod is placed in the queue to be scheduled and scheduled to the new node. Through the above method, the efficiency of cluster Pod scheduling can be greatly improved; in particular, the above method can also forward the corresponding IPv6 packets to the new node in an orderly manner through the preset forwarding rules when the cluster Pod is scheduled to the new node, that is, the Pod in the cluster can be intelligently and efficiently scheduled to the new node while combining the SRv6 protocol to flexibly, orderly and efficiently schedule IPv6 packets within the network.
[0086] The above-mentioned cluster Pod scheduling device based on the SRv6 protocol can be implemented in the form of a computer program. The computer program can be used in Figure 8 Runs on the computer equipment shown.
[0087] See also Figure 8 , Figure 8 1 is a schematic block diagram of a computer device provided by an embodiment of the present invention. The computer device can be used to execute a cluster Pod scheduling method based on the SRv6 protocol to improve the efficiency of cluster Pod scheduling.
[0088] See Figure 8 The computer device 500 includes a processor 502 , a memory, and a network interface 505 connected via a system bus 501 , wherein the memory may include a storage medium 503 and an internal memory 504 .
[0089] The storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 may execute a cluster Pod scheduling method based on the SRv6 protocol. The storage medium 503 may be a volatile storage medium or a non-volatile storage medium.
[0090] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
[0091] The internal memory 504 provides an environment for the operation of the computer program 5032 in the storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute the cluster Pod scheduling method based on the SRv6 protocol.
[0092] The network interface 505 is used for network communication to provide data information transmission, and the network communication is wired network communication and / or wireless network communication. Those skilled in the art will understand that Figure 8 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention and does not constitute a limitation on the computer device 500 to which the solution of the present invention is applied. The specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0093] The processor 502 is configured to run a computer program 5032 stored in the memory to implement corresponding functions in the above-mentioned cluster Pod scheduling method based on the SRv6 protocol.
[0094] Those skilled in the art will understand that Figure 8 The embodiment of the computer device shown in the figure does not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such an embodiment, the structure and function of the memory and processor are the same as those in the figure. Figure 8 The embodiments shown are consistent and will not be described again here.
[0095] It should be understood that in the embodiment of the present invention, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0096] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium. The computer-readable storage medium stores a first computer program, a second computer program, or a third computer program. When the first computer program is executed by a first processor, the second computer program is executed by a second processor, and the third computer program is executed by a third processor, the steps included in the above-mentioned cluster Pod scheduling method based on the SRv6 protocol are jointly implemented.
[0097] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0098] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, or units with the same function may be combined into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be an electrical, mechanical or other form of connection.
[0099] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
[0100] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0101] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a computer-readable storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned computer-readable storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.
[0102] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A cluster Pod scheduling method based on the SRv6 protocol, characterized in that: The method is applied to a cluster management server in an SRv6 networking environment, where the cluster management server belongs to an initial cluster based on Kubernetes, and the initial cluster also includes nodes and Pods. The method includes: Deploy the master node and the mirror database according to the received deployment request. The mirror database stores all versions of Pod; Get the server configuration data of each version of Pod through the historical image data in the image database; Processing the server configuration data of all versions of Pod according to preset calculation rules to calculate a comparison data set, wherein the comparison data set includes comparison values corresponding to different time periods; Determine the comparison value corresponding to the current Pod based on the comparison data set and the time period of the current Pod; If the comparison value is greater than the current server configuration data of the current Pod, the current Pod is placed in the queue to be scheduled to the new node; After placing the current Pod into the queue to be scheduled and scheduling it to the new node, the method further includes: When the current Pod is scheduled to a new node, the IPv6 packets belonging to the same node as the current Pod will be forwarded to the new node in an orderly manner according to the preset conversion rules.
2. The cluster Pod scheduling method based on the SRv6 protocol according to claim 1, characterized in that: The server configuration data of each version of Pod is obtained through the historical image data in the image database, including: Get the version information of each version of Pod through the historical image data in the image database; The server configuration data of each version of the Pod is determined according to the version information data.
3. The cluster Pod scheduling method based on the SRv6 protocol according to claim 1, characterized in that: The server configuration data of all versions of Pod are processed according to the preset calculation rules to calculate a comparison data set, including: The server configuration data of all versions of Pod is divided into certain time periods; The server configuration data of all versions of Pod in each time period is weighted averaged to obtain the average value for each time period; The obtained average value of each time period is determined as the corresponding comparison value and included in a comparison data set.
4. The cluster Pod scheduling method based on the SRv6 protocol according to claim 1, characterized in that: Putting the current Pod into the queue to be scheduled and scheduling it to the new node includes: Put the current Pod into the queue to be scheduled; Sort the Pods in the queue to be scheduled by the size of their current server configuration data; Schedule the Pods to the new nodes according to the sorted order.
5. The cluster Pod scheduling method based on the SRv6 protocol according to claim 1, characterized in that: The IPv6 packets belonging to the same node as the current Pod are forwarded to the new node in an orderly manner according to the preset conversion rules, including: All IPv6 packets belonging to the same node as the current Pod are identified as packets to be forwarded, and the priority of all packets to be forwarded is determined through quintuple analysis; The priority parameter value is set in the cos field added to the message header information of all messages to be forwarded. Different priorities correspond to different priority parameter values. The priority of each message to be forwarded is associated with the corresponding priority parameter value, and the messages to be forwarded are forwarded to the new node in the order of the associated priority parameter values.
6. The cluster Pod scheduling method based on the SRv6 protocol according to claim 5, characterized in that: The determination of the priorities of all messages to be forwarded through quintuple analysis includes: The message data ratio of all messages to be forwarded is determined through quintuple analysis, and the priority of all messages to be forwarded is determined according to the size of the message data ratio.
7. A cluster Pod scheduling device based on the SRv6 protocol, characterized in that: The device is configured in a cluster management server in an SRv6 networking environment. The cluster management server belongs to an initial cluster based on Kubernetes. The initial cluster also includes nodes and Pods. The device includes: A deployment unit, configured to deploy a master node and a mirror database according to a received deployment request, wherein the mirror database stores all versions of Pods; A data acquisition unit is used to obtain the server configuration data of each version of the Pod through the historical image data in the image database; A data processing unit, configured to process the server configuration data of all versions of Pod according to a preset calculation rule to calculate a comparison data set, wherein the comparison data set includes comparison values corresponding to different time periods; A comparison and analysis unit, configured to determine a comparison value corresponding to the current Pod based on the comparison data set and the time period of the current Pod; A scheduling processing unit, configured to place the current Pod into a queue to be scheduled for scheduling to a new node if the comparison value is greater than the current server configuration data of the current Pod; After placing the current Pod into the queue to be scheduled and scheduling it to the new node, the method further includes: When the current Pod is scheduled to a new node, the IPv6 packets belonging to the same node as the current Pod will be forwarded to the new node in an orderly manner according to the preset conversion rules.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the cluster Pod scheduling method based on the SRv6 protocol is implemented according to any one of claims 1 to 6.
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 a processor, the cluster Pod scheduling method based on the SRv6 protocol is implemented as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Container resource adjustment method and device, electronic equipment and storage medium
CN115167980A
Dynamic resource quota and scheduling component based on Kubernetes
CN115297112A
Distributed Pod scheduling optimization method based on Kubernetes combined with Flink
CN115509706A