CN112631680B - Micro-service container scheduling system, method, device and computer equipment - Google Patents

Micro-service container scheduling system, method, device and computer equipment Download PDF

Info

Publication number
CN112631680B
CN112631680B CN202011583130.4A CN202011583130A CN112631680B CN 112631680 B CN112631680 B CN 112631680B CN 202011583130 A CN202011583130 A CN 202011583130A CN 112631680 B CN112631680 B CN 112631680B
Authority
CN
China
Prior art keywords
node
container
micro
service
service container
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.)
Active
Application number
CN202011583130.4A
Other languages
Chinese (zh)
Other versions
CN112631680A (en
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.)
China Southern Power Grid Digital Platform Technology Guangdong Co ltd
Original Assignee
China Southern Power Grid Digital Platform Technology Guangdong 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 China Southern Power Grid Digital Platform Technology Guangdong Co ltd filed Critical China Southern Power Grid Digital Platform Technology Guangdong Co ltd
Priority to CN202011583130.4A priority Critical patent/CN112631680B/en
Publication of CN112631680A publication Critical patent/CN112631680A/en
Application granted granted Critical
Publication of CN112631680B publication Critical patent/CN112631680B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a micro-service container scheduling system, a method, a device, a computer device and a storage medium, comprising: responding to a node transfer request sent by a temporary node, and acquiring node operation demand parameters corresponding to a micro-service container to be transferred from the node transfer request; acquiring node operation information of a plurality of target nodes, and acquiring node operation parameters corresponding to each target node from the node operation information; matching the node operation demand parameters with a plurality of node operation parameters to obtain a matching result; and transferring the micro service container to be transferred from the temporary node to the matched target node according to the matching result. According to the method and the system, the requirement information of the micro service container to be transferred on the node operation parameters is acquired from the temporary nodes respectively, the requirement information is matched with the actual operation conditions of the target nodes, complicated operation is not needed manually, the system can automatically transfer the micro service container dynamically according to the request, and the dispatching efficiency of the micro service container is improved.

Description

Micro-service container scheduling system, method, device and computer equipment
Technical Field
The application relates to the technical field of cloud primary container scheduling, in particular to a micro-service container scheduling system, a micro-service container scheduling method, a micro-service container scheduling device, computer equipment and a storage medium.
Background
With the development of cloud technology, microservices and kubernetes-based container orchestration technologies are widely used.
However, when kubernetes is used to manage containers, there are several disadvantages: 1. the configuration is complex: the relevant command provided by kubernetes is needed to be used for manually configuring proper label for all nodes in the cluster, and a great deal of complicated manual operation is needed; 2. the dynamic adjustment according to the service is not possible: the adjustment mode of the Kubernetes is irrelevant to the service and cannot be dynamically changed in the running process; 3. configuration is single: matching can only be done through label on the node.
Therefore, as the cluster size increases, the method of manually configuring the nodes of the container operation using kubernetes becomes more difficult, and the default scheduling algorithm cannot provide strong support for the service, so a micro-service container scheduling manner that can be updated more flexibly and dynamically is needed.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a micro-service container scheduling system, method, apparatus, computer device, and storage medium.
A micro-service container scheduling system, the system comprising: a service registry, a container dispatch center; the service registration center is in communication connection with the container dispatching center;
The service registration center is used for receiving a node transfer request sent by a micro service container in the temporary node; acquiring node operation demand parameters corresponding to the micro-service container from the node transfer request; transmitting the node operation demand parameters to the container dispatching center;
The container scheduling center is used for acquiring node operation information of a plurality of target nodes; acquiring node operation parameters corresponding to each target node from the node operation information; and matching the node operation requirement parameters with the node operation parameters, and transferring the micro-service container from the temporary node to a matched target node according to a matching result.
In one embodiment, the system further comprises: a plurality of monitoring agent units; the monitoring agent unit corresponds to the target node; the monitoring agent unit is in communication connection with the container dispatching center and the target node;
the monitoring agent unit is used for collecting the operation parameters of the target node; generating node operation information corresponding to the target node according to the operation parameters of the target node; and sending the node operation information to the container dispatching center.
In one embodiment, the monitoring agent unit is further configured to obtain a preset node operation information reporting policy file; determining parameter items to be acquired and a reporting period according to the node operation information reporting policy file; collecting operation parameters corresponding to the parameter items from the target nodes and generating node operation information; and sending the node operation information to the container dispatching center according to the reporting period.
In one embodiment, the parameter entry includes: CPU usage, memory usage, disk usage, node hostname, node environment variable.
In one embodiment, the service registry sends the node operational requirement parameters to the container dispatch center via a message queue.
A method of micro-service container scheduling, the method comprising:
Responding to a node transfer request sent by a temporary node, and acquiring node operation demand parameters corresponding to a micro-service container to be transferred from the node transfer request;
Acquiring node operation information of a plurality of target nodes, and acquiring node operation parameters corresponding to each target node from the node operation information;
Matching the node operation demand parameters with a plurality of node operation parameters to obtain a matching result; and transferring the micro service container to be transferred from the temporary node to a matched target node according to the matching result.
In one embodiment, the matching the node operation requirement parameter with the plurality of node operation parameters to obtain a matching result includes:
Calculating matching coefficients between the node operation demand parameters and a plurality of node operation parameters according to a preset weight mapping table;
And taking the target node corresponding to the node operation parameter with the highest matching coefficient as a matching result.
A micro-service container scheduling apparatus, the apparatus comprising:
The request response module is used for responding to a node transfer request sent by the temporary node and acquiring node operation demand parameters corresponding to the micro-service container to be transferred from the node transfer request;
The parameter acquisition module is used for acquiring node operation information of a plurality of target nodes and acquiring node operation parameters corresponding to each target node from the node operation information;
The parameter matching module is used for matching the node operation requirement parameters with a plurality of node operation parameters to obtain a matching result; and transferring the micro service container to be transferred from the temporary node to a matched target node according to the matching result.
A computer device comprising a memory storing a computer program and a processor which when executing the computer program performs the steps of:
Responding to a node transfer request sent by a temporary node, and acquiring node operation demand parameters corresponding to a micro-service container to be transferred from the node transfer request;
Acquiring node operation information of a plurality of target nodes, and acquiring node operation parameters corresponding to each target node from the node operation information;
Matching the node operation demand parameters with a plurality of node operation parameters to obtain a matching result; and transferring the micro service container to be transferred from the temporary node to a matched target node according to the matching result.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
Responding to a node transfer request sent by a temporary node, and acquiring node operation demand parameters corresponding to a micro-service container to be transferred from the node transfer request;
Acquiring node operation information of a plurality of target nodes, and acquiring node operation parameters corresponding to each target node from the node operation information;
Matching the node operation demand parameters with a plurality of node operation parameters to obtain a matching result; and transferring the micro service container to be transferred from the temporary node to a matched target node according to the matching result.
The micro-service container dispatching system, the method, the device, the computer equipment and the storage medium, wherein the system comprises: responding to a node transfer request sent by a temporary node, and acquiring node operation demand parameters corresponding to a micro-service container to be transferred from the node transfer request; acquiring node operation information of a plurality of target nodes, and acquiring node operation parameters corresponding to each target node from the node operation information; matching the node operation demand parameters with a plurality of node operation parameters to obtain a matching result; and transferring the micro service container to be transferred from the temporary node to the matched target node according to the matching result. According to the method, the requirement information of the micro service container to be transferred on the node operation parameters is obtained from the temporary nodes respectively, the requirement information is matched with the actual operation conditions of the target nodes, the micro service container is transferred to the proper target nodes, complicated operation is not needed manually, the system can automatically transfer the micro service container dynamically according to the request, and the dispatching efficiency of the micro service container is improved.
Drawings
FIG. 1 is a diagram of an application environment for a micro-service container dispatch system in one embodiment;
FIG. 2 is a flow diagram of a micro-server container scheduling method in one embodiment;
FIG. 3 is a flow chart of a step of matching node operation requirement parameters with a plurality of node operation parameters in one embodiment;
FIG. 4 is a block diagram of the architecture of a micro-service container scheduler in one embodiment;
fig. 5 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The micro-service container scheduling system provided by the application can be applied to an application environment shown in figure 1. Wherein the service registry 11 communicates with the container dispatch center 12 via a network. A service registry 11 for receiving a node transfer request sent by the micro service container 131 in the temporary node 13; the service registration center 11 obtains node operation demand parameters corresponding to the micro service container from the node transfer request; the service registration center 11 sends the node operation demand parameters to the container dispatch center 12; a container dispatch center 12 for acquiring node operation information of a plurality of target nodes 14; the container dispatching center 12 obtains node operation parameters corresponding to each target node 14 from the node operation information; the container dispatch center 12 matches the node operation requirement parameters with the node operation parameters, and transfers the micro service container 131 from the temporary node 13 to the matched target node 14 according to the matching result.
The service registry 11 and the container dispatch center 12 may be implemented by a server or a server cluster formed by a plurality of servers.
In one embodiment, the service registry is configured to receive a node transfer request sent by a micro service container in a temporary node; acquiring node operation demand parameters corresponding to the micro-service container from the node transfer request; and sending the node operation demand parameters to a container dispatching center.
The temporary node is a node for temporarily storing and operating the micro-service container in the system; corresponding to the temporary nodes are target nodes, which are nodes capable of operating the micro service container normally, the number of temporary nodes is generally smaller than the target nodes. Temporary nodes may be time-efficient, i.e., lose effectiveness after temporary operation for a period of time, disconnecting from the service registry.
The service registry is responsible for information maintenance of the micro-service container, such as micro-service name, micro-service status, etc. The service registry is a key component when the micro service architecture is applied to conduct micro service management, and the functions generally owned include: service registration and discovery, distributed configuration, etc. Service registries typically employ highly available cluster deployments. The invention relates to a micro-service container dispatching method and a dispatching system multiplexing service registry capability, which utilize the distributed configuration function in the service registry, store the requirement of the service on node operation parameters, namely node operation requirement parameters, in the distributed configuration of the service registry in the form of Key-Value (Key Value) while registering the service in the registry, and dynamically modify the operation parameters by calling the REST API (representational layer state transfer-application program interface) of the service registry.
Specifically, the node transfer request carries identification information of the micro service container to be transferred, and the service registry can determine the micro service container object to be transferred, the temporary node where the micro service container is located, the operation parameter requirement on the target node and the like according to the identification information.
The node operation requirement parameters, for example, require that the CPU utilization rate of the target node should be lower than 20%, the memory utilization rate should be lower than 50%, and the like, and also include the logic relationship and the priority among rule items; if the node transfer request does not include the node operation requirement parameter, the container scheduling center uses a default scheduling algorithm to select the target node.
In addition, after the micro service container of the temporary node is registered, its state is "pre-started" and cannot be found by other services at this time. Since these services were first deployed in the system, there is no information for the services in the container dispatch center. And storing the node operation parameter requirement information of the service configuration into a service and node parameter requirement mapping table in a lasting mode.
In one embodiment, the container scheduling center is configured to obtain node operation information of a plurality of target nodes; acquiring node operation parameters corresponding to each target node from node operation information; and matching the node operation demand parameters with the node operation parameters, and transferring the micro-service container from the temporary node to the matched target node according to the matching result.
The container dispatching center is used for acquiring node operation demand parameters of each micro-service container from the service registration center through the REST API in real time; specifically, a message can be sent to a message queue each time the node operation parameters are added or modified by a polling-driven manner or by expanding the capability of a service registry, and the container scheduling center is used as a message consumer to asynchronously acquire the message. The container dispatching center needs to persist the information acquired from the registration center, and mainly maintains a mapping table serving the corresponding node operation parameters and a specific node operation parameter requirement of each service with version information. To improve access efficiency, the container dispatch center may cache this persistent information. If the discovery service does not set the corresponding node operating parameter requirements, the container dispatch center uses kubernetes (managing the containerized applications on multiple hosts in the cloud platform) default dispatch algorithms to complete node selection. On the other hand, the container dispatching center receives the current operation parameters of the node reported by the monitoring agent on the target node. The container dispatch center may issue configurations to the monitoring agent, such as parameters that need to be collected, collection periods, and the like. These operational parameters reported by the monitoring agent may not be persisted by the container dispatch center.
The step of transferring the micro-service container from the temporary node to the matching target node may be to move the micro-service container from the original temporary node to the selected target node after determining the matching target node. The container dispatch center may configure migration policies, which may be divided into global and multi-level policies for a single service, with priority for selection of the final policies. Migration strategies include, but are not limited to: the new container stops old container, rolling container migration, etc. after being started, so as to ensure continuity of service and availability of service. After deployment is completed, the state of the service in the service registration center is updated to be "started", and the service can be found by other services.
The micro service container scheduling system includes: responding to a node transfer request sent by a temporary node, and acquiring node operation demand parameters corresponding to a micro-service container to be transferred from the node transfer request; acquiring node operation information of a plurality of target nodes, and acquiring node operation parameters corresponding to each target node from the node operation information; matching the node operation demand parameters with a plurality of node operation parameters to obtain a matching result; and transferring the micro service container to be transferred from the temporary node to the matched target node according to the matching result. According to the method, the requirement information of the micro service container to be transferred on the node operation parameters is obtained from the temporary nodes respectively, the requirement information is matched with the actual operation conditions of the target nodes, the micro service container is transferred to the proper target nodes, complicated operation is not needed manually, the system can automatically transfer the micro service container dynamically according to the request, and the dispatching efficiency of the micro service container is improved.
In one embodiment, the system further comprises: a plurality of monitoring agent units; the monitoring agent unit corresponds to the target node; the monitoring agent unit is in communication connection with the container dispatching center and the target node; the monitoring agent unit is used for collecting the operation parameters of the target node; generating node operation information corresponding to the target node according to the operation parameters of the target node; and sending the node operation information to a container dispatching center.
Specifically, the monitoring agent unit may be a client program installed on all the target nodes, and is responsible for acquiring and collecting relevant configuration information from the container dispatching center, performing parameter collection according to the configuration information, and reporting relevant parameter information of the target nodes in one period to the container dispatching center according to a collection period.
In one embodiment, the monitoring agent unit is further configured to obtain a preset node operation information reporting policy file; determining parameter items to be acquired and a reporting period according to the node operation information reporting policy file; collecting operation parameters corresponding to the parameter items from the target nodes and generating node operation information; and sending the node operation information to a container dispatching center according to the reporting period.
In one embodiment, the parameter entries include: CPU usage, memory usage, disk usage, node hostname, node environment variable.
CPU utilization rate refers to CPU resources occupied by running service on a target node, and the higher the utilization rate is, the more busy the target node is; the memory utilization rate refers to the memory spent by the running service on the target node; the disk utilization rate refers to the storage space occupied by the running service on the target node; the node hostname, node environment variables and the target node's own attributes are related.
It should be noted that, the CPU usage, the memory usage, the disk usage, the node hostname, and the node environment variable are only some of the parameter entries, and do not represent all of the parameter entries. In addition to the above parameter entries, there may be node run time, node start time, node anomaly information, and the like.
In one embodiment, the service registry sends node operational requirement parameters to the container dispatch center via a message queue.
Specifically, the node operation information reporting policy file is a specific rule for reporting node operation information by the monitoring unit, and includes a reporting parameter type, a reporting frequency, a reporting mode, a data format of the reporting information, and the like.
In one embodiment, the container dispatch center obtains all service-to-node parameter requirements from the service registry. If a polling acquisition method is used, information of all services needs to be acquired. If a message center based change event acquisition mode is used, only configuration information that changes needs to be pushed from the registry.
In one embodiment, as shown in fig. 2, there is provided a micro service container scheduling method applied to a micro service container scheduling system, including:
Step 21, responding to a node transfer request sent by a temporary node, and acquiring node operation demand parameters corresponding to a micro-service container to be transferred from the node transfer request;
Step 22, acquiring node operation information of a plurality of target nodes, and acquiring node operation parameters corresponding to each target node from the node operation information;
step 23, matching the node operation requirement parameters with a plurality of node operation parameters to obtain a matching result; and transferring the micro service container to be transferred from the temporary node to the matched target node according to the matching result.
Specifically, the requirement information of the micro service container to be transferred on the node operation parameters is obtained from the temporary nodes, the requirement information is matched with the actual operation conditions of the target nodes, the micro service container is transferred to the proper target nodes, complicated operation is not needed manually, the system can automatically transfer the micro service container dynamically according to the request, and the dispatching efficiency of the micro service container is improved.
In one embodiment, as shown in fig. 3, matching the node operation requirement parameter with a plurality of node operation parameters to obtain a matching result includes:
step 31, calculating matching coefficients between the node operation demand parameters and a plurality of node operation parameters according to a preset weight mapping table;
And step 32, taking the target node corresponding to the node operation parameter with the highest matching coefficient as a matching result.
The preset weight mapping table records the node operation requirement parameters and weight calculation values of all parameter entries in the node operation parameters. For example, the weight calculation value of the A operation parameter is 5, the weight calculation value of the B operation parameter is 3, etc.; the weight calculation score of each parameter item can be calculated through a preset weight mapping table, the weight calculation scores are added, and the ratio of the score sum or the weight sum is used as a matching coefficient to be matched with a target node.
Compared with the most widely used kubernetes scheduling method at present, the application provides a micro-service container scheduling method, which can parameterize the requirements of micro-service on nodes and then add the parameterized requirements to a service registry in a micro-service management technology. While dividing the nodes in the cluster into a small number of temporary nodes and other target nodes. The container dispatching center compares the operation parameters reported by each target node with the requirements of each service in the service registration center on the node parameters, and then moves the container from one node to the target node meeting the requirements. The method has simple configuration, can be dynamically adjusted and has a certain management function, and provides powerful support for the micro-service architecture deployed by using the container.
It should be understood that, although the steps in the flowcharts of fig. 2-3 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 2-3 may include multiple steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of the steps or stages in other steps or other steps.
In one embodiment, as shown in fig. 4, there is provided a micro service container scheduling apparatus, comprising: a request response module 41, a parameter acquisition module 42 and a parameter matching module 43, wherein:
a request response module 41, configured to obtain, from a node transfer request, a node operation requirement parameter corresponding to a micro service container to be transferred, in response to the node transfer request sent by the temporary node;
a parameter obtaining module 42, configured to obtain node operation information of a plurality of target nodes, and obtain node operation parameters corresponding to each target node from the node operation information;
The parameter matching module 43 is configured to match the node operation requirement parameter with a plurality of node operation parameters to obtain a matching result; and transferring the micro service container to be transferred from the temporary node to the matched target node according to the matching result.
The specific limitation of the micro service container scheduling device can be referred to as limitation of the micro service container scheduling method, and is not repeated herein. The various modules in the micro-service container scheduler described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing micro-service container dispatch data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by a processor implements a micro-service container scheduling method.
It will be appreciated by those skilled in the art that the structure shown in FIG. 5 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
Responding to a node transfer request sent by a temporary node, and acquiring node operation demand parameters corresponding to a micro-service container to be transferred from the node transfer request;
acquiring node operation information of a plurality of target nodes, and acquiring node operation parameters corresponding to each target node from the node operation information;
matching the node operation demand parameters with a plurality of node operation parameters to obtain a matching result; and transferring the micro service container to be transferred from the temporary node to the matched target node according to the matching result.
In one embodiment, the processor when executing the computer program further performs the steps of: calculating a matching coefficient between the node operation demand parameter and a plurality of node operation parameters according to a preset weight mapping table; and taking the target node corresponding to the node operation parameter with the highest matching coefficient as a matching result.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
Responding to a node transfer request sent by a temporary node, and acquiring node operation demand parameters corresponding to a micro-service container to be transferred from the node transfer request;
acquiring node operation information of a plurality of target nodes, and acquiring node operation parameters corresponding to each target node from the node operation information;
matching the node operation demand parameters with a plurality of node operation parameters to obtain a matching result; and transferring the micro service container to be transferred from the temporary node to the matched target node according to the matching result.
In one embodiment, the computer program when executed by the processor further performs the steps of: calculating a matching coefficient between the node operation demand parameter and a plurality of node operation parameters according to a preset weight mapping table; and taking the target node corresponding to the node operation parameter with the highest matching coefficient as a matching result.
Those skilled in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (10)

1. A micro service container scheduling system, the system comprising: a service registry, a container dispatch center; the service registration center is in communication connection with the container dispatching center;
The service registration center is used for receiving a node transfer request sent by a micro service container in the temporary node; acquiring node operation demand parameters corresponding to the micro-service container from the node transfer request; transmitting the node operation demand parameters to the container dispatching center; the node transfer request carries identification information of a micro service container to be transferred, and the service registration center can determine a micro service container object to be transferred, a temporary node where the micro service container is located and an operation parameter requirement for a target node according to the identification information; wherein after the micro service container of the temporary node is registered, the state is "pre-started", at this time, the micro service container cannot be found by other services, and because the services are deployed in the system for the first time, the container scheduling center does not have any information of the services, and node operation parameter requirement information of the service configuration is stored in a service and node parameter requirement mapping table in a persistent manner;
The container scheduling center is used for acquiring node operation information of a plurality of target nodes; acquiring node operation parameters corresponding to each target node from the node operation information; matching the node operation demand parameters with the node operation parameters, and transferring the micro-service container from the temporary node to a matched target node according to a matching result; the method is also used for moving the micro-service container from the original temporary node to the selected target node after the matched target node is determined, configuring the migration strategy and selecting the final strategy based on the strategy priority; wherein policies can be divided into global and multi-level policies for a single service; the system is also used for sending a message to a message queue when the node operation parameters are added or modified each time, and the container dispatching center is used for asynchronously acquiring the message as a message consumer; if the service is found to not set the corresponding node operation parameter requirement, the container dispatching center uses kubernetes default dispatching algorithm to complete node selection.
2. The micro service container scheduling system of claim 1, wherein the system further comprises: a plurality of monitoring agent units; the monitoring agent unit corresponds to the target node; the monitoring agent unit is in communication connection with the container dispatching center and the target node;
the monitoring agent unit is used for collecting the operation parameters of the target node; generating node operation information corresponding to the target node according to the operation parameters of the target node; and sending the node operation information to the container dispatching center.
3. The micro service container scheduling system according to claim 2, wherein the monitoring agent unit is further configured to obtain a preset node operation information reporting policy file; determining parameter items to be acquired and a reporting period according to the node operation information reporting policy file; collecting operation parameters corresponding to the parameter items from the target nodes and generating node operation information; and sending the node operation information to the container dispatching center according to the reporting period.
4. The micro service container scheduling system of claim 3, wherein the parameter entry comprises: CPU usage, memory usage, disk usage, node hostname, node environment variable.
5. The micro-service container dispatch system of claim 1, wherein the service registry sends the node operational requirement parameters to the container dispatch center via a message queue.
6. A method of micro-service container scheduling, the method comprising:
Responding to a node transfer request sent by a temporary node, and acquiring node operation demand parameters corresponding to a micro-service container to be transferred from the node transfer request; the node transfer request carries identification information of a micro service container to be transferred, and the service registration center can determine a micro service container object to be transferred, a temporary node where the micro service container is located and an operation parameter requirement for a target node according to the identification information; wherein after the micro service container of the temporary node is registered, the state is "pre-started", at this time, the micro service container cannot be found by other services, and because the services are deployed in the system for the first time, the container scheduling center does not have any information of the services, and node operation parameter requirement information of the service configuration is stored in a service and node parameter requirement mapping table in a persistent manner;
Acquiring node operation information of a plurality of target nodes, and acquiring node operation parameters corresponding to each target node from the node operation information;
Matching the node operation demand parameters with a plurality of node operation parameters to obtain a matching result; transferring the micro service container to be transferred from the temporary node to a matched target node according to the matching result; after the matched target nodes are determined, moving the micro service container from the original temporary node to the selected target nodes, configuring a migration strategy and selecting a final strategy based on the strategy priority; if the service is found to not set the corresponding node operation parameter requirement, the container dispatching center uses kubernetes default dispatching algorithm to complete node selection.
7. The method of claim 6, wherein said matching the node operation requirement parameter with a plurality of the node operation parameters to obtain a matching result comprises:
Calculating matching coefficients between the node operation demand parameters and a plurality of node operation parameters according to a preset weight mapping table;
And taking the target node corresponding to the node operation parameter with the highest matching coefficient as a matching result.
8. A micro service container scheduling apparatus, the apparatus comprising:
The request response module is used for responding to a node transfer request sent by the temporary node and acquiring node operation demand parameters corresponding to the micro-service container to be transferred from the node transfer request; the node transfer request carries identification information of a micro service container to be transferred, and the service registration center can determine a micro service container object to be transferred, a temporary node where the micro service container is located and an operation parameter requirement for a target node according to the identification information; wherein after the micro service container of the temporary node is registered, the state is "pre-started", at this time, the micro service container cannot be found by other services, and because the services are deployed in the system for the first time, the container scheduling center does not have any information of the services, and node operation parameter requirement information of the service configuration is stored in a service and node parameter requirement mapping table in a persistent manner;
The parameter acquisition module is used for acquiring node operation information of a plurality of target nodes and acquiring node operation parameters corresponding to each target node from the node operation information;
The parameter matching module is used for matching the node operation requirement parameters with a plurality of node operation parameters to obtain a matching result; the micro service container to be transferred is transferred from the temporary node to a matched target node according to the matching result, and is further used for moving the micro service container from the original temporary node to the selected target node after the matched target node is determined, configuring a migration strategy and selecting a final strategy based on the strategy priority; wherein policies can be divided into global and multi-level policies for a single service; the system is also used for sending a message to a message queue when the node operation parameters are added or modified each time, and the container dispatching center is used for asynchronously acquiring the message as a message consumer; if the service is found to not set the corresponding node operation parameter requirement, the container dispatching center uses kubernetes default dispatching algorithm to complete node selection.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 6 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 6 to 7.
CN202011583130.4A 2020-12-28 2020-12-28 Micro-service container scheduling system, method, device and computer equipment Active CN112631680B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011583130.4A CN112631680B (en) 2020-12-28 2020-12-28 Micro-service container scheduling system, method, device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011583130.4A CN112631680B (en) 2020-12-28 2020-12-28 Micro-service container scheduling system, method, device and computer equipment

Publications (2)

Publication Number Publication Date
CN112631680A CN112631680A (en) 2021-04-09
CN112631680B true CN112631680B (en) 2024-07-23

Family

ID=75325966

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011583130.4A Active CN112631680B (en) 2020-12-28 2020-12-28 Micro-service container scheduling system, method, device and computer equipment

Country Status (1)

Country Link
CN (1) CN112631680B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783570B (en) * 2021-01-19 2022-12-06 中原银行股份有限公司 Application migration method, system and medium based on service grid
CN113382077B (en) * 2021-06-18 2023-05-23 广西电网有限责任公司 Micro-service scheduling method, micro-service scheduling device, computer equipment and storage medium
CN113885972A (en) * 2021-09-29 2022-01-04 平安普惠企业管理有限公司 Application request processing method, device, equipment and storage medium based on microservice

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677983A (en) * 2012-09-20 2014-03-26 三亚中兴软件有限责任公司 Scheduling method and device of application

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105959138B (en) * 2016-04-29 2019-05-17 深圳大数点科技有限公司 The system and method for micro services Dynamical Deployment based on cloud computing
CN106484533B (en) * 2016-09-21 2019-11-12 南方电网科学研究院有限责任公司 Service modeling system and method based on electric power PaaS cloud platform
CN109144485B (en) * 2018-09-10 2022-02-15 南方电网科学研究院有限责任公司 Micro-service deployment method, device, equipment and readable storage medium
CN109656723A (en) * 2019-03-13 2019-04-19 联想(北京)有限公司 Container resource regulating method and device
CN111309447B (en) * 2020-03-16 2023-08-25 优刻得科技股份有限公司 Container dispatching method and device
CN111694888A (en) * 2020-06-12 2020-09-22 谷云科技(广州)有限责任公司 Distributed ETL data exchange system and method based on micro-service architecture

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677983A (en) * 2012-09-20 2014-03-26 三亚中兴软件有限责任公司 Scheduling method and device of application

Also Published As

Publication number Publication date
CN112631680A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
CN112631680B (en) Micro-service container scheduling system, method, device and computer equipment
US20200364608A1 (en) Communicating in a federated learning environment
CN115328663B (en) Method, device, equipment and storage medium for scheduling resources based on PaaS platform
CN111880936B (en) Resource scheduling method, device, container cluster, computer equipment and storage medium
CN109150987B (en) Two-layer container cluster elastic expansion method based on host layer and container layer
CN112506659A (en) Management method of edge device and related device
CN112463290A (en) Method, system, apparatus and storage medium for dynamically adjusting the number of computing containers
CN113382077B (en) Micro-service scheduling method, micro-service scheduling device, computer equipment and storage medium
CN113645262A (en) Cloud computing service system and method
US20220318071A1 (en) Load balancing method and related device
CN112910723B (en) Edge terminal management method, device, equipment and storage medium
CN112698952A (en) Unified management method and device for computing resources, computer equipment and storage medium
CN113297031A (en) Container group protection method and device in container cluster
CN111177160B (en) Service updating method, device, server and medium
CN114979286A (en) Access control method, device and equipment for container service and computer storage medium
CN117076133B (en) Cloud game platform heterogeneous resource allocation method, computer device and storage medium
CN112953770B (en) Method, system, medium and cloud management system for edge cloud gateway configuration-free access
CN114168297A (en) Method, device, equipment and medium for scheduling collection tasks
US9323509B2 (en) Method and system for automated process distribution
CN114924888A (en) Resource allocation method, data processing method, device, equipment and storage medium
CN116069481B (en) Container scheduling system and scheduling method for sharing GPU resources
CN111338752B (en) Container adjusting method and device
CN113873052B (en) Domain name resolution method, device and equipment of Kubernetes cluster
CN113806056B (en) Timed task processing method, device, computer equipment and storage medium
CN117114091B (en) Calculation graph processing method based on federal learning, computer equipment and storage 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
TA01 Transfer of patent application right

Effective date of registration: 20230817

Address after: 518000 building 501, 502, 601, 602, building D, wisdom Plaza, Qiaoxiang Road, Gaofa community, Shahe street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: China Southern Power Grid Digital Platform Technology (Guangdong) Co.,Ltd.

Address before: Room 86, room 406, No.1, Yichuang street, Zhongxin Guangzhou Knowledge City, Huangpu District, Guangzhou City, Guangdong Province

Applicant before: Southern Power Grid Digital Grid Research Institute Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant