CN114356505A - Method, apparatus, device, medium and product for scheduling groups of containers - Google Patents

Method, apparatus, device, medium and product for scheduling groups of containers Download PDF

Info

Publication number
CN114356505A
CN114356505A CN202210013277.2A CN202210013277A CN114356505A CN 114356505 A CN114356505 A CN 114356505A CN 202210013277 A CN202210013277 A CN 202210013277A CN 114356505 A CN114356505 A CN 114356505A
Authority
CN
China
Prior art keywords
container group
application program
machine node
node corresponding
scheduling
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
CN202210013277.2A
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202210013277.2A priority Critical patent/CN114356505A/en
Publication of CN114356505A publication Critical patent/CN114356505A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The disclosure provides a method, a device, equipment, a medium and a product for scheduling a container group, and relates to the technical field of cloud computing, in particular to the technical field of distributed cache cluster monitoring. The specific implementation scheme is as follows: acquiring a container group set corresponding to an application program; dispatching each container group in the container group set to a machine node corresponding to the application program; monitoring the running state of each container group in the container group set to obtain monitoring information; for each container group in the container group set, in response to determining that the monitoring information indicates that the machine node where the container group is currently located is not consistent with the machine node corresponding to the application program, scheduling the container group to the machine node corresponding to the application program. The implementation mode can control each container group corresponding to the application program to be located in the same machine node, and the operation effect of the multi-container application program is improved.

Description

Method, apparatus, device, medium and product for scheduling groups of containers
Technical Field
The disclosure relates to the technical field of cloud computing, in particular to the technical field of distributed cache cluster monitoring.
Background
Currently, with the development of container technology, resources corresponding to each application program can be divided into a plurality of containers for storage. Among other things, container technology refers to the efficient partitioning of resources of a single operating system into isolated groups to better balance conflicting resource usage requirements among the isolated groups.
In practice, it is found that, for an application program, if a plurality of containers corresponding to the application program are divided into different container groups, and the container groups are located in different machine nodes to cooperate with each other, the application program may not operate normally, or data transmission delay of the application program may be large. Therefore, the normal operation of the application program in the above scenario is difficult to ensure by the current container group scheduling mode, which affects the operation effect of the multi-container application program.
Disclosure of Invention
The present disclosure provides a method, apparatus, device, medium, and article of manufacture for scheduling groups of containers.
According to an aspect of the present disclosure, there is provided a method for scheduling a group of containers, comprising: acquiring a container group set corresponding to an application program; dispatching each container group in the container group set to a machine node corresponding to the application program; monitoring the running state of each container group in the container group set to obtain monitoring information; for each container group in the container group set, in response to determining that the monitoring information indicates that the machine node where the container group is currently located is not consistent with the machine node corresponding to the application program, scheduling the container group to the machine node corresponding to the application program.
According to another aspect of the present disclosure, there is provided an apparatus for scheduling a group of containers, including: the device comprises a set acquisition unit, a storage unit and a processing unit, wherein the set acquisition unit is configured to acquire a container group set corresponding to an application program; the scheduling unit is configured to schedule each container group in the container group set to a machine node corresponding to the application program; the monitoring unit is configured to monitor the running state of each container group in the container group set to obtain monitoring information; and the scheduling optimization unit is configured to respond to the fact that the monitoring information indicates that the machine node where the container group is located currently is not consistent with the machine node corresponding to the application program for each container group in the container group set, and schedule the container group to the machine node corresponding to the application program.
According to another aspect of the present disclosure, there is provided an electronic device including: one or more processors; a memory for storing one or more programs; when executed by one or more processors, cause the one or more processors to implement a method for scheduling a group of containers as any one of above.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform a method for scheduling a group of containers as any one of the above.
According to another aspect of the disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements a method for scheduling a group of containers as any of the above.
According to the technology disclosed by the invention, the method for scheduling the container groups is provided, so that the container groups corresponding to the application program can be controlled to be positioned at the same machine node, and the operation effect of the multi-container application program is improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present disclosure may be applied;
FIG. 2 is a flow diagram for one embodiment of a method for scheduling groups of containers, according to the present disclosure;
FIG. 3 is a schematic diagram of one application scenario of a method for scheduling groups of containers according to the present disclosure;
FIG. 4 is a flow diagram of another embodiment of a method for scheduling a group of containers according to the present disclosure;
FIG. 5 is a schematic block diagram illustrating one embodiment of an apparatus for scheduling groups of containers, according to the present disclosure;
fig. 6 is a block diagram of an electronic device for implementing a method for scheduling a group of containers according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, and 103 may be installed with applications for managing containerization on multiple hosts in the cloud platform, and the terminal devices 101, 102, and 103 may implement scheduling of a set of container groups corresponding to each application program by calling a service corresponding to the application based on a human-computer interaction instruction received by the application. For example, the terminal devices 101, 102, and 103 may send, through the network 104, an application program that needs to control a container group set to be located in the same machine node to the server 105 that provides a service for an application of the management cloud platform, so that the server 105 performs a corresponding scheduling operation on the container group set corresponding to the application program.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices including, but not limited to, mobile phones, computers, tablets, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may be a server that provides various services for managing containerized applications on multiple hosts in the cloud platform, for example, the server 105 may obtain application programs that need to control the container group sets and are located in the same machine node, which are sent by the terminal devices 101, 102, and 103, determine the container group set corresponding to each application program, schedule the container group set corresponding to each application program to the machine node corresponding to the application program, dynamically monitor the operating state of the container group set corresponding to each application program, obtain monitoring information, and adjust the node where a container group that is inconsistent in the container group set is located based on the monitoring information, so as to determine that the adjusted same application program is in the container group operating stage, and multiple container groups corresponding to the application program are all located in the same machine node.
The server 105 may be hardware or software. When the server 105 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server 105 is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the method for scheduling a container group provided by the embodiment of the present disclosure is generally performed by the server 105, and the apparatus for scheduling a container group is generally disposed in the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a method for scheduling a group of containers in accordance with the present disclosure is shown. The method for scheduling a container group of the embodiment comprises the following steps:
step 201, a container group set corresponding to an application program is obtained.
In this embodiment, the execution subject (e.g., the server 105 in fig. 1) may obtain, from the electronic device that is locally stored or has a connection established in advance, an application that needs to perform container group scheduling so that container groups of the same application are located in the same machine node.
The number of the application programs may be one, or may be two or more, and this embodiment is not limited to this. In general, there are a plurality of applications that need to perform container group scheduling.
Step 202, dispatching each container group in the container group set to a machine node corresponding to the application program.
In this embodiment, the execution agent may schedule at least two container groups in the container group set to a machine node corresponding to the application. One machine node may be a physical machine or a virtual machine, and each machine node includes necessary service processes for running a container group.
Moreover, the machine node corresponding to the application program can be dynamically adjusted in the running process of the container group. For example, if there is a program crash or a machine node down during the operation of the container group, the executing entity may perform the reselection of the machine node corresponding to the application program.
Step 203, monitoring the running state of each container group in the container group set to obtain monitoring information.
In this embodiment, in the creation phase of the container group, the method may be performed in step 202. And controlling the container group set corresponding to the same application program to be dispatched to a machine node corresponding to the application program. In the operation stage of the container group, the machine node corresponding to the application program may have dynamic adjustment or an abnormal operation of a certain container group, and at this time, the operation state of the container group needs to be monitored, so that in the operation stage of the container group, the container group set corresponding to the same application program is controlled to be maintained at the same machine node.
In this regard, the execution subject may monitor the operating state of each container group in the container group set, to obtain the monitoring information. The monitoring information may include an operating state of each container group in the container group set, and the operating state may include, but is not limited to, normal operation, re-creation, and the like, which is not limited in this embodiment.
And step 204, for each container group in the container group set, in response to determining that the monitoring information indicates that the current machine node of the container group is not consistent with the machine node corresponding to the application program, scheduling the container group to the machine node corresponding to the application program.
In this embodiment, for each container group in the container group set, the operation state corresponding to the container group may be determined based on the monitoring information, and if the operation state of the container group indicates that the container group is operating normally, the machine node where the container is currently located is the machine node corresponding to the application program in step 202. If the operation state of the container group indicates that the container group is created again, the machine node where the container group is currently located may be the machine node after the container group is created again, and at this time, the machine node after the container group is created again may be the same as the machine node corresponding to the application program in step 202 or may be different from the machine node corresponding to the application program in step 202. In this regard, the executing entity may further determine whether the machine node where the container group is currently located is consistent with the machine node corresponding to the application program, and if not, schedule the container group to the machine node corresponding to the application program, so that each container group in the container group set is located in the machine node corresponding to the same application program.
Optionally, if the machine node corresponding to the application program is updated, even if the container group is in a normal operating state at this time and is not created again, the machine node where the container group is currently located may be inconsistent with the machine node corresponding to the application program, and at this time, the inconsistent container group needs to be scheduled to the machine node corresponding to the updated application program.
With continued reference to fig. 3, a schematic diagram of one application scenario of a method for scheduling a group of containers according to the present disclosure is shown. In the application scenario of fig. 3, the execution agent may obtain an application 301 that needs to schedule a container group, and for the application 301, the execution agent may obtain a container group set 302 corresponding to the application 301. Wherein, the container group set 302 includes n container groups. Then, the executing entity may schedule each container group in the container group set to the same machine node, that is, the machine node 303 corresponding to the container group 1, in the container group creation phase corresponding to the container group set 302. It is understood that the machine node 303 corresponding to the container group 1 is a machine node corresponding to the application program. Then, the execution main body may monitor the operation states of the n container groups in the container group set at the operation stage of the n container groups in the container group set, so as to obtain the monitoring information. If the monitoring information indicates that the container group 1 is created again, the machine node 304 corresponding to the container group 1 after being created again is obtained. At this time, corresponding to the above-mentioned machine node update corresponding to the application program, the execution main body may schedule the container groups 2 to n to the machine node corresponding to the updated application program, that is, schedule the container groups 2 to n to the machine node 304 corresponding to the container group 1 after being created again, which ensures that each container group is scheduled to the same machine node in the container group operation stage.
The method for scheduling container groups provided by the above embodiments of the present disclosure can control each container group corresponding to an application program to be located in the same machine node, and improve the operation effect of the multi-container application program.
With continued reference to fig. 4, a flow 400 of another embodiment of a method for scheduling a group of containers according to the present disclosure is shown. As shown in fig. 4, the method for scheduling a container group of the present embodiment may include the following steps:
step 401, a container group set corresponding to an application program is obtained.
In this embodiment, for the detailed description of step 401, please refer to the detailed description of step 201, which is not described herein again.
At step 402, a target container group in the set of container groups is determined.
In this embodiment, the execution subject may determine a target container group from among the respective container groups of the container group set as the container group on which the scheduling is based.
It should be noted that the method for scheduling a container group in this embodiment may be implemented by operating in kubernets (an open source, which is used to manage containerized applications on multiple hosts in a cloud platform, abbreviated as k8s), or may also be executed in other various types of containerized applications on multiple hosts in a management cloud platform, which is not limited in this embodiment. For k8s, the target container group may be the first container group in the set of container groups.
Step 403, determining the machine node to which the target container group is scheduled as the machine node corresponding to the application program.
In this embodiment, the execution subject may, in the creation stage of the container group, first create a target container group corresponding to the application program, determine a machine node to which the target container group is scheduled, and determine the machine node to which the target container group is scheduled as the machine node corresponding to the application program.
Step 404, determining a globally unique identifier corresponding to the application program.
In this embodiment, the execution main body may generate the globally unique identifier corresponding to the application program based on various existing identifier generation algorithms, so that identifiers corresponding to different application programs are different, the container groups corresponding to the multiple application programs are convenient to schedule, the probability that the container groups corresponding to the multiple application programs simultaneously aggregate the same machine node is reduced, and the scheduling reliability is improved.
Alternatively, the globally Unique Identifier may be a Unique Identifier (UUID).
Step 405, based on the global unique identifier and the name of the application program, generating a node identifier of the machine node corresponding to the application program.
In this embodiment, the execution main body may splice the global unique identifier and the name of the application program to generate a node identifier of a machine node corresponding to the application program, where the node identifier includes the name of the application program, so that management is facilitated. For example, if the name of the application is "appNameX", and the above-mentioned globally unique identifier is "38 b12e63-7f30-46d1-bf40-2094744842 eb", the node identifier of the machine node corresponding to the application may be "appNameX-38 b12e63-7f30-46d1-bf40-2094744842 eb".
Optionally, the execution subject may also directly use the global unique identifier as a node identifier of a machine node corresponding to the application program.
Alternatively, the executing agent may store the node identification in association with the target container group as described above.
And 406, dispatching each container group in the container group set to a machine node corresponding to the application program.
In this embodiment, the executing entity may schedule each container group in the container group set except for the target container group to the machine node corresponding to the target container group.
For the detailed description of step 406, please refer to the detailed description of step 202, which is not repeated herein.
Step 407, monitoring the running state of each container group in the container group set to obtain monitoring information.
In this embodiment, for k8s, the monitoring of the operating status of each container group in the container group set may be implemented by using a ListAndWatch (unified asynchronous message passing manner in the k8s system) mechanism.
For the detailed description of step 407, please refer to the detailed description of step 203, which is not repeated herein.
Step 408, for the target container group in the container group set, in response to determining that the monitoring information indicates that the operating state of the target container group is the re-creation state, obtaining the machine node to which the target container group is re-created.
In this embodiment, if the monitoring information indicates that the operation status of the target container group is to be recreated, the executing agent may determine a machine node to which the target container group is recreated.
Step 409, the machine node to which the target container group is recreated is updated to the machine node corresponding to the application program.
In this embodiment, in response to determining that the machine node to which the target container group is re-created is not consistent with the machine node corresponding to the application program, the machine node to which the target container group is re-created may be updated to the machine node corresponding to the application program, so as to obtain the machine node corresponding to the updated application program.
Step 410, in response to determining that the machine node corresponding to the application program is updated, updating the node identifier to an identifier corresponding to the updated machine node corresponding to the application program.
In this embodiment, after obtaining the machine node corresponding to the updated application program, the execution main body may further update the node identifier to the identifier corresponding to the machine node corresponding to the updated application program based on the correspondence between the node identifier and the target container group. That is, a correspondence between the node identifier and the machine node corresponding to the updated application program is established.
Step 411, for each container group in the container group set except the target container group, in response to determining that the monitoring information indicates that the running state of the target container group is the re-creation state and that the current machine node of the container group is not consistent with the machine node corresponding to the updated application program, scheduling the container group to the machine node corresponding to the updated application program.
In this embodiment, after obtaining the machine node corresponding to the updated application program, the execution main body may further detect, for each container group in the container group set, after the target container group is created again, whether the machine node where the other container groups are currently located is consistent with the machine node corresponding to the updated application program, and if not, schedule the inconsistent container group to the machine node corresponding to the updated application program. The machine node corresponding to the updated application program may be the machine node to which the target container group is newly created.
Alternatively, for k8s, the affinity scheduling function may be used to achieve consistency between the target container group and other container groups than the target container group. That is, when other container groups except the target container group are created again, the other container groups may be automatically created to the machine node where the target container group is located based on the affinity scheduling function, that is, the other container groups may be automatically created to the machine node corresponding to the application program based on the affinity scheduling function.
The method for scheduling a container group provided in the foregoing embodiment of the present disclosure may further utilize a machine node scheduled by a target container group in the container group set as a machine node corresponding to the application program, so that based on a consistency characteristic between other container groups in the container group set and the target container group, only when the target container group is re-created, consistency of nodes of other container groups is checked, and inconsistent container groups are optimally scheduled, thereby improving scheduling accuracy and efficiency.
With further reference to fig. 5, as an implementation of the methods shown in the above-mentioned figures, the present disclosure provides an embodiment of an apparatus for scheduling a container group, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to an electronic device such as a server.
As shown in fig. 5, the apparatus 500 for scheduling a container group of the present embodiment includes: a set acquiring unit 501, a scheduling unit 502, a monitoring unit 503 and a scheduling optimizing unit 504.
The set acquiring unit 501 is configured to acquire a set of container groups corresponding to an application.
The scheduling unit 502 is configured to schedule each container group in the container group set to a machine node corresponding to the application.
The monitoring unit 503 is configured to monitor an operation state of each container group in the container group set, so as to obtain monitoring information.
And the scheduling optimization unit 504 is configured to, for each container group in the container group set, in response to determining that the monitoring information indicates that the machine node where the container group is currently located is not consistent with the machine node corresponding to the application program, schedule the container group to the machine node corresponding to the application program.
In some optional implementations of this embodiment, the apparatus may further include: a node determination unit configured to determine a target container group in the set of container groups; and determining the machine node to which the target container group is dispatched as the machine node corresponding to the application program.
In some optional implementations of this embodiment, the apparatus may further include: the node updating unit is configured to respond to the determination that the monitoring information indicates that the running state of the target container group is a reestablishing state for the target container group in the container group set, and acquire the machine node to which the target container group is reestablished; and updating the machine node to which the target container group is recreated into the machine node corresponding to the application program.
In some optional implementations of this embodiment, the schedule optimization unit 504 is further configured to: for each container group except the target container group in the container group set, in response to determining that the monitoring information indicates that the running state of the target container group is a re-creation state and that the machine node where the container group is currently located is inconsistent with the machine node corresponding to the updated application program, scheduling the container group to the machine node corresponding to the updated application program.
In some optional implementations of this embodiment, the apparatus may further include: the identification generation unit is configured to determine a globally unique identification corresponding to the application program; and generating a node identifier of the machine node corresponding to the application program based on the global unique identifier and the name of the application program.
In some optional implementations of this embodiment, the identifier generating unit is further configured to: and in response to determining that the machine node corresponding to the application program is updated, updating the node identifier to the identifier corresponding to the machine node corresponding to the updated application program.
It should be understood that the units 501 to 504, which are recorded in the apparatus 500 for scheduling a group of containers, correspond to the respective steps in the method described with reference to fig. 2, respectively. Thus, the operations and features described above for the method for scheduling a group of containers are equally applicable to the apparatus 500 and the units included therein and will not be described again here.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 6 illustrates a schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data required for the operation of the device 600 can also be stored. The calculation unit 601, the ROM 602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, or the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 601 performs the respective methods and processes described above, such as the method for scheduling a group of containers. For example, in some embodiments, the method for scheduling a group of containers may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into the RAM603 and executed by the computing unit 601, one or more steps of the method for scheduling a group of containers described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured by any other suitable means (e.g., by means of firmware) to perform the method for scheduling a group of containers.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (15)

1. A method for scheduling a group of containers, comprising:
acquiring a container group set corresponding to an application program;
scheduling each container group in the container group set to a machine node corresponding to the application program;
monitoring the running state of each container group in the container group set to obtain monitoring information;
for each container group in the container group set, in response to determining that the monitoring information indicates that the machine node where the container group is currently located is not consistent with the machine node corresponding to the application program, scheduling the container group to the machine node corresponding to the application program.
2. The method of claim 1, further comprising:
determining a target container group in the container group set;
and determining the machine node to which the target container group is dispatched as the machine node corresponding to the application program.
3. The method of claim 2, further comprising:
for the target container group in the container group set, in response to determining that the monitoring information indicates that the running state of the target container group is a reestablishing state, obtaining a machine node to which the target container group is reestablished;
and updating the machine node to which the target container group is recreated into the machine node corresponding to the application program.
4. The method of claim 3, wherein the for each container group in the container group set, in response to determining that the monitoring information indicates that the machine node where the container group is currently located is not consistent with the machine node corresponding to the application, scheduling the container group to the machine node corresponding to the application comprises:
for each container group in the container group set except the target container group, in response to determining that the monitoring information indicates that the running state of the target container group is a re-creation state and that the current machine node of the container group is not consistent with the updated machine node corresponding to the application program, scheduling the container group to the updated machine node corresponding to the application program.
5. The method of claim 1, further comprising:
determining a global unique identifier corresponding to the application program;
and generating a node identifier of the machine node corresponding to the application program based on the global unique identifier and the name of the application program.
6. The method of claim 5, further comprising:
and in response to determining that the machine node corresponding to the application program is updated, updating the node identifier to the identifier corresponding to the updated machine node corresponding to the application program.
7. An apparatus for scheduling groups of containers, comprising:
the device comprises a set acquisition unit, a storage unit and a processing unit, wherein the set acquisition unit is configured to acquire a container group set corresponding to an application program;
a scheduling unit configured to schedule each of the set of container groups to a machine node corresponding to the application;
the monitoring unit is configured to monitor the running state of each container group in the container group set to obtain monitoring information;
and for each container group in the container group set, in response to determining that the monitoring information indicates that the current machine node of the container group is inconsistent with the machine node corresponding to the application program, the scheduling optimization unit is configured to schedule the container group to the machine node corresponding to the application program.
8. The apparatus of claim 7, further comprising:
a node determination unit configured to determine a target container group of the set of container groups; and determining the machine node to which the target container group is dispatched as the machine node corresponding to the application program.
9. The apparatus of claim 8, further comprising:
a node updating unit configured to, for the target container group in the container group set, in response to determining that the monitoring information indicates that the operating state of the target container group is a re-creation state, acquire a machine node to which the target container group is re-created; and updating the machine node to which the target container group is recreated into the machine node corresponding to the application program.
10. The apparatus of claim 9, wherein the schedule optimization unit is further configured to:
for each container group in the container group set except the target container group, in response to determining that the monitoring information indicates that the running state of the target container group is a re-creation state and that the current machine node of the container group is not consistent with the updated machine node corresponding to the application program, scheduling the container group to the updated machine node corresponding to the application program.
11. The apparatus of claim 7, further comprising:
the identification generation unit is configured to determine a globally unique identification corresponding to the application program; and generating a node identifier of the machine node corresponding to the application program based on the global unique identifier and the name of the application program.
12. The apparatus of claim 11, wherein the identification generation unit is further configured to:
and in response to determining that the machine node corresponding to the application program is updated, updating the node identifier to the identifier corresponding to the updated machine node corresponding to the application program.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-6.
15. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-6.
CN202210013277.2A 2022-01-07 2022-01-07 Method, apparatus, device, medium and product for scheduling groups of containers Pending CN114356505A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210013277.2A CN114356505A (en) 2022-01-07 2022-01-07 Method, apparatus, device, medium and product for scheduling groups of containers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210013277.2A CN114356505A (en) 2022-01-07 2022-01-07 Method, apparatus, device, medium and product for scheduling groups of containers

Publications (1)

Publication Number Publication Date
CN114356505A true CN114356505A (en) 2022-04-15

Family

ID=81107923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210013277.2A Pending CN114356505A (en) 2022-01-07 2022-01-07 Method, apparatus, device, medium and product for scheduling groups of containers

Country Status (1)

Country Link
CN (1) CN114356505A (en)

Similar Documents

Publication Publication Date Title
CN111694857B (en) Method, device, electronic equipment and computer readable medium for storing resource data
CN109245908B (en) Method and device for switching master cluster and slave cluster
CN113934464A (en) Method and device for starting android application in Linux system and electronic equipment
CN113742031A (en) Node state information acquisition method and device, electronic equipment and readable storage medium
CN112866391A (en) Message pushing method and device, electronic equipment and storage medium
CN114816393B (en) Information generation method, device, equipment and storage medium
KR20220151585A (en) Business data processing method, apparatus, electronic apparatus, storage media and computer program
CN114911598A (en) Task scheduling method, device, equipment and storage medium
CN114840323A (en) Task processing method, device, system, electronic equipment and storage medium
EP4060496A2 (en) Method, apparatus, device and storage medium for running inference service platform
CN112947965A (en) Containerized service updating method and device
CN112860343A (en) Configuration changing method, system, device, electronic equipment and storage medium
CN115658311A (en) Resource scheduling method, device, equipment and medium
CN111782147A (en) Method and apparatus for cluster scale-up
CN112817992B (en) Method, apparatus, electronic device and readable storage medium for executing change task
CN114185734A (en) Cluster monitoring method and device and electronic equipment
CN111782341B (en) Method and device for managing clusters
CN113032093A (en) Distributed computing method, device and platform
CN114327819B (en) Task management method, device, equipment and storage medium
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN113419921B (en) Task monitoring method, device, equipment and storage medium
CN115658248A (en) Task scheduling method and device, electronic equipment and storage medium
CN114356505A (en) Method, apparatus, device, medium and product for scheduling groups of containers
CN113656239A (en) Monitoring method and device for middleware and computer program product
US12034820B2 (en) Fusing and degradation method and apparatus for micro-service, device, and medium

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