Scheduling method and device of application node, storage medium and electronic equipment
By parsing and configuring application node information, scheduling the number of containers according to application type, and deploying them in the target cluster, the problem of low scheduling efficiency for complex application nodes is solved, achieving efficient operation and maintenance management and application deployment.
Patent Information
- Application Number
- CN202211395229.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-08
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2042-11-08
AI Technical Summary
Existing technologies have low node scheduling efficiency for complex applications, resulting in high operational and maintenance pressure, especially when nodes are unavailable and services cannot be provided, affecting the overall security and reliability of the application.
By receiving application scheduling requests from service callers, parsing application information, configuring the number of available containers in node information according to application type, generating configured node information, and sending it to the target cluster for deployment, including deleting unavailable containers, to ensure compliance with preset security protection policies.
It improves the scheduling efficiency of application nodes, reduces the pressure of operation and maintenance, simplifies operation and maintenance work, and enhances the simplicity and reliability of application deployment.
Smart Images

Figure CN116088872B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing technology, and more specifically, to a method, apparatus, storage medium, and electronic device for scheduling application nodes. Background Technology
[0002] With the advent of the cloud-native era, application containerization has become an irreversible trend. Complex applications typically consist of the following components: front-end nodes, back-end nodes, relational database nodes, and caching database nodes. Front-end nodes provide visual interfaces and simplified operations, back-end nodes receive front-end requests and retrieve parameter data from the relational database, and the caching database stores application session information and real-time data. These nodes complement each other, collectively forming the application. Only when all nodes of an existing application are deployed to the cloud and function correctly can the complex application provide services normally.
[0003] Generally, complex application deployments involve multiple types of nodes: for example, front-end nodes, back-end nodes, relational database nodes, and cache database nodes. Only when all containers on each node are running normally can the complex application provide services normally. If one node becomes unavailable due to version upgrades, eviction, or other reasons, although the other three types of nodes can run normally, the overall security of the application cannot be guaranteed, and services cannot be provided. In this case, these four types of nodes constitute the "weakest link" effect, thus reducing the scheduling efficiency of application nodes, causing service interruptions, and requiring separate maintenance, which consumes manpower and resources and creates significant operational pressure.
[0004] There is currently no effective solution to the aforementioned problems in the relevant technologies. Summary of the Invention
[0005] The main objective of this application is to provide a scheduling method, apparatus, storage medium, and electronic device for application nodes, in order to solve the problem of low scheduling efficiency of application nodes in related technologies, which leads to high operation and maintenance pressure.
[0006] To achieve the above objectives, according to one aspect of this application, a method for scheduling application nodes is provided. The method includes: receiving an application scheduling request initiated by a service caller, wherein the application scheduling request includes at least: application information; parsing the application information to obtain application node information, wherein the node information includes at least: front-end container nodes, back-end container nodes, relational database nodes, and cache database nodes; configuring the number of available containers in each node in the node information according to the application type in the application information, to obtain configured node information, wherein each node includes at least one application container, and the application type is at least one of the following: interface application, web application, and proxy application; and distributing the configured node information to the worker nodes of the target cluster for application deployment.
[0007] Furthermore, the application information is parsed to obtain the application's node information, including: obtaining the node name identifier of each node in the application information; and determining each node in the node information based on the node name identifier.
[0008] Furthermore, when the application type is an interface-type application, the number of available containers in each node in the node information is configured according to the application type in the application information. The configured node information includes: configuring the number of available backend containers in the backend container node to obtain the configured backend container node, wherein the number of available backend containers in the configured backend container node is not less than the preset number of available backend containers; configuring the number of available containers in each node other than the backend container node in the node information to obtain the configured other nodes, wherein the number of available containers in each of the configured other nodes is at least one; and determining the configured node information based on the configured backend container node and the configured other nodes.
[0009] Furthermore, when the application type is a web application, the number of available containers in each node in the node information is configured according to the application type in the application information. The configured node information includes: configuring the number of available front-end containers in the front-end container node to obtain the configured front-end container node, wherein the number of available front-end containers in the configured front-end container node is not less than the preset number of available front-end containers; configuring the number of available containers in each node other than the front-end container node in the node information to obtain the configured other nodes, wherein the number of available containers in each of the configured other nodes is at least one; and determining the configured node information based on the configured front-end container node and the configured other nodes.
[0010] Furthermore, when the application type is a proxy application, the number of available containers in each node in the node information is configured according to the application type in the application information. The configured node information includes: configuring the number of available front-end containers in the front-end container node to obtain the configured front-end container node, wherein the number of available front-end containers in the configured front-end container node is not less than the preset number of available front-end containers; configuring the number of available back-end containers in the back-end container node to obtain the configured back-end container node, wherein the number of available back-end containers in the configured back-end container node is not less than the preset number of available back-end containers; configuring the number of available containers in each node other than the front-end container node and the back-end container node in the node information to obtain the configured other nodes, wherein the number of available containers in each of the configured other nodes is at least one; and determining the configured node information based on the configured front-end container node, the configured back-end container node, and the configured other nodes.
[0011] Furthermore, the configured node information includes information on available containers and unavailable containers. Before the configured node information is sent to the worker nodes of the target cluster for application deployment, the method also includes: triggering a deletion command to delete the target container corresponding to the information of the unavailable container; and deleting the target container if the deletion command meets the preset requirements.
[0012] Furthermore, after triggering a deletion command to delete unusable containers in the configured node information, the method also includes: determining whether the deletion command complies with preset regulations based on the security protection policy of the configured node information; and suspending the deletion command if the deletion command does not comply with the preset regulations.
[0013] To achieve the above objectives, according to another aspect of this application, an application node scheduling apparatus is provided. The apparatus includes: a receiving unit for receiving an application scheduling request initiated by a service caller, wherein the application scheduling request includes at least: application information; a parsing unit for parsing the application information to obtain application node information, wherein the node information includes at least: front-end container nodes, back-end container nodes, relational database nodes, and cache database nodes; a configuration unit for configuring the number of available containers in each node in the node information according to the application type in the application information, to obtain configured node information, wherein each node includes at least one application container, and the application type is at least one of the following: interface application, web application, and proxy application; and a deployment unit for distributing the configured node information to the worker nodes of the target cluster for application deployment.
[0014] This application employs the following steps: receiving an application scheduling request initiated by a service caller, wherein the application scheduling request includes at least: application information; parsing the application information to obtain the application's node information; configuring the number of available containers in each node in the node information according to the application type in the application information, thereby obtaining configured node information, wherein each node includes at least one application container, and the application type is at least one of the following: interface application, web application, or proxy application; and distributing the configured node information to the worker nodes of the target cluster for application deployment. This application solves the problem of low application node scheduling efficiency in related technologies, leading to high operational pressure. By distributing the configured node information to the worker nodes of the target cluster for application deployment, the scheduling efficiency of application nodes is improved, thereby reducing operational pressure. Attached Figure Description
[0015] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0016] Figure 1 This is a flowchart of an application node scheduling method provided according to an embodiment of this application;
[0017] Figure 2 This is a schematic diagram of a complex application deployment architecture based on the application node scheduling method provided in the embodiments of this application;
[0018] Figure 3 This is a schematic diagram illustrating the creation of a complex application based on the application node scheduling method provided in the embodiments of this application;
[0019] Figure 4 This is a schematic diagram of an application node scheduling device provided according to an embodiment of this application;
[0020] Figure 5 This is a schematic diagram of an application node scheduling electronic device provided according to an embodiment of this application. Detailed Implementation
[0021] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0022] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0024] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0025] The present invention will now be described in conjunction with preferred implementation steps. Figure 1 This is a flowchart of an application node scheduling method provided according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:
[0026] Step S101: Receive an application scheduling request initiated by the service caller, wherein the application scheduling request includes at least: application information.
[0027] Specifically, the caller initiates an application scheduling request for the creation of a complex application, such as... Figure 2 As shown, the management node of the K8s cluster receives the creation request for the complex application. It should be noted that the complex application consists of multiple nodes, each containing one or more containers. When considering node scheduling, different types of nodes must ensure that at least one container is alive to guarantee that the application is available.
[0028] Step S102: Parse the application information to obtain the application's node information, which includes at least: front-end container node, back-end container node, relational database node, and cache database node.
[0029] Specifically, such as Figure 2 As shown, after K8s receives an application scheduling request, it needs to parse the application information in the application scheduling request.
[0030] Optionally, in the application node scheduling method provided in this application embodiment, parsing the application information to obtain the application node information includes: obtaining the node name identifier of each node in the application information; and determining each node in the node information based on the node name identifier.
[0031] For example, by parsing the application information, several types of node information in the application are obtained. The node type is usually distinguished by the node name in the node information (corresponding to the node name identifier in this application). The node with "frontend" is a front-end container node, the node with "backend" is a back-end container node, the node with "db" is a relational database node, and the node with "nosql" is a cache database node. This application improves the efficiency of subsequent scheduling of container nodes by determining the node information in the application information.
[0032] Step S103: Configure the number of available containers in each node in the node information according to the application type in the application information to obtain the configured node information. Each node includes at least one application container, and the application type is at least one of the following: interface application, web application, or proxy application.
[0033] Specifically, after parsing the application information as described above, this application, in order to improve the scheduling efficiency of application nodes, configures the minimum proportion of available containers in each node based on the application type in the application information. The specific operation steps are as follows:
[0034] Optionally, when the application type is an interface-type application, the number of available containers in each node in the node information is configured according to the application type in the application information. The configured node information includes: configuring the number of available backend containers in the backend container node to obtain the configured backend container node, wherein the number of available backend containers in the configured backend container node is not less than the preset number of available backend containers; configuring the number of available containers in each node other than the backend container node in the node information to obtain the configured other nodes, wherein the number of available containers in each of the configured other nodes is at least one; and determining the configured node information based on the configured backend container node and the configured other nodes.
[0035] For example, applications with the "interface" identifier in the application information are interface-type applications. This type of application mainly provides backend interface services. Therefore, the proportion of available containers in the backend container nodes should be guaranteed to be no less than half (corresponding to the preset number of available backend containers in this application). In addition to the backend container nodes, the database nodes, frontend container nodes, and cache database nodes in the node information can have only one available container. By configuring the minimum proportion of available containers in each node according to the application type, the above configuration of the number of available containers in each node generates the configured node information of this application. While ensuring the normal creation of the application, it simplifies the operation and maintenance work, improves the operation and maintenance efficiency, and also improves the simplicity of application deployment.
[0036] Optionally, in the application node scheduling method provided in this application embodiment, when the application type is a web application, the number of available containers in each node in the node information is configured according to the application type in the application information to obtain the configured node information, including: configuring the number of available front-end containers in the front-end container node to obtain the configured front-end container node, wherein the number of available front-end containers in the configured front-end container node is not less than the preset number of available front-end containers; configuring the number of available containers in each node other than the front-end container node in the node information to obtain the configured other nodes, wherein the number of available containers in each of the configured other nodes is at least one; and determining the configured node information based on the configured front-end container node and the configured other nodes.
[0037] For example, applications with the "web" identifier in their application information are web-based applications. These applications mainly provide visual page operations. Therefore, the proportion of available containers in the front-end container node should be guaranteed to be no less than half (corresponding to the preset number of available front-end containers in this application). In addition to the front-end container node, the database node, back-end container node, and cache database node in the node information can have only one available container. By configuring the minimum proportion of available containers in each node according to the application type, the above configuration of the number of available containers in each node generates the configured node information of this application. While ensuring the normal creation of the application, it simplifies the operation and maintenance work, improves the efficiency of operation and maintenance, and also improves the simplicity of application deployment.
[0038] Optionally, in the application node scheduling method provided in this application embodiment, when the application type is a proxy application, the number of available containers in each node in the node information is configured according to the application type in the application information to obtain the configured node information, including: configuring the number of available front-end containers in the front-end container node to obtain the configured front-end container node, wherein the number of available front-end containers in the configured front-end container node is not less than the preset number of available front-end containers; configuring the number of available back-end containers in the back-end container node to obtain the configured back-end container node, wherein the number of available back-end containers in the configured back-end container node is not less than the preset number of available back-end containers; configuring the number of available containers in each node other than the front-end container node and the back-end container node in the node information to obtain the configured other nodes, wherein the number of available containers in each of the configured other nodes is at least one; and determining the configured node information based on the configured front-end container node, the configured back-end container node, and the configured other nodes.
[0039] For example, applications with the "proxy" identifier in their application information are proxy applications. Based on the application type, the proportion of available containers in the front-end container nodes is configured to be no less than half (corresponding to the preset number of available front-end containers in this application). Similarly, the proportion of available containers in the back-end container nodes is configured to be no less than half (corresponding to the preset number of available back-end containers in this application). Furthermore, the database nodes and cache database nodes, excluding the front-end and back-end container nodes, are configured so that only one container is available. By configuring the minimum proportion of available containers in each node according to the application type, the above configuration of the available number of containers in each node generates the configured node information of this application. This ensures normal application creation while simplifying operation and maintenance, improving operational efficiency, and enhancing the ease of application deployment.
[0040] Step S104: Distribute the configured node information to the worker nodes of the target cluster for application deployment.
[0041] Specifically, worker nodes are the underlying resources that application containers depend on to run. Container node scheduling requests are sent to the management node in Kubernetes, which then schedules the container to the appropriate worker node for application deployment based on the container's resource requirements.
[0042] Among them, such as Figure 3 As shown, after configuring the number of available containers for each node, before sending the configured node information to the worker nodes of the target cluster for application deployment, if the configured node information includes information on available containers and unavailable containers, the information on unavailable containers needs to be deleted.
[0043] Optionally, in the application node scheduling method provided in this application embodiment, the configured node information includes information on available containers and information on unavailable containers. Before sending the configured node information to the worker nodes of the target cluster for application deployment, the method further includes: triggering a deletion instruction to delete the target container corresponding to the information of the unavailable container; and deleting the target container if the deletion instruction meets the preset requirements.
[0044] For example, such as Figure 3 As shown, if the configured node information includes information on both available and unavailable containers, a deletion command is triggered to delete the target container corresponding to the unavailable container. However, before deleting the target container, compliance verification of the available quantity configuration for each node is required.
[0045] Optionally, in the application node scheduling method provided in this application embodiment, after triggering a deletion instruction to delete unusable containers in the configured node information, the method further includes: determining whether the deletion instruction conforms to preset regulations based on the security protection strategy of the configured node information; and suspending the deletion instruction if the deletion instruction does not conform to the preset regulations.
[0046] Specifically, if the available number of containers in each node meets the minimum ratio configuration (i.e., the preset rule), the target container corresponding to the information of the unavailable container will be deleted. If the available number of containers in each node does not meet the minimum ratio configuration (i.e., the preset rule), the deletion instruction will be aborted and rejected.
[0047] In summary, the application node scheduling method provided in this application embodiment receives an application scheduling request initiated by a service caller, wherein the application scheduling request includes at least: application information; parses the application information to obtain application node information; configures the number of available containers in each node in the node information according to the application type in the application information to obtain configured node information, wherein each node includes at least one application container, and the application type is at least one of the following: interface application, web application, or proxy application; and distributes the configured node information to the worker nodes of the target cluster for application deployment. This application solves the problem of low application node scheduling efficiency and high operational pressure in related technologies. By distributing the configured node information to the worker nodes of the target cluster for application deployment, the scheduling efficiency of application nodes is improved, thereby reducing operational pressure.
[0048] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0049] This application also provides an application node scheduling device. It should be noted that the application node scheduling device of this application can be used to execute the application node scheduling method provided in this application. The application node scheduling device provided in this application is described below.
[0050] Figure 4 This is a schematic diagram of an application node scheduling device according to an embodiment of this application. Figure 4 As shown, the device includes: a receiving unit 401, a parsing unit 402, a configuration unit 403, and a deployment unit 404.
[0051] Specifically, the receiving unit 401 is used to receive an application scheduling request initiated by the service caller, wherein the application scheduling request includes at least: application information;
[0052] The parsing unit 402 is used to parse the application information to obtain the application's node information, wherein the node information includes at least: front-end container node, back-end container node, relational database node, and cache database node;
[0053] Configuration unit 403 is used to configure the number of available containers in each node in the node information according to the application type in the application information, so as to obtain the configured node information, wherein each node includes at least one application container, and the application type is at least one of the following: interface application, web application, and proxy application;
[0054] Deployment unit 404 is used to send the configured node information to the worker nodes of the target cluster for application deployment.
[0055] In summary, the application node scheduling device provided in this application embodiment includes a receiving unit 401 for receiving application scheduling requests initiated by a service caller, wherein the application scheduling request includes at least application information; a parsing unit 402 for parsing the application information to obtain application node information, wherein the node information includes at least front-end container nodes, back-end container nodes, relational database nodes, and cache database nodes; a configuration unit 403 for configuring the number of available containers in each node in the node information according to the application type in the application information, thereby obtaining configured node information, wherein each node includes at least one application container, and the application type is at least one of the following: interface application, web application, and proxy application; and a deployment unit 404 for distributing the configured node information to the working nodes of the target cluster for application deployment. This solves the problem of low application node scheduling efficiency and high operational pressure in related technologies. By distributing the configured node information to the working nodes of the target cluster for application deployment, the scheduling efficiency of application nodes is improved, thereby reducing operational pressure.
[0056] Optionally, in the application node scheduling method provided in this application embodiment, the parsing unit includes: an acquisition module, used to acquire the node name identifier of each node in the application information; and a determination module, used to determine each node in the node information based on the node name identifier.
[0057] Optionally, in the application node scheduling method provided in this application embodiment, when the application type is an interface-type application, the configuration unit includes: a first configuration module, used to configure the number of available backend containers in the backend container node to obtain the configured backend container node, wherein the number of available backend containers in the configured backend container node is not less than a preset number of available backend containers; a second configuration module, used to configure the number of available containers for each node in the node information other than the backend container node to obtain the configured other nodes, wherein the number of available containers for each node in the configured other nodes is at least one; and a first determining unit, used to determine the configured node information based on the configured backend container node and the configured other nodes.
[0058] Optionally, in the application node scheduling method provided in this application embodiment, when the application type is a web application, the configuration unit includes: a third configuration module, used to configure the number of available front-end containers in the front-end container node to obtain the configured front-end container node, wherein the number of available front-end containers in the configured front-end container node is not less than the preset number of available front-end containers; a fourth configuration module, used to configure the number of available containers for each node in the node information other than the front-end container node to obtain the configured other nodes, wherein the number of available containers for each node in the configured other nodes is at least one; and a second determining unit, used to determine the configured node information based on the configured front-end container node and the configured other nodes.
[0059] Optionally, in the application node scheduling method provided in this application embodiment, when the application type is a proxy application, the configuration unit includes: a fifth configuration module, used to configure the number of available front-end containers in the front-end container node to obtain a configured front-end container node, wherein the number of available front-end containers in the configured front-end container node is not less than a preset number of available front-end containers; a sixth configuration module, used to configure the number of available back-end containers in the back-end container node to obtain a configured back-end container node, wherein the number of available back-end containers in the configured back-end container node is not less than a preset number of available back-end containers; a seventh configuration module, used to configure the number of available containers for each node in the node information other than the front-end container node and the back-end container node to obtain configured other nodes, wherein the number of available containers for each node in the configured other nodes is at least one; and a third determining unit, used to determine the configured node information based on the configured front-end container node, the configured back-end container node and the configured other nodes.
[0060] Optionally, in the application node scheduling method provided in this application embodiment, the configured node information includes information on available containers and information on unavailable containers. The device further includes: a triggering unit, used to trigger a deletion instruction to delete the target container corresponding to the information on unavailable containers before the configured node information is sent to the working nodes of the target cluster for application deployment; and a deletion unit, used to delete the target container if the deletion instruction meets the preset requirements.
[0061] Optionally, in the application node scheduling method provided in this application embodiment, the apparatus further includes: a judgment unit, used to determine whether the deletion instruction conforms to preset regulations based on the security protection strategy of the configured node information after triggering a deletion instruction to delete unusable containers in the configured node information; and a termination unit, used to terminate the deletion instruction if the deletion instruction does not conform to the preset regulations.
[0062] The application node scheduling device includes a processor and a memory. The aforementioned receiving unit 401, parsing unit 402, configuration unit 403, deployment unit 404, etc., are all stored in the memory as program units. The processor executes the aforementioned program units stored in the memory to realize the corresponding functions.
[0063] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and application nodes are scheduled by adjusting kernel parameters.
[0064] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0065] This invention provides a computer-readable storage medium storing a program that, when executed by a processor, implements a method for scheduling application nodes.
[0066] This invention provides a processor for running a program, wherein the program executes an application node scheduling method during runtime.
[0067] like Figure 5 As shown, this embodiment of the invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: receiving an application scheduling request initiated by a service caller, wherein the application scheduling request includes at least: application information; parsing the application information to obtain application node information, wherein the node information includes at least: front-end container nodes, back-end container nodes, relational database nodes, and cache database nodes; configuring the number of available containers in each node in the node information according to the application type in the application information to obtain configured node information, wherein each node includes at least one application container, and the application type is at least one of the following: interface application, web application, and proxy application; and distributing the configured node information to the worker nodes of the target cluster for application deployment.
[0068] When the processor executes the program, it also performs the following steps: obtains the node name identifier of each node in the application information; and determines each node in the node information based on the node name identifier.
[0069] When the processor executes the program, it also performs the following steps: configuring the number of available backend containers in the backend container nodes to obtain the configured backend container nodes, wherein the number of available backend containers in the configured backend container nodes is not less than the preset number of available backend containers; configuring the number of available containers for each node in the node information other than the backend container nodes to obtain the configured other nodes, wherein the number of available containers for each node in the configured other nodes is at least one; and determining the configured node information based on the configured backend container nodes and the configured other nodes.
[0070] When the processor executes the program, it also performs the following steps: configuring the number of available front-end containers in the front-end container node to obtain the configured front-end container node, wherein the number of available front-end containers in the configured front-end container node is not less than the preset number of available front-end containers; configuring the number of available containers for each node in the node information other than the front-end container node to obtain the configured other nodes, wherein the number of available containers for each node in the configured other nodes is at least one; and determining the configured node information based on the configured front-end container node and the configured other nodes.
[0071] When the processor executes the program, it also performs the following steps: configuring the number of available front-end containers in the front-end container nodes to obtain configured front-end container nodes, wherein the number of available front-end containers in the configured front-end container nodes is not less than the preset number of available front-end containers; configuring the number of available back-end containers in the back-end container nodes to obtain configured back-end container nodes, wherein the number of available back-end containers in the configured back-end container nodes is not less than the preset number of available back-end containers; configuring the number of available containers for each node in the node information other than the front-end container nodes and the back-end container nodes to obtain configured other nodes, wherein the number of available containers for each node in the configured other nodes is at least one; and determining the configured node information based on the configured front-end container nodes, the configured back-end container nodes, and the configured other nodes.
[0072] When the processor executes the program, it also performs the following steps: triggering a deletion instruction to delete the target container corresponding to the information of the unusable container; and deleting the target container if the deletion instruction meets the preset requirements.
[0073] When the processor executes the program, it also performs the following steps: determines whether the deletion instruction conforms to the preset rules based on the security protection strategy of the configured node information; if the deletion instruction does not conform to the preset rules, it aborts the deletion instruction.
[0074] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.
[0075] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program with the following method steps: receiving an application scheduling request initiated by a service caller, wherein the application scheduling request includes at least: application information; parsing the application information to obtain application node information, wherein the node information includes at least: front-end container nodes, back-end container nodes, relational database nodes, and cache database nodes; configuring the number of available containers in each node in the node information according to the application type in the application information to obtain configured node information, wherein each node includes at least one application container, and wherein the application type is at least one of the following: interface application, web application, and proxy application; and distributing the configured node information to the worker nodes of the target cluster for application deployment.
[0076] When executed on a data processing device, it is also suitable to execute an initialization program with the following method steps: obtaining the node name identifier of each node in the application information; determining each node in the node information based on the node name identifier.
[0077] When executed on a data processing device, it is also suitable to execute an initialization program with the following method steps: configuring the number of available backend containers in the backend container nodes to obtain configured backend container nodes, wherein the number of available backend containers in the configured backend container nodes is not less than the preset number of available backend containers; configuring the number of available containers for each node in the node information other than the backend container nodes to obtain configured other nodes, wherein the number of available containers for each node in the configured other nodes is at least one; and determining the configured node information based on the configured backend container nodes and the configured other nodes.
[0078] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: configuring the number of available front-end containers in the front-end container node to obtain a configured front-end container node, wherein the number of available front-end containers in the configured front-end container node is not less than the preset number of available front-end containers; configuring the number of available containers for each node in the node information other than the front-end container node to obtain configured other nodes, wherein the number of available containers for each node in the configured other nodes is at least one; and determining the configured node information based on the configured front-end container node and the configured other nodes.
[0079] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: configuring the number of available front-end containers in the front-end container nodes to obtain configured front-end container nodes, wherein the number of available front-end containers in the configured front-end container nodes is not less than a preset number of available front-end containers; configuring the number of available back-end containers in the back-end container nodes to obtain configured back-end container nodes, wherein the number of available back-end containers in the configured back-end container nodes is not less than a preset number of available back-end containers; configuring the number of available containers for each node in the node information other than the front-end container nodes and the back-end container nodes to obtain configured other nodes, wherein the number of available containers for each of the configured other nodes is at least one; and determining the configured node information based on the configured front-end container nodes, the configured back-end container nodes, and the configured other nodes.
[0080] When executed on a data processing device, it is also suitable for executing an initialization program with the following steps: triggering a deletion instruction to delete the target container corresponding to the information of the unavailable container; and deleting the target container if the deletion instruction meets the preset requirements.
[0081] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: determine whether the deletion command conforms to the preset rules based on the security protection strategy of the configured node information; and abort the deletion command if it does not conform to the preset rules.
[0082] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0083] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.
[0084] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0085] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0086] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0087] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0088] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0089] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0090] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0091] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A scheduling method for application nodes, characterized in that, include: Receive an application scheduling request initiated by a service caller, wherein the application scheduling request includes at least: application information; The application information is parsed to obtain the node information of the application, wherein the node information includes at least: front-end container node, back-end container node, relational database node, and cache database node; The number of available containers in each node in the node information is configured according to the application type in the application information to obtain the configured node information. Each node includes at least one application container, and the application type is at least one of the following: interface application, web application, or proxy application. The number of available containers in each node is configured to a minimum ratio according to the application type in the application information. The configured node information is then sent to the worker nodes of the target cluster for application deployment. Specifically, when the application type is the proxy application, the number of available containers in each node in the node information is configured according to the application type in the application information, resulting in the configured node information including: The number of available front-end containers in the front-end container node is configured to obtain a configured front-end container node, wherein the number of available front-end containers in the configured front-end container node is not less than the preset number of available front-end containers; The number of available backend containers in the backend container node is configured to obtain a configured backend container node, wherein the number of available backend containers in the configured backend container node is not less than the preset number of available backend containers. The number of available containers for each node in the node information, excluding the front-end container node and the back-end container node, is configured to obtain the configured other nodes, wherein each of the configured other nodes has at least one available container; and The configured node information is determined based on the configured front-end container node, the configured back-end container node, and the configured other nodes.
2. The method according to claim 1, characterized in that, Parsing the application information yields the following node information for the application: Obtain the node name identifier for each node in the application information; Each node in the node information is determined based on the node name identifier.
3. The method according to claim 1, characterized in that, When the application type is the interface class application, the number of available containers in each node in the node information is configured according to the application type in the application information, resulting in the configured node information including: The number of available backend containers in the backend container node is configured to obtain a configured backend container node, wherein the number of available backend containers in the configured backend container node is not less than the preset number of available backend containers. Configure the number of available containers for each node in the node information other than the backend container node to obtain the configured other nodes, wherein each of the configured other nodes has at least one available container; and The configured node information is determined based on the configured backend container node and the configured other nodes.
4. The method according to claim 3, characterized in that, When the application type is a web-based application, the number of available containers in each node of the node information is configured according to the application type in the application information, resulting in the configured node information including: The number of available front-end containers in the front-end container node is configured to obtain a configured front-end container node, wherein the number of available front-end containers in the configured front-end container node is not less than the preset number of available front-end containers; Configure the number of available containers for each node in the node information other than the front-end container node to obtain the configured other nodes, wherein each of the configured other nodes has at least one available container; and The configured node information is determined based on the configured front-end container node and the configured other nodes.
5. The method according to claim 1, characterized in that, The configured node information includes information on available containers and unavailable containers. Before distributing the configured node information to the worker nodes of the target cluster for application deployment, the method further includes: Trigger a deletion command to delete the target container corresponding to the information of the unavailable container; If the deletion instruction meets the preset requirements, the target container is deleted.
6. The method according to claim 5, characterized in that, After triggering a deletion command to delete unavailable containers in the configured node information, the method further includes: Based on the security protection strategy of the configured node information, determine whether the deletion instruction complies with the preset regulations; If the deletion instruction does not meet the preset requirements, the deletion instruction shall be terminated.
7. A scheduling device for application nodes, characterized in that, include: A receiving unit is configured to receive an application scheduling request initiated by a service caller, wherein the application scheduling request includes at least: application information; The parsing unit is used to parse the application information to obtain the node information of the application, wherein the node information includes at least: front-end container node, back-end container node, relational database node, and cache database node; A configuration unit is used to configure the number of available containers in each node in the node information according to the application type in the application information, to obtain the configured node information, wherein each node includes at least one application container, and the application type is at least one of the following: interface application, web application, or proxy application; wherein the number of available containers in each node is configured at a minimum ratio according to the application type in the application information. The deployment unit is used to send the configured node information to the working nodes of the target cluster for application deployment; Wherein, when the application type is the proxy application, the configuration unit includes: The fifth configuration module is used to configure the number of available front-end containers in the front-end container node to obtain a configured front-end container node, wherein the number of available front-end containers in the configured front-end container node is not less than the preset number of available front-end containers. The sixth configuration module is used to configure the number of available backend containers in the backend container node to obtain the configured backend container node, wherein the number of available backend containers in the configured backend container node is not less than the preset number of available backend containers. The seventh configuration module is used to configure the number of available containers for each node in the node information other than the front-end container node and the back-end container node, to obtain the configured other nodes, wherein the number of available containers for each of the configured other nodes is at least one; and The third determining unit is used to determine the configured node information based on the configured front-end container node, the configured back-end container node, and the configured other nodes.
8. A computer-readable storage medium, characterized in that, The storage medium stores a program, wherein the program executes the method described in any one of claims 1 to 6.
9. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Application program deployment method, device, computer equipment and storage medium
CN110609732A
Application node scheduling method and device
CN114385338A
