CN117149399A - Data processing method, device, equipment and readable storage medium - Google Patents
Data processing method, device, equipment and readable storage medium Download PDFInfo
- Publication number
- CN117149399A CN117149399A CN202210561355.2A CN202210561355A CN117149399A CN 117149399 A CN117149399 A CN 117149399A CN 202210561355 A CN202210561355 A CN 202210561355A CN 117149399 A CN117149399 A CN 117149399A
- Authority
- CN
- China
- Prior art keywords
- container
- creation
- threshold
- target
- retry
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003860 storage Methods 0.000 title claims abstract description 26
- 238000003672 processing method Methods 0.000 title abstract description 11
- 238000000034 method Methods 0.000 claims abstract description 73
- 238000012545 processing Methods 0.000 claims description 80
- 230000008569 process Effects 0.000 claims description 29
- 238000004590 computer program Methods 0.000 claims description 25
- 230000002159 abnormal effect Effects 0.000 claims description 21
- 238000004891 communication Methods 0.000 claims description 11
- 230000006870 function Effects 0.000 claims description 9
- 230000000977 initiatory effect Effects 0.000 claims description 6
- 238000004519 manufacturing process Methods 0.000 abstract description 32
- 238000012384 transportation and delivery Methods 0.000 abstract description 12
- 238000005516 engineering process Methods 0.000 abstract description 6
- 238000013473 artificial intelligence Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 17
- 238000007726 management method Methods 0.000 description 7
- 238000012423 maintenance Methods 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 3
- 238000011217 control strategy Methods 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000013439 planning Methods 0.000 description 2
- 238000013341 scale-up Methods 0.000 description 2
- 238000013475 authorization Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000002716 delivery method Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005304 joining Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5077—Logical partitioning of resources; Management or configuration of virtualized resources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application discloses a data processing method, a device, equipment and a readable storage medium, wherein the method comprises the following steps: acquiring a container retry creation request amount of a node cluster in a container arranging system in a target time period; acquiring a container creatable threshold value of the node cluster in a target time period; the container creatable threshold is based on real-time resource usage data of the node cluster within a target time period, the determined maximum container creatable number; and determining the container creation task quantity of the node cluster in the target time period according to the container creation threshold and the container retry creation request quantity. By adopting the application, the production capacity of the system can be quantized in the business of producing the containers by the container arrangement system, thereby improving the stability of system resource delivery. The method can be applied to various scenes such as audio and video, cloud technology, artificial intelligence, intelligent traffic, auxiliary driving and the like.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method, apparatus, device, and readable storage medium.
Background
With the rapid development of internet technology, background service devices of various applications are mostly realized through a cloud system. In a container orchestration system (e.g., kubernetes) in a cloud system, one or more computing nodes (which may constitute a cluster of nodes) may be included that may create multiple containers on the container orchestration system, and an application may correspond to multiple containers, which are served by an object (e.g., an enterprise) when the object uses the corresponding application.
In a container arrangement system such as Kubernetes, a mode of scheduling production containers becomes a basic resource delivery method of cloud computing, in this mode, when a container production failure occurs, retry operation is mainly performed by adopting a backoff strategy, and when each time the backoff retry production is hit, a retry request of the production is intensively processed. However, when all production retry requests are processed in a centralized manner, the instantaneous pressure of the node cluster of the container arrangement system is too high, and under the excessive pressure, the node cluster is likely to fail to operate normally, so that the container cannot be successfully re-produced, and the stability of system resource delivery is greatly affected.
Disclosure of Invention
The embodiment of the application provides a data processing method, a device, equipment and a readable storage medium, which can quantify the production capacity of a system in the business of container arrangement system for producing containers, thereby improving the stability of system resource delivery.
In one aspect, an embodiment of the present application provides a data processing method, including:
acquiring a container retry creation request amount of a node cluster in a container arranging system in a target time period; the capacity retry creation request amount refers to the request amount of one or more capacity retry creation requests, and each of the one or more capacity retry creation requests is used for requesting the node cluster to re-create a first history container, wherein the first history container refers to a container that the node cluster fails to create at a history time; the historical moment is earlier than the target time period;
acquiring a container creatable threshold value of the node cluster in a target time period; the container creatable threshold is based on real-time resource usage data of the node cluster within a target time period, the determined maximum container creatable number;
determining the container creation task amount of the node cluster in the target time period according to the container creation threshold and the container retry creation request amount; the container creation task amount is less than the container creatable threshold; the container creation task amount is used for indicating the node cluster to re-create a first target history container based on a first target container retry creation request in the one or more container retry creation requests in a target time period; the first target container retries the number of requests to create a task amount for the container.
In one aspect, an embodiment of the present application provides a data processing apparatus, including:
the request quantity acquisition module is used for acquiring a container retry creation request quantity of the node cluster in the container arrangement system in a target time period; the capacity retry creation request amount refers to the request amount of one or more capacity retry creation requests, and each of the one or more capacity retry creation requests is used for requesting the node cluster to re-create a first history container, wherein the first history container refers to a container that the node cluster fails to create at a history time; the historical moment is earlier than the target time period;
a threshold value acquisition module, configured to acquire a container creatable threshold value of the node cluster in a target time period; the container creatable threshold is based on real-time resource usage data of the node cluster within a target time period, the determined maximum container creatable number;
the task amount determining module is used for determining the container creation task amount of the node cluster in the target time period according to the container creation threshold and the container retry creation request amount; the container creation task amount is less than the container creatable threshold; the container creation task amount is used for indicating the node cluster to re-create a first target history container based on a first target container retry creation request in the one or more container retry creation requests in a target time period; the first target container retries the number of requests to create a task amount for the container.
In one embodiment, the target time period is a time period consisting of a first time and a second time, the second time being later than the first time; the real-time resource use data comprises a first resource load of the node cluster at a second moment and a container creation request quantity indicated by the first resource load; the container creation request amount refers to the request amount of one or more container creation requests for requesting the node cluster creation target container; the one or more container creation requests include one or more container retry creation requests;
a threshold acquisition module comprising:
the load acquisition unit is used for acquiring a first resource load of the node cluster at a first moment;
the load acquisition unit is also used for acquiring the container creation request quantity indicated by the first resource load;
the load acquisition unit is also used for acquiring a second resource load of the node cluster at the time of abnormal time delay; the time delay abnormal time is the time when the container creation time delay is abnormal, and the container creation time delay is the time delay corresponding to the time delay when the node cluster creates the second historical container in the historical time period; the historical time period is earlier than the first moment;
and the threshold value determining unit is used for determining a container creatable threshold value of the node cluster in the target time period according to the first resource load, the container creation request amount and the second resource load.
In one embodiment, a cluster of nodes includes a first computing node and a second computing node;
a load acquisition unit comprising:
the computing power acquisition subunit is used for acquiring first maximum computing power resource information and first occupied computing power resource information of the first computing node at the second moment and acquiring second maximum computing power resource information and second occupied computing power resource information of the second computing node at the second moment;
the utilization rate determining subunit is configured to determine, according to the first maximum computing power resource information and the first occupied computing power resource information, a first computing power resource utilization rate of the first computing node at the second time, and determine, according to the second maximum computing power resource information and the second occupied computing power resource information, a second computing power resource utilization rate of the second computing node at the second time;
and the load determining subunit is used for determining the first resource load of the node cluster at the second moment according to the first computing power resource utilization rate and the second computing power resource utilization rate.
In one embodiment, the load determining subunit is further specifically configured to obtain a first configuration resource load indicated by the first computing power resource utilization rate, and a second configuration resource load indicated by the second computing power resource utilization rate;
The load determining subunit is further specifically configured to determine a resource load average value of the first configuration resource load and the second configuration resource load, and determine the resource load average value as the first resource load.
In one embodiment, the threshold determining unit includes:
a first determining subunit, configured to determine an absolute value of a difference between the first resource load and the second resource load if the first resource load is smaller than the second resource load;
the first determining subunit is further configured to determine a container creatable threshold of the node cluster in the target time period according to the absolute value of the difference value and the container creation request amount;
and a second determining subunit, configured to determine the invalid value as a container creatable threshold of the node cluster in the target time period if the first resource load is greater than the second resource load.
In an embodiment, the first determining subunit is further specifically configured to compare the absolute value of the difference to a difference threshold;
the first determining subunit is further specifically configured to determine a load ratio between the second resource load and the first resource load if the absolute value of the difference is greater than the difference threshold, perform an operation process on the load ratio, the container creation request amount and the cluster performance buffer value based on a first threshold configuration policy, and determine a first operation result obtained by the operation as a container creatable threshold; the cluster performance buffer value is configured for the node cluster according to the total number of nodes contained in the node cluster;
The first determining subunit is further specifically configured to, if the absolute value of the difference is smaller than the difference threshold, perform an operation process on the container creation request amount, the difference threshold, and the cluster performance buffer value based on a second threshold configuration policy, and determine a second operation result obtained by the operation as the container creation threshold.
In one embodiment, the task amount determination module includes:
a first parameter comparison unit, configured to compare the container creatable threshold with a standard threshold parameter if the container retry creation request amount is greater than the request amount threshold;
the first proportion operation unit is used for carrying out operation processing on the container creation threshold and the first threshold proportion when the container creation threshold is larger than the standard threshold parameter, so as to obtain the container creation task quantity;
the second proportion operation unit is used for carrying out operation processing on the container creation threshold and the second threshold proportion when the container creation threshold is smaller than the standard threshold parameter, so as to obtain the container creation task quantity; the second threshold ratio is less than the first threshold ratio.
In one embodiment, the task amount determination module further includes:
the updating data acquisition unit is used for acquiring updating resource use data of the node cluster in the process of re-creating the first target historical container based on the container creation task amount when the container creation threshold is larger than the standard threshold parameter; updating the resource use data comprises real-time resource load of the node cluster at the current time; the target time period includes a current time;
The proportion increasing unit is used for increasing the first threshold proportion if the real-time resource load is smaller than the load threshold value to obtain a first increasing threshold proportion; the first incremental threshold scale is used for determining an update container creation task amount of the node cluster in the residual time period together with the container creation threshold; the remaining time period is a time period formed by the current time and the ending time of the target time period; the update container creation task amount is used for indicating the node cluster to re-create the update history container based on the target update container retry creation request in the update container retry creation request set in the remaining time period; the target update container retries the request quantity of the creation request to create a task quantity for the update container; the update container retry creation request set is a request set obtained by updating one or more container retry creation requests based on the first target container retry creation request.
In one embodiment, the task amount determination module includes:
a second parameter comparison unit, configured to compare the container creatable threshold with a standard threshold parameter if the container retry creation request amount is smaller than the request amount threshold;
the third proportion operation unit is used for carrying out operation processing on the container creation threshold and the third threshold proportion when the container creation threshold is larger than the standard threshold parameter so as to obtain the container creation task quantity;
The fourth proportion operation unit is used for carrying out operation processing on the container creation threshold and the fourth threshold proportion when the container creation threshold is smaller than the standard threshold parameter, so as to obtain the container creation task quantity; the fourth threshold ratio is less than the third threshold ratio.
In one embodiment, the first target container retry creation request is obtained by the node cluster sequentially in a request queue, where the request queue is a queue obtained by arranging one or more container retry creation requests in time sequence, and the time sequence is a sequence between request times of each container retry creation request;
the data processing apparatus further includes:
the state acquisition module is used for acquiring the creation state of the first target history container;
the first queue processing module is used for generating a creation success notification according to the first target history container if the creation state is the creation success state, returning the creation success notification and the first target history container to the target terminal equipment, and deleting the first target container retry creation request from the request queue to obtain an update request queue; the target terminal equipment is the terminal equipment corresponding to the object initiating the first target container retry creation request; the update request queue is used for sequentially acquiring a second target container retry creation request based on the container creation task amount, and the second target container retry creation request is used for the node cluster to recreate a second target history container in a target time period;
The second queue processing module is used for acquiring the creation task state corresponding to the first target history container if the creation state is the creation failure state;
the second queue processing module is also used for carrying out queue processing on the request queue according to the state of the created task; the request queue after queue processing is used for the node cluster to acquire a third target container retry creation request in sequence based on the container creation task amount, and the third target container retry creation request is used for the node cluster to re-create a third target history container in a target time period.
In one embodiment, the second queue processing module comprises:
the queue holding unit is used for holding a request queue if the created task state is an execution task state;
and the request deleting unit is used for retrying the creation request from the request queue by the first target container if the creation task state is the cancellation task state.
In one aspect, an embodiment of the present application provides a computer device, including: a processor and a memory;
the memory stores a computer program that, when executed by the processor, causes the processor to perform the methods of embodiments of the present application.
In one aspect, embodiments of the present application provide a computer-readable storage medium storing a computer program, the computer program comprising program instructions that, when executed by a processor, perform a method according to embodiments of the present application.
In one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program stored in a computer readable storage medium. A processor of a computer device reads the computer program from a computer-readable storage medium, and the processor executes the computer program to cause the computer device to perform a method provided in an aspect of an embodiment of the present application.
In the embodiment of the application, for the node cluster of the container arranging system, the maximum container creation quantity (namely, container creation threshold) of the node cluster in the target time period can be determined based on the real-time resource use data of the node cluster in the target time period; based on the container creatable threshold and a container retry creation request amount of the node cluster within a target time period (the container retry creation request amount refers to a request amount of one or more container retry creation requests, and each container retry creation request is used for requesting the node cluster to recreate a first historical container, which is in turn referred to as a container that the node cluster fails to create at a historical moment), a container creation task amount of the node cluster within the target time period can be determined, wherein the container creation task amount is used for indicating that the node cluster is within the target time period, and the first target historical container is recreated based on the first target container retry creation request of the one or more container retry creation requests. It can be seen that the application can determine the container creation threshold in real time based on the real-time resource usage data of the node cluster of the container arrangement system, the container creation threshold can be used for representing the container creation capability of the node cluster, and the container creation capability of the node cluster is quantized; the creatable threshold value can dynamically adjust the task quantity of container creation of the node cluster, thereby realizing the quantitative management and control of the node cluster on the container retry creation request, further reducing the blind centralized processing of a large number of container retry creation requests and reducing the pressure brought by continuously retrying the creation requests to the node cluster. In summary, the present application can quantify the container creation capability (or referred to as container production capability) of a node cluster of a container orchestration system by determining a container creation threshold in real time, with configuration and operation utilizing container creation; meanwhile, the container creation task amount is dynamically adjusted through the container creation threshold, quantitative management and control on the retry creation container can be realized, the pressure of the node cluster can be reduced, and the stability of system resource delivery is improved.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic illustration of a container orchestration system according to an embodiment of the present application;
FIG. 2 is a schematic illustration of another container orchestration system provided by an embodiment of the present application;
FIG. 3 is a diagram of a network architecture according to an embodiment of the present application;
FIG. 4 is a schematic flow chart of a data processing method according to an embodiment of the present application;
FIG. 5 is a system architecture diagram for processing a container retry creation request according to an embodiment of the present application;
FIG. 6 is a flow chart illustrating a method for determining a container creatable threshold of a node cluster according to an embodiment of the present application;
FIG. 7 is a logic flow diagram of a system provided by an embodiment of the present application;
FIG. 8 is a schematic diagram of a data processing apparatus according to an embodiment of the present application;
Fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The present application relates to the art of container organizing systems, and for ease of understanding, the following description will preferentially discuss the concepts related to container organizing systems.
Container orchestration system: the container orchestration system may be Kubernetes (K8 s for short), which is an open source container orchestration system that may schedule, telescope, and manage containers. In particular, kubernetes is an open-source application for managing containerization on multiple hosts in a cloud platform, and the goal of Kubernetes is to make deploying containerized applications simple and efficient, and Kubernetes provides a mechanism for application deployment, planning, updating, and maintenance. Where Kubernetes may include a cluster of one or more (typically at least two) computing nodes, each computing node in the cluster may refer to a node computer for running a containerized application, i.e., each computing node may serve the containerized application. When Kubernetes is running, it can be understood that node clusters are running.
A container: a container is a way to implement operating system virtualization that enables processes to run in an isolated environment.
Pea POD (POD): in Kubernetes, where the container is described using pea PODs, the PODs may also be translated directly into POD, and POD may be the same meaning in embodiments of the present application. The POD object may include an internet protocol (Internet Protocol, IP) of the container, an IP of the physical machine, a running process, a current state, and the like. In the Kubernetes system, each container has a corresponding POD object.
For ease of understanding, please refer to fig. 1, fig. 1 is a schematic diagram of a container arranging system according to an embodiment of the present application. As shown in fig. 1, one or more containers may be included in the container arrangement system, such as: container 1, container M, container N, etc., where M and N may both be integers greater than 1 and M is less than N. In the container arrangement system, each container has a corresponding POD object, wherein the POD object of the container 1 is the POD object 1, the POD object of the container M is the POD object M, and the POD object of the container N is the POD object N.
It is understood that the containers in the container arrangement system may be located on one physical machine or on a plurality of physical machines. For ease of understanding, please refer to fig. 2 together, fig. 2 is a schematic diagram of another container arranging system according to an embodiment of the present application. The container arranging system shown in fig. 2 is exemplified in that the containers are located on a plurality of physical machines, and as shown in fig. 2, the containers 1 may be located on the physical machines 1; the containers M and N may be located on a physical machine X, where X may be any integer greater than 1.
Further, referring to fig. 3, fig. 3 is a network architecture diagram according to an embodiment of the present application. As shown in fig. 1, the network architecture may include a server 1000, a cluster of terminal devices, and a container orchestration system. The cluster of terminal devices may comprise one or more terminal devices. As shown in fig. 1, the terminal device cluster may specifically include terminal devices 100a, 100b, 100c, …, and 100n. As shown in fig. 1, the terminal devices 100a, 100b, 100c, …, 100n may respectively perform network connection with the above-mentioned server 1000, so that each terminal device may perform data interaction with the server 1000 through the network connection. The network connection is not limited to a connection manner, and may be directly or indirectly connected through a wired communication manner, may be directly or indirectly connected through a wireless communication manner, or may be other manners, which is not limited herein.
Wherein each terminal device in the terminal device cluster may include: smart phones, tablet computers, notebook computers, desktop computers, smart speakers, smart watches, vehicle terminals, smart televisions, smart vehicles, and other smart terminals with data processing functions (such as image processing, video processing, and the like). It should be understood that each terminal device in the terminal device cluster shown in fig. 1 may be provided with a target application (i.e. an application client), and when the application client runs in each terminal device, the application client may interact with the server 1000 shown in fig. 1 respectively. The application clients may include, among other things, social clients, multimedia clients (e.g., video clients), entertainment clients (e.g., game clients), educational clients, live clients, and the like. The application client may be an independent client, or may be an embedded sub-client integrated in a client (for example, a social client, an educational client, and a multimedia client), which is not limited herein.
As shown in fig. 1, server 1000 in embodiments of the present application may be a management server that may be responsible for maintaining and managing containers in a container orchestration system. The server 1000 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligence platforms. The embodiment of the application does not limit the number of terminal equipment and servers.
For easy understanding, the embodiment of the present application may select one terminal device from the plurality of terminal devices shown in fig. 1 as the target terminal device. For example, the embodiment of the present application may use the terminal device 100a shown in fig. 1 as a target terminal device, where a target application (i.e., an application client, such as a social client) may be integrated. At this time, the target terminal device may implement data interaction between the service data platform corresponding to the application client and the server 1000. Taking the target application as a social client, when the social client is running on the target terminal device, the application data of the target terminal device may be sent to the server 1000 through a network connection, and the server 1000 may allocate a corresponding container for the social client, and allocate the application data to the container, where the container may provide a corresponding service for the target terminal device.
It will be appreciated that, in the container arrangement system, a cluster (which may be referred to as a node cluster according to the present application) formed by one or more (in practical application, specifically, at least two) computing nodes (specifically, may be referred to as a computer) may be included, where the node cluster may be used to run a containerized application, and in particular, the node cluster may create containers, where the created containers may be used to provide corresponding services for a target application on a corresponding terminal device (such as a target terminal device).
It should be appreciated that embodiments of the present application provide a data processing method to govern container production in a container orchestration system in order to promote stability of resource delivery in creating containers in the container orchestration system. Specifically, when a certain terminal device runs a target application and a certain container in the container arrangement system is required to provide a corresponding service thereto, a container allocation request may be initiated to the server 1000 based on a network connection. And the server 1000 may allocate a corresponding container for the terminal device based on the container allocation request of the terminal device. When there is no suitable container in the container orchestration system to serve it, the server 1000 may generate a container creation instruction, creating one container by the cluster of nodes to serve it accordingly. When the container is failed to be created in the container arranging system, if the retry operation is executed by adopting the back-off strategy, all retry creation requests are intensively processed when the back-off retry creation is hit each time, so that a great pressure is brought to the node cluster. To relieve the pressure of the node cluster, the embodiment of the application can control the processing of the container retry creation request by setting the container creatable threshold value based on the request quantity of the container retry creation request.
Specifically, in the container creation service of the container orchestration system, the container retry creation request amount (which is the request amount indicating one or more container retry creation requests for the node cluster) of the node cluster in the container orchestration system in the target period of time may be obtained, wherein each container retry creation request is used to request the node cluster to recreate the container (here, the container in which the node cluster tries to create at the historic moment but fails to create, which may be referred to as a first historic container for convenience of understanding); meanwhile, a container creatable threshold of the node cluster in the target time period may be obtained (the container creatable threshold may be determined based on real-time resource usage data of the node cluster in the target time period, and a specific determination manner thereof may be described in a corresponding embodiment of fig. 4 below); based on the container creatable threshold and the container retry creation request amount, the server 1000 may determine a container creation task amount of the node cluster within the target time period, wherein the container creation task amount is primarily used to instruct the node cluster to recreate one or more historical containers (which may be referred to as a first target historical container) based on one or more container retry creation requests (which may be referred to as first target container retry creation requests) within the target time period, wherein the request amount of the first target container retry creation requests is the container creation task amount. That is, the present application can dynamically control the container creation task amount of the node cluster based on the container retry creation request amount and the configured container creation threshold value, so as to reduce the pressure of the node cluster, thereby improving the stability of the resource delivery of the container orchestration system.
It will be appreciated that the method provided by the embodiments of the present application may be performed by a computer device, including but not limited to a terminal device or a server. The terminal device and the server may be directly or indirectly connected through wired or wireless communication, which is not limited herein.
Alternatively, it is understood that the computer device (e.g., the server 1000, the terminal device 100a, the terminal device 100b, etc.) may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the plurality of nodes through a network communication. Among them, a Peer-To-Peer (P2P) network may be formed between nodes, and the P2P protocol is an application layer protocol running on top of a transmission control protocol (TCP, transmission Control Protocol) protocol. In a distributed system, any form of computer device, such as a server, terminal device, etc., can become a node in the blockchain system by joining the point-to-point network. For ease of understanding, the concept of blockchain will be described as follows: the block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like, and is mainly used for sorting data according to time sequence, encrypting the data into an account book, preventing the account book from being tampered and forged, and simultaneously verifying, storing and updating the data. When the computer equipment is a blockchain node, the data (such as node clusters in a container arrangement system, application data of a target application and the like) in the application can have authenticity and safety due to the non-tamperable characteristic and the anti-counterfeiting characteristic of the blockchain, so that the obtained result is more reliable after relevant data processing is carried out based on the data.
In the specific embodiment of the present application, data related to user information, user data (such as user data included in application data) and the like may be acquired only by a user authorization. That is, when the above embodiments of the present application are applied to specific products or technologies, user approval or consent needs to be obtained, and the collection, use and processing of relevant data needs to comply with relevant laws and regulations and standards of relevant countries and regions.
Further, referring to fig. 4, fig. 4 is a flow chart of a data processing method according to an embodiment of the application. The method provided by the embodiment of the application can be applied to various scenes, including but not limited to audio and video, cloud technology, artificial intelligence, intelligent traffic, auxiliary driving and the like. As shown in fig. 3, the method may be performed by a terminal device (e.g., the terminal device of fig. 1 described above), may be performed by a server (e.g., the server of fig. 1 described above), or may be performed by both the terminal device and the server. For ease of understanding, this embodiment will be described by way of example as the method is performed by the above-described server to describe a specific procedure for data processing in the server. Wherein, the method at least comprises the following steps S101-S103:
Step S101, obtaining a container retry creation request amount of a node cluster in a container arrangement system in a target time period; the capacity retry creation request amount refers to the request amount of one or more capacity retry creation requests, and each of the one or more capacity retry creation requests is used for requesting the node cluster to re-create a first history container, wherein the first history container refers to a container that the node cluster fails to create at a history time; the historical moment is earlier than the target period.
In the application, the container arranging system can be Kubernetes (K8 s for short), which is an open-source container arranging system and can schedule, stretch and manage containers. In particular, kubernetes is an open-source application for managing containerization on multiple hosts in a cloud platform, and the goal of Kubernetes is to make deploying containerized applications simple and efficient, and Kubernetes provides a mechanism for application deployment, planning, updating, and maintenance. One or more (typically at least two) compute nodes may be included in Kubernetes, each of which may be used to run a containerized application. A node cluster in an embodiment of the present application may refer to a cluster of one or more computing nodes in a container orchestration system, which when running Kubernetes may be understood as being running a node cluster.
It should be appreciated that an application (e.g., the target application shown in the above embodiments) may correspond to multiple containers, which are served by respective containers in the container orchestration system when an object (e.g., an enterprise) uses the respective application (e.g., the social client shown in the above embodiments). While containers in the container orchestration system may be created by the cluster of nodes. In a container orchestration system such as Kubernetes, when a node cluster fails to create a container (or as a production container), the system generates a retry production request for the container (which the present application may refer to as a container retry creation request) to request the node cluster to recreate the container based on the container retry creation request. In the present application, the computer device (e.g., a server) may collect the number of container retry creation requests (which may be referred to as the container retry creation request amount in the present application) of the node cluster in a period of time, and the computer device may control the number of container creation of the node cluster in a target period of time based on the container retry creation request amount.
It will be appreciated that, as described above, the container retry creation request is a request for the node cluster to re-create a container, that is, if the node cluster fails to create a container at a certain time, the system may generate a container retry creation request for the container to request the node cluster to re-create the container at another time (e.g., a certain time within the target time period), where for convenience of distinction, the container that fails to create the node cluster is referred to as a first history container, and the time that the node cluster creates the first history container and fails to create is referred to as a history time.
The target time period in the embodiment of the present application may refer to a time period that is formed by the first time and the second time. The first time and the second time may refer to the times of retry creation requests of the processing containers before and after the node cluster, respectively (wherein in a feasible embodiment, the second time may be later than the first time, that is, the second time is the later time of the times of retry creation requests of the processing containers before and after, and of course, in a feasible embodiment, the first time may be the later time of the times of retry creation requests of the processing containers before and after, that is, the first time may be later than the second time). For example, assuming that a node cluster processes a container retry creation request every 10 seconds, the first 0 th s may be the first time and the 10 th s may be the second time, the time period (0, 10) consisting of the 0 th s and the 10 th s (the time period does not include the 0 th s and includes the 10 th s) may be the target time period, and the time period (10, 20) consisting of the 10 th s and the 20 th s (the time period does not include the 10 th s and includes the 20 th s) may be the target time period.
Step S102, obtaining a container creatable threshold value of the node cluster in a target time period; the container creatable threshold is based on real-time resource usage data of the node cluster over a target period of time, the determined maximum container creatable number.
In the application, the maximum container creation capacity (which can be called as container creation threshold) of the node cluster in the target time period can be configured based on the real-time resource use data of the node cluster in the target time period, and the specific number of the container retry creation requests processed by the node cluster in the target time period is controlled based on the container creation threshold and the container retry creation request quantity. As can be seen from the foregoing, the target time period may be composed of a first time and a second time, and the real-time resource usage data of the node cluster in the target time period may refer to a resource load of the node cluster at a certain time point in the target time period and a container creation request amount corresponding to the node cluster at the certain time point, where the time point may be any time point in the target time period, and in a specific example, the time point may be an end time point (e.g., the second time point) of the target time period; when the time is the second time, the container creatable threshold value of the node cluster in the target time period can be understood as the corresponding maximum creatable container amount of the node cluster at a certain time when the container retrying creation request needs to be processed, and the quantity of the container retrying creation request of the node cluster at the time can be controlled based on the maximum creatable container amount.
The container creation request amount may refer to a request number of one or more container creation requests of the node cluster, each container creation request may be used to request the node cluster to create a target container. Wherein the one or more container creation requests may include one or more container retry creation requests, then the target container also includes the first history container. That is, the one or more container creation requests may include not only the container retry creation request for the first history container, but also the initial creation requests for other containers.
For a specific implementation of determining the container creativity threshold based on the resource load of the node cluster in the target time period and the container creation request amount, reference may be made to the description in the embodiment corresponding to fig. 6.
Step S103, determining the container creation task amount of the node cluster in the target time period according to the container creation threshold and the container retry creation request amount; the container creation task amount is less than the container creatable threshold; the container creation task amount is used for indicating the node cluster to re-create a first target history container based on a first target container retry creation request in the one or more container retry creation requests in a target time period; the first target container retries the number of requests to create a task amount for the container.
In the application, after determining the container creation threshold, the container creation task amount of the node cluster in the target time can be determined based on the container creation threshold and the container retry creation request amount, wherein the container creation task amount, that is, the number of container retry creation requests that the node cluster needs to process in the target time period, can be used for indicating the node cluster in the target time period, and the corresponding number of container retry creation requests (which can be called as first target container retry creation requests) indicated by the container creation task amount are selected from one or more container retry creation requests, and the first target historical container is recreated based on the first target container retry creation requests.
Specifically, for the container creation task amount determined by the container creation threshold and the container retry creation request amount in the target time period of the node cluster, the specific implementation manner may be as follows: if the container retry creation request is greater than the request threshold, the container creatable threshold may be compared to a standard threshold parameter; when the container creation threshold is larger than the standard threshold parameter, the container creation threshold and the first threshold ratio can be subjected to operation processing to obtain the container creation task quantity; when the container creation threshold is smaller than the standard threshold parameter, the container creation threshold and the second threshold ratio can be operated to obtain the container creation task quantity; the second threshold ratio is less than the first threshold ratio.
It will be appreciated that the request amount threshold and the standard threshold parameter may be specified values (e.g., determined based on human experience) or determined by a machine via an algorithm. The first threshold ratio and the second threshold ratio may be manually specified values. The first threshold ratio may be greater than the second threshold ratio, for example, the first threshold ratio may be 20% and the second threshold ratio may be 5%. When the container retry creation request amount is greater than the request amount threshold value and the container creation threshold value is also greater than the standard threshold value parameter, the number of the container retry creation requests can be indicated to be enough, and when the container creation threshold value is sufficiently large, the node cluster has a certain capacity to quickly process the container retry creation request, and when the container creation task amount is determined, a larger threshold value proportion (for example, a first threshold value proportion) can be selected, and the container creation task amount (for example, the container creation task amount is also larger) can be obtained by performing operation processing (for example, multiplication operation processing) on the container creation threshold value and the first threshold value proportion. When the container retry creation request amount is greater than the request amount threshold, but the container creation threshold is smaller than the standard threshold parameter, the container retry creation request amount may indicate that the container retry creation request amount is sufficiently large, but the container creation threshold is smaller, the current throughput of the node cluster cannot process a large number of container retry creation requests, and a small amount of processing is required, and when determining the container creation task amount, a smaller threshold ratio (for example, a second threshold ratio) may be selected, and the container creation task amount (for example, the container creation task amount is also smaller) may be obtained by performing an operation (for example, a multiplication operation) on the container creation threshold and the second threshold ratio.
Alternatively, it may be understood that, as known from the foregoing, the target time period may refer to a time period formed by a first time and a second time, where the first time and the second time may refer to a time when the processing container retries the creation request twice before and after the node cluster. In a specific application, the real-time resource data (such as resource load, container creation request amount, etc.) of the node cluster does not change greatly in a short time, so in order to avoid that frequent calculation brings additional calculation pressure, the target time period may be set longer, for example, the first time and the second time may refer to times when the node cluster processes the container retry creation request multiple times before and after the node cluster respectively. For example, assuming that the node cluster processes a container retry creation request once every 2s, the first 0s may be used as a first time, the 8 th s may be used as a second time, the time period (0, 8) (the time period does not include the 0 th s and includes the 8 th s) formed by the 0 th s and the 8 th s may be used as the target time period, the time period (8, 16) (the time period does not include the 8 th s and includes the 16 th s) formed by the 8 th s and the 16 th s may also be used as the target time period.
The specific implementation mode of the method can be as follows: when the container creatable threshold is greater than the standard threshold parameter, the updated resource usage data of the node cluster can be obtained in the process of re-creating the first target historical container by the node cluster based on the container creation task amount; updating the resource use data comprises real-time resource load of the node cluster at the current time; wherein the target time period includes a current time; if the real-time resource load is smaller than the load threshold, the first threshold proportion can be increased to obtain a first increased threshold proportion; the first incremental threshold scale is used for determining an update container creation task amount of the node cluster in the residual time period together with the container creation threshold; the remaining time period is a time period formed by the current time and the ending time of the target time period; the update container creation task amount is used for indicating the node cluster to re-create the update history container based on the target update container retry creation request in the update container retry creation request set in the remaining time period; the target update container retries the request quantity of the creation request to create a task quantity for the update container; the update container retry creation request set is a request set obtained by updating one or more container retry creation requests based on the first target container retry creation request.
It can be understood that, in the process of recreating the first target history container by the node cluster based on the task amount created by the container, the real-time resource load of the node cluster at the current time (for a specific implementation manner of acquiring the real-time resource load, the same manner as that of acquiring the first resource load of the node cluster at the second time) can be acquired at a certain moment (such as the current moment), and for a specific manner of acquiring the first resource load of the node cluster at the second time, see the description in the embodiment corresponding to fig. 6. If the real-time resource load of the node cluster is still low (e.g., less than the load threshold) after the container creation threshold is issued, the first threshold proportion may be superimposed, that is, the container creation task amount may be gradually increased along with the superimposed first threshold proportion at the remaining request configuration time of the target time period. For example, the target time period is (8 s,16 s), the determined task amount for creating the container is 10 in the 10 th s, the node cluster can obtain 10 container retry creation requests to create the historical containers corresponding to the requests respectively in the 10 th s, in the process, the real-time resource load of the node cluster can be obtained at a certain moment (such as 9 th s), if the real-time resource load is lower, the first threshold proportion can be increased to obtain the first increasing threshold proportion, when the moment (such as 12 th s) of the next task retry creation request is reached, the container creation threshold can be pre-established according to the first increasing threshold proportion, a new task amount for creating the container (such as 13) is determined, the node cluster can obtain 13 container retry creation requests in the 12 th s, and the historical containers corresponding to the requests respectively are re-created.
It should be appreciated that, in the above-described manner of determining the container creation task amount of the node cluster in the target period in the case where the container retry creation request amount is greater than the request amount threshold, in the case where the container retry creation request amount is less than the request amount threshold, the specific implementation of determining the container creation task amount of the node cluster in the target period according to the container creatable threshold and the container retry creation request amount may be: if the container retry creation request is less than the request threshold, the container creatable threshold may be compared to a standard threshold parameter; when the container creation threshold is larger than the standard threshold parameter, the container creation threshold and the third threshold ratio can be subjected to operation processing to obtain the container creation task quantity; when the container creation threshold is smaller than the standard threshold parameter, the container creation threshold and the fourth threshold ratio can be subjected to operation processing to obtain the container creation task quantity; the fourth threshold ratio is less than the third threshold ratio.
It is understood that the third threshold ratio and the fourth threshold ratio may be artificially defined values. The third threshold ratio may be substantially greater than the fourth threshold ratio (the third threshold ratio may be greater than the first threshold ratio, and the fourth threshold ratio may be less than the second threshold ratio), for example, the third threshold ratio may be 50% and the fourth threshold ratio may be a value less than 5%. When the container retry creation request amount is smaller than the request amount threshold value and the container creation threshold value is larger than the standard threshold value parameter, the number of the container retry creation requests can be indicated to be smaller, under the condition that the container creation threshold value is large enough, the node cluster has extremely large production capacity, the container retry creation requests can be processed quickly, the success rate of container re-creation is extremely high, when the container creation task amount is determined, a larger threshold value proportion (such as a larger third threshold value proportion) can be selected, and the container creation task amount (such as a larger container creation task amount) can be obtained by performing operation processing (such as multiplication operation processing) on the container creation threshold value and the third threshold value proportion. And when the container retry creation request amount is smaller than the request amount threshold value and the container creation threshold value is also smaller than the standard threshold value parameter, it may be indicated that although the container retry creation request amount is small enough, the container creation threshold value is also small, the current throughput of the node cluster cannot process a large amount of container retry creation requests, a small amount of processing is required, in order to maintain the success rate of container creation, a pessimistic task amount determination policy may be adopted, when determining the container creation task amount, a small threshold value ratio (such as a fourth threshold value ratio) may be selected, and an operation (such as a multiplication operation) is performed on the container creation threshold value and the fourth threshold value ratio, so that the container creation task amount (the container creation task amount is also small) may be obtained.
It should be appreciated that for one or more containers retry creation requests, the containers retry creation requests may be ordered in chronological order (e.g., in an early-to-late order) of the request initiation time of each container retry creation request, thereby resulting in a request queue. Then after determining the container creation task amount, the first-in-first-out policy of the queue may be used to obtain and fetch the target container retry creation request (e.g., the first target container retry creation request) from the request queue, i.e., the corresponding number of first target containers retry creation requests indicated by the container creation task amount may be sequentially obtained in the request queue. The node cluster may recreate the first target history container based on the first target container retry creation request, and the production state of the first target history container determines whether the retry creation request of the container will be added again to the request queue. For example, if the first target history container is successfully created, the production state (or referred to as creation state) of the first target history container is a successful state, and the successfully created first target history container may be returned to the object (the object requesting the production container); if the first target historical container fails to be created, the production state (or creation state) of the first target historical container is the failed state, and the first target container can be retried to be added into the request queue again.
When the first target container retries the creation request, which is determined in sequence in the request queue, the first target container may be temporarily stored in the request queue without being fetched from the request queue, and after the creation state of the first target history container is determined, it is determined whether to be fetched from the request queue. For example, if the first target history container is successfully created, the production state (or referred to as the creation state) of the first target history container is a successful state, the successfully created first target history container may be returned to the object (the object requesting the production container), and the first target container retries the creation request to be taken out of the request queue (e.g., deleted); if the first target history container fails to be created, the production status (or creation status) of the first target history container is the failed status, and the first target container retries to create the request and keeps in the request queue.
That is, the first target container retry creation request is obtained by the node cluster sequentially in a request queue, where the request queue is a queue obtained by arranging one or more container retry creation requests in time sequence, and the time sequence is a sequence between request times of each container retry creation request, in which case, a creation state of the first target history container may be obtained; if the creation state is the creation success state, a creation success notification can be generated according to the first target history container, the creation success notification and the first target history container are returned to the target terminal equipment, and the first target container retries the creation request to be deleted from the request queue to obtain an update request queue; wherein, the target terminal device refers to a terminal device corresponding to an object initiating the first target container retry creation request (actually, the terminal device corresponding to the object initiating the creation request of the first target history container; the update request queue is used for sequentially acquiring a second target container retry creation request based on the container creation task amount, and the second target container retry creation request is used for the node cluster to recreate a second target history container in a target time period; if the creation state is the creation failure state, the creation task state corresponding to the first target historical container can be obtained, and the queue processing is carried out on the request queue according to the creation task state; the request queue after queue processing is used for the node cluster to acquire a third target container retry creation request in sequence based on the container creation task amount, and the third target container retry creation request is used for the node cluster to re-create a third target history container in a target time period.
The specific implementation manner of performing queue processing on the request queue according to the creation task state can be as follows: if the created task state is the executing task state, maintaining a request queue; if the creation task state is the cancellation task state, the first target container retries the creation request to be deleted from the request queue.
It may be appreciated that when the creation status of the first target history container is the creation failure status, it may be preferentially determined whether the creation task of the user (which may be understood as an object that initiates the first target container retry creation request) for the container has been cancelled or has timed out, and if the creation task has been cancelled or has timed out, it may be characterized that the first target history container no longer needs to be recreated, and at this time, although the creation of the first target history container fails, the first target container retry creation request may still be deleted from the request queue; if the creation task is not cancelled or is not timed out, the first target history container may be characterized as still needing to be re-created, and the first target container retry creation request may be kept in the request queue.
The foregoing processes of performing corresponding processes on the request queue (such as adding a request, deleting a request, obtaining a target container based on a queue, retrying a creation request, etc.) are all exemplified by the fact that the request queue remains unchanged in the target period. In a possible embodiment, there are newly added container retry creation requests for the node cluster, and these container retry creation requests are also added to the request queue sequentially in the early and late order of time, that is, the request queue is updated in real time, and when corresponding processing based on the request queue is needed, corresponding processing is performed based on the real-time request queue at the current time.
In the embodiment of the application, for the node cluster of the container arranging system, the maximum container creation quantity (namely, container creation threshold) of the node cluster in the target time period can be determined based on the real-time resource use data of the node cluster in the target time period; based on the container creatable threshold and a container retry creation request amount of the node cluster within a target time period (the container retry creation request amount refers to a request amount of one or more container retry creation requests, and each container retry creation request is used for requesting the node cluster to recreate a first historical container, which is in turn referred to as a container that the node cluster fails to create at a historical moment), a container creation task amount of the node cluster within the target time period can be determined, wherein the container creation task amount is used for indicating that the node cluster is within the target time period, and the first target historical container is recreated based on the first target container retry creation request of the one or more container retry creation requests. It can be seen that the application can determine the container creation threshold in real time based on the real-time resource usage data of the node cluster of the container arrangement system, the container creation threshold can be used for representing the container creation capability of the node cluster, and the container creation capability of the node cluster is quantized; the creatable threshold value can dynamically adjust the task quantity of container creation of the node cluster, thereby realizing the quantitative management and control of the node cluster on the container retry creation request, further reducing the blind centralized processing of a large number of container retry creation requests and reducing the pressure brought by continuously retrying the creation requests to the node cluster. In summary, the present application can quantify the container creation capability (or referred to as container production capability) of a node cluster of a container orchestration system by determining a container creation threshold in real time, with configuration and operation utilizing container creation; meanwhile, the container creation task amount is dynamically adjusted through the container creation threshold, quantitative management and control on the retry creation container can be realized, the pressure of the node cluster can be reduced, and the stability of system resource delivery is improved.
For ease of understanding, please refer to fig. 5, fig. 5 is a system architecture diagram for processing a container retry creation request according to an embodiment of the present application. As shown in fig. 5, the system architecture may include a configuration console, a task volume adjuster, a node cluster, a delivery container component, and a retry request queue. Wherein the configuration console may be integrated into a computer device such as the server 1000 described above. For ease of understanding, various portions of the system architecture are described in detail below.
Configuration console: the configuration console may be used to determine that the container of the node cluster within the target time period may create a threshold, that is, the container in embodiments of the present application may create a value for the remaining dynamic change of the threshold, which may be determined based on the real-time resource load of the node cluster within the target time period. For a specific implementation of determining that a container of a node cluster within a target time period may create a threshold, see description in the corresponding embodiment of fig. 6, which follows.
Task amount adjuster: when the configuration console determines the container creatable threshold, the container creatable threshold may be sent to a task volume adjuster, where a container creation task volume of the node cluster within the target time period may be determined based on the container creatable threshold and a length of a retry request queue (i.e., the request queue described above, which may be understood as a container retry creation request volume, the greater the container retry creation request volume, the longer the retry request queue length). For a specific implementation manner of determining the container creation task amount of the node cluster in the target period, reference may be made to the description of determining the container creation task amount of the node cluster in the target period in the embodiment corresponding to fig. 4, which will not be described in detail herein.
Node cluster: when the task quantity regulator determines the container creation task quantity, the container creation task quantity can be issued to the node cluster, and the node cluster can sequentially acquire a corresponding number of retry requests in the retry request queue based on the container creation task quantity and re-create the container.
Delivery container assembly: after the node cluster creates the container, the delivery container component may synchronize the creation state of the container, return to the user if the container is successfully produced, and continue to return the retry request to the retry request queue if the production fails.
In the embodiment of the application, the control strategy of the container creation threshold is added, so that the control is performed on the triggering time of the container retry creation request, the frequency of re-creating the container is limited by controlling the mode of issuing the container creation task amount, the stability of container production can be improved, the stability of node cluster operation is enhanced, and the configuration and operation and maintenance of the container in the container arranging system are facilitated by quantifying the container production capacity of the node cluster.
Further, referring to fig. 6, fig. 6 is a flowchart illustrating a method for determining a container creatable threshold of a node cluster according to an embodiment of the present application. This flow may correspond to the flow of determining the container creativity threshold of the node cluster within the target time period in the embodiment corresponding to fig. 4 described above. As shown in fig. 6, the method may be performed by a terminal device (e.g., the terminal device of fig. 1 described above), may be performed by a server (e.g., the server of fig. 1 described above), or may be performed by both the terminal device and the server. For ease of understanding, this embodiment will be described by way of example as the method is performed by the above-described server to describe a specific procedure for data processing in the server. The process is that the target time period is a time period consisting of a first time and a second time, and the second time is later than the first time; the real-time resource use data comprises a first resource load of the node cluster at a second moment and a container creation request quantity indicated by the first resource load; the container creation request amount refers to the request amount of one or more container creation requests for requesting the node cluster creation target container; the one or more container creation requests include one or more container retry creation requests as an example of the flow described. As shown in fig. 6, the flow may include at least the following steps S401 to S403:
Step S401, acquiring a first resource load of the node cluster at a second time, and acquiring a container creation request amount indicated by the second resource load.
Specifically, taking an example that the node cluster includes a first computing node and a second computing node, a specific implementation manner for obtaining a first resource load of the node cluster at a second time may be: the first maximum computing power resource information and the first occupied computing power resource information of the first computing node at the second time can be obtained, and the second maximum computing power resource information and the second occupied computing power resource information of the second computing node at the second time can also be obtained; according to the first maximum computing power resource information and the first occupied computing power resource information, the first computing power resource utilization rate of the first computing node at the second moment can be determined, and according to the second maximum computing power resource information and the second occupied computing power resource information, the second computing power resource utilization rate of the second computing node at the second moment can be determined; according to the first computing power resource utilization rate and the second computing power resource utilization rate, the first resource load of the node cluster at the second moment can be determined.
The specific implementation manner of determining the first resource load of the node cluster at the second moment according to the first computing power resource utilization rate and the second computing power resource utilization rate may be: the method comprises the steps that a first configuration resource load indicated by a first computing power resource utilization rate and a second configuration resource load indicated by a second computing power resource utilization rate can be obtained; subsequently, a resource load average of the first configuration resource load and the second configuration resource load may be determined, and the resource load average may be determined as the first resource load.
It will be appreciated that the first resource load of the node cluster at the second time instant may be determined by the computational resource utilization of the node cluster at the second time instant. The computing power in the application can refer to the computing power of the computing node, and in the application, the computing power of the computing node can be measured by adopting CPU computing power and GPU computing power. Wherein the CPU power is generally measured using the number of operations per second (Operations per second, OPS); while GPU computing power may have a variety of metrics depending on the type of computation, it is generally measured from two metrics of computing power (measured by Floating-point number of operations performed per second (flow), OPS, half-precision peak computing power, and double-precision peak computing power depending on the type of operation) and data read throughput. For the computing power resources, other computing power resources, such as memory resources, network bandwidth resources, disk resources, and the like, may be included in addition to the CPU computing power resources and the CPU computing power resources. The present application is not limited to what the computing resources include. The description will be given below taking an example in which the computing resources include CPU computing resources and GPU computing resources.
Maximum computing power resource information (for example, total computing power resources provided by the first computing node under the operating frequency and called first maximum computing power resource information) of the first computing node in the node cluster at the second moment can be obtained; and the first computing node being occupied with computing power resource information (which may be referred to as first occupied computing power resource information, such as CPU computing power resources that the first computing node is occupied with when servicing certain applications) at a second time. Similarly, the maximum computing power resource information of the second computing node at the second time (for example, the total computing power resource provided by the second computing node at the operating frequency may be referred to as second maximum computing power resource information); and the second computing node being occupied with computing power resource information at a second time instance (which may be referred to as second occupied computing power resource information, such as CPU computing power resources that the second computing node is occupied with when servicing certain applications). According to the first maximum computing power resource information and the first occupied computing power resource information, a first computing power resource utilization rate of the first computing node at a second moment can be determined (for example, an absolute value of a difference value between the first occupied computing power resource information and the first maximum computing power resource information can be determined, and a ratio between the absolute value of the difference value and the second maximum computing power resource information can be determined, wherein the ratio can be used as the first computing power resource utilization rate). And according to the second maximum computing power resource information and the second occupied computing power resource information, a second computing power resource utilization rate of the second computing node at a second time can be determined (for example, an absolute value of a difference value between the second occupied computing power resource information and the second maximum computing power resource information can be determined, and a ratio between the absolute value of the difference value and the second maximum computing power resource information can be determined, and the ratio can be used as the second computing power resource utilization rate). It may be appreciated that different computing power resource utilization rates may correspond to different resource loads (may be referred to as configured resource loads), and then a first configured resource load indicated by the first computing power resource utilization rate and a second configured resource load indicated by the second computing power resource utilization rate may be obtained, where an average of the first configured resource load and the second configured resource load (may be referred to as a resource load average) may be used as the first resource load of the node cluster in the target period.
Step S402, obtaining a second resource load of the node cluster at the time of abnormal time delay; the time delay abnormal time is the time when the container creation time delay is abnormal, and the container creation time delay is the time delay corresponding to the time delay when the node cluster creates the second historical container in the historical time period; the historical time period is earlier than the first time.
Specifically, taking an example that the node cluster includes a first computing node and a second computing node, a specific implementation manner for obtaining a second resource load of the node cluster at a time of abnormal delay may be: the third maximum computing power resource information and the third occupied computing power resource information of the first computing node at the time of the abnormal time delay can be obtained, and the fourth maximum computing power resource information and the fourth occupied computing power resource information of the second computing node at the time of the abnormal time delay can also be obtained; according to the third maximum computing power resource information and the third occupied computing power resource information, the third computing power resource utilization rate of the first computing node at the time of the abnormal time delay can be determined, and according to the fourth maximum computing power resource information and the fourth occupied computing power resource information, the fourth computing power resource utilization rate of the second computing node at the time of the abnormal time delay can be determined; and according to the third computing power resource utilization rate and the fourth computing power resource utilization rate, determining a second resource load of the node cluster at the time of abnormal time delay.
The specific implementation manner of determining the second resource load of the node cluster at the time of abnormal time delay according to the third computing power resource utilization rate and the fourth computing power resource utilization rate may be: the third configuration resource load indicated by the third computing power resource utilization rate and the fourth configuration resource load indicated by the fourth computing power resource utilization rate can be obtained; subsequently, a resource load average of the third configuration resource load and the fourth configuration resource load (herein referred to as configuration resource load average for ease of distinction) may be determined, and the resource load average may be determined as the second resource load.
It can be understood that when the node cluster produces the history container, the situation of steep rise of the time delay (namely, the situation of occurrence of the time delay burr) occurs, and the occurrence moment of the steep rise of the time delay can be the abnormal moment of the time delay. The historical time period can be the last time period of the target time period, and the second resource load of the node cluster can be determined according to the real-time resource load of each computing node at the time of abnormal time delay.
Step S403, determining a container creatable threshold of the node cluster in the target time period according to the first resource load, the container creation request amount, and the second resource load.
Specifically, for a specific implementation manner of determining a container creatable threshold of a node cluster in a target time period according to a first resource load, a container creation request amount and a second resource load, the specific implementation manner may be: if the first resource load is smaller than the second resource load, the absolute value of the difference between the first resource load and the second resource load can be determined, and according to the absolute value of the difference and the container creation request amount, the container creation threshold of the node cluster in the target time period can be determined.
The specific implementation manner of determining the container creation threshold of the node cluster in the target time period according to the absolute value of the difference value and the container creation request amount may be: the absolute value of the difference may be compared to a difference threshold; if the absolute value of the difference is greater than the threshold value of the difference, a load ratio between the second resource load and the first resource load can be determined, the load ratio, the container creation request amount and the cluster performance buffer value can be subjected to operation processing based on a first threshold value configuration strategy, and a first operation result obtained by operation can be determined as a container creation threshold value; the cluster performance buffer value is configured for the node cluster according to the total number of nodes contained in the node cluster; if the absolute value of the difference is smaller than the difference threshold, the container creation request amount, the difference threshold and the cluster performance buffer value may be subjected to operation processing based on a second threshold configuration policy, and the second operation result obtained by the operation may be determined as the container creation threshold.
It is understood that the first threshold configuration policy may refer to a policy as shown in formula (1), as shown in formula (1):
(B/A-1) N x formula (1)
Wherein B in equation (1) may refer to a second resource load; a may refer to a first resource load; n may be used to characterize the container creation request volume; x may be used to characterize a cluster performance buffer value, which may refer to a buffer value reserved for a node cluster, and is mainly used to reduce a problem that an emergency causes an increase in burrs of a container production delay of the node cluster, thereby affecting resource delivery, where the cluster performance buffer value may be a manually specified value (may be determined based on manual experience). It should be appreciated that when the first resource load is much less than the second resource load, a policy as shown in equation (1) may be employed to determine the container creativity threshold.
It is understood that the second threshold configuration policy may refer to a policy as shown in formula (2), as shown in formula (2):
n10% x formula (2)
Wherein N in equation (2) may be used to characterize the container creation request amount; 10% may be used to characterize the difference threshold (here, 10% is taken as an example, and in practice the difference threshold may be another reasonable value); x may be used to characterize the cluster performance buffer value, which may be the same value as the cluster performance buffer value in equation (1) above. It should be appreciated that when the first resource load is less than the second resource load but the gap is within the difference threshold, a policy as shown in equation (2) may be employed to determine the container creativity threshold.
If the first resource load is greater than the second resource load, the invalid value (e.g., 0) may be directly determined as the container creativity threshold of the node cluster within the target time period. If the threshold value that can be issued is zero, it is indicated that the task cannot be issued at present, and the request for retry is continued to be queued.
In the embodiment of the application, the control strategy of the container creation threshold is added, so that the control is performed on the triggering time of the container retry creation request, the frequency of re-creating the container is limited by controlling the mode of issuing the container creation task amount, the stability of container production can be improved, the stability of node cluster operation is enhanced, and the configuration and operation and maintenance of the container in the container arranging system are facilitated by quantifying the container production capacity of the node cluster.
Further, referring to fig. 7, fig. 7 is a logic flow diagram of a system according to an embodiment of the present application.
As shown in fig. 7, the flow may include at least the following steps S71 to S79:
in step S71, the configuration container may create a threshold.
Step S72, it is determined whether the threshold is 0.
Specifically, if the threshold is 0, the following step S73 may be executed; if the threshold is not 0, the following step S74 may be performed.
Step S73, retrying the creation request to continue enqueuing.
Specifically, if the threshold is 0, it indicates that the task cannot be issued currently, and the received retry request is continuously enqueued.
Step S74, the length of the retry request queue is acquired.
Specifically, if the threshold is not 0, the length of the retry request queue may be obtained.
Step S75, adjusting the container creation task amount.
Specifically, the container creation task amount may be adjusted based on the container creation threshold.
In step S76, the node cluster obtains the target retry request in the retry request queue.
Specifically, the target retry request herein may be a retry creation request as described above for the first target container.
In step S77, the node cluster performs a container re-production operation.
In particular, the cluster of nodes may perform a container re-production operation based on the target retry request.
Step S78, determining whether the node cluster generation is successful.
Specifically, if the node cluster generates the container successfully, a subsequent step S79 may be executed; if the generation of the container fails, step S73 may be performed.
Step S79, return to the container.
Specifically, for the specific implementation of each step from step S71 to step S79, reference may be made to the descriptions in the embodiments corresponding to fig. 4 to fig. 6, which will not be described herein.
In the embodiment of the application, the control strategy of the container creation threshold is added, so that the control is performed on the triggering time of the container retry creation request, the frequency of re-creating the container is limited by controlling the mode of issuing the container creation task amount, the stability of container production can be improved, the stability of node cluster operation is enhanced, and the configuration and operation and maintenance of the container in the container arranging system are facilitated by quantifying the container production capacity of the node cluster.
Further, referring to fig. 8, fig. 8 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application. The data processing apparatus may be a computer program (including program code) running in a computer device, for example the data processing apparatus is an application software; the data processing device may be used to perform the method shown in fig. 3. As shown in fig. 8, the data processing apparatus 1 may include: a request amount acquisition module 11, a threshold acquisition module 12, and a task amount determination module 13.
A request amount acquisition module 11, configured to acquire a container retry creation request amount of a node cluster in the container arrangement system in a target time period; the capacity retry creation request amount refers to the request amount of one or more capacity retry creation requests, and each of the one or more capacity retry creation requests is used for requesting the node cluster to re-create a first history container, wherein the first history container refers to a container that the node cluster fails to create at a history time; the historical moment is earlier than the target time period;
A threshold value obtaining module 12, configured to obtain a container creatable threshold value of the node cluster in the target time period; the container creatable threshold is based on real-time resource usage data of the node cluster within a target time period, the determined maximum container creatable number;
a task amount determining module 13, configured to determine a container creation task amount of the node cluster in the target time period according to the container creation threshold and the container retry creation request amount; the container creation task amount is less than the container creatable threshold; the container creation task amount is used for indicating the node cluster to re-create a first target history container based on a first target container retry creation request in the one or more container retry creation requests in a target time period; the first target container retries the number of requests to create a task amount for the container.
The specific implementation manners of the request amount obtaining module 11, the threshold obtaining module 12, and the task amount determining module 13 may be referred to the description of step S101 to step S103 in the embodiment corresponding to fig. 4, which will not be described herein.
In one embodiment, the target time period is a time period consisting of a first time and a second time, the second time being later than the first time; the real-time resource use data comprises a first resource load of the node cluster at a second moment and a container creation request quantity indicated by the first resource load; the container creation request amount refers to the request amount of one or more container creation requests for requesting the node cluster creation target container; the one or more container creation requests include one or more container retry creation requests;
The threshold acquisition module 12 may include: load acquisition unit 121 and threshold determination unit 122.
A load obtaining unit 121, configured to obtain a first resource load of the node cluster at a first moment;
a load acquisition unit 121, configured to acquire a container creation request amount indicated by the first resource load;
the load obtaining unit 121 is further configured to obtain a second resource load of the node cluster at the time of the abnormal delay; the time delay abnormal time is the time when the container creation time delay is abnormal, and the container creation time delay is the time delay corresponding to the time delay when the node cluster creates the second historical container in the historical time period; the historical time period is earlier than the first moment;
the threshold determining unit 122 is configured to determine, according to the first resource load, the container creation request amount, and the second resource load, a container creatable threshold of the node cluster in the target period.
For a specific implementation manner of the load obtaining unit 121 and the threshold determining unit 122, reference may be made to the descriptions of step S401 to step S403 in the embodiment corresponding to fig. 6, and the description will not be repeated here.
In one embodiment, a cluster of nodes includes a first computing node and a second computing node;
the load acquisition unit 121 may include: a computing power acquisition subunit 1211, a utilization determination subunit 1212, and a load determination subunit 1213.
An computing power obtaining subunit 1211, configured to obtain first maximum computing power resource information and first occupied computing power resource information of the first computing node at the second time, and obtain second maximum computing power resource information and second occupied computing power resource information of the second computing node at the second time;
a utilization rate determining subunit 1212, configured to determine a first utilization rate of the first computing resource of the first computing node at the second time according to the first maximum computing resource information and the first occupied computing resource information, and determine a second utilization rate of the second computing resource of the second computing node at the second time according to the second maximum computing resource information and the second occupied computing resource information;
the load determining subunit 1213 is configured to determine, according to the first computing power resource utilization rate and the second computing power resource utilization rate, a first resource load of the node cluster at the second time.
The specific implementation manner of the calculation force obtaining subunit 1211, the utilization determining subunit 1212 and the load determining subunit 1213 may be referred to the description of step S401 in the embodiment corresponding to fig. 6, which will not be repeated here.
In one embodiment, the load determining subunit 1213 is further specifically configured to obtain a first configuration resource load indicated by the first computing power resource utilization and a second configuration resource load indicated by the second computing power resource utilization;
The load determining subunit 1213 is further specifically configured to determine a resource load average value of the first configuration resource load and the second configuration resource load, and determine the resource load average value as the first resource load.
In one embodiment, the threshold determining unit 122 may include: the first determination subunit 1221 and the second determination subunit 1222.
A first determining subunit 1221, configured to determine an absolute value of a difference between the first resource load and the second resource load if the first resource load is smaller than the second resource load;
the first determining subunit 1221 is further configured to determine, according to the absolute value of the difference and the container creation request amount, a container creatable threshold of the node cluster in the target time period;
a second determining subunit 1222 is configured to determine an invalid value as a container creatable threshold for the node cluster within the target time period if the first resource load is greater than the second resource load.
For a specific implementation manner of the first determining subunit 1221 and the second determining subunit 1222, reference may be made to the description of step S103 in the embodiment corresponding to fig. 6, which will not be repeated here.
In one embodiment, the first determining subunit 1221 is further specifically configured to compare the absolute value of the difference to a difference threshold;
The first determining subunit 1221 is further specifically configured to determine, if the absolute value of the difference is greater than the difference threshold, a load ratio between the second resource load and the first resource load, perform an operation process on the load ratio, the container creation request amount, and the cluster performance buffer value based on a first threshold configuration policy, and determine a first operation result obtained by the operation as a container creatable threshold; the cluster performance buffer value is configured for the node cluster according to the total number of nodes contained in the node cluster;
the first determining subunit 1221 is further specifically configured to, if the absolute value of the difference is smaller than the difference threshold, perform an operation process on the container creation request amount, the difference threshold, and the cluster performance buffer value based on the second threshold configuration policy, and determine a second operation result obtained by the operation as the container creatable threshold.
In one embodiment, the task amount determination module 13 may include: a first parameter comparison unit 131, a first proportion operation unit 132, and a second proportion operation unit 133.
A first parameter comparing unit 131, configured to compare the container creatable threshold with a standard threshold parameter if the container retry creation request amount is greater than the request amount threshold;
A first proportion operation unit 132, configured to perform an operation process on the container creation threshold and the first threshold proportion when the container creation threshold is greater than the standard threshold parameter, so as to obtain a container creation task amount;
a second proportion operation unit 133, configured to perform an operation process on the container creation threshold and the second threshold proportion when the container creation threshold is smaller than the standard threshold parameter, to obtain a container creation task amount; the second threshold ratio is less than the first threshold ratio.
The specific implementation manner of the first parameter comparing unit 131, the first proportional calculating unit 132, and the second proportional calculating unit 133 may be referred to the description of step S103 in the embodiment corresponding to fig. 4, and will not be repeated here.
In one embodiment, the task amount determination module 13 may further include: update data acquisition unit 134 and scale-up unit 135.
An update data obtaining unit 134, configured to obtain update resource usage data of the node cluster in a process of recreating the first target history container based on the container creation task amount when the container creation threshold is greater than the standard threshold parameter; updating the resource use data comprises real-time resource load of the node cluster at the current time; the target time period includes a current time;
A proportion increasing unit 135, configured to increase the first threshold proportion if the real-time resource load is smaller than the load threshold, so as to obtain a first increase threshold proportion; the first incremental threshold scale is used for determining an update container creation task amount of the node cluster in the residual time period together with the container creation threshold; the remaining time period is a time period formed by the current time and the ending time of the target time period; the update container creation task amount is used for indicating the node cluster to re-create the update history container based on the target update container retry creation request in the update container retry creation request set in the remaining time period; the target update container retries the request quantity of the creation request to create a task quantity for the update container; the update container retry creation request set is a request set obtained by updating one or more container retry creation requests based on the first target container retry creation request.
For a specific implementation of the update data obtaining unit 134 and the scale-up unit 135, reference may be made to the description of step S103 in the embodiment corresponding to fig. 4, and the description will not be repeated here.
In one embodiment, the task amount determination module 13 may include: a second parameter comparing unit 136, a third scaling unit 137 and a fourth scaling unit 138.
A second parameter comparing unit 136, configured to compare the container creatable threshold value with the standard threshold value parameter if the container retry creation request amount is smaller than the request amount threshold value;
a third proportion operation unit 137, configured to perform an operation process on the container creation threshold and the third threshold proportion when the container creation threshold is greater than the standard threshold parameter, so as to obtain a container creation task amount;
a fourth proportion operation unit 138, configured to perform an operation process on the container creation threshold and the fourth threshold proportion when the container creation threshold is smaller than the standard threshold parameter, so as to obtain a container creation task amount; the fourth threshold ratio is less than the third threshold ratio.
The specific implementation manner of the second parameter comparing unit 136, the third ratio calculating unit 137 and the fourth ratio calculating unit 138 may be referred to the description of step S103 in the embodiment corresponding to fig. 4, and will not be described herein.
In one embodiment, the first target container retry creation request is obtained by the node cluster sequentially in a request queue, where the request queue is a queue obtained by arranging one or more container retry creation requests in time sequence, and the time sequence is a sequence between request times of each container retry creation request;
The data processing apparatus 1 may further include: a state acquisition module 14, a first queue processing module 15 and a second queue processing module 16.
A state acquisition module 14 for acquiring a creation state of the first target history container;
the first queue processing module 15 is configured to generate a creation success notification according to the first target history container if the creation status is a creation success status, return the creation success notification and the first target history container to the target terminal device, and retry the creation request from the request queue for deletion, so as to obtain an update request queue; the target terminal equipment is the terminal equipment corresponding to the object initiating the first target container retry creation request; the update request queue is used for sequentially acquiring a second target container retry creation request based on the container creation task amount, and the second target container retry creation request is used for the node cluster to recreate a second target history container in a target time period;
the second queue processing module 16 is configured to acquire a creation task state corresponding to the first target history container if the creation state is a creation failure state;
the second queue processing module 16 is further configured to perform queue processing on the request queue according to the created task state; the request queue after queue processing is used for the node cluster to acquire a third target container retry creation request in sequence based on the container creation task amount, and the third target container retry creation request is used for the node cluster to re-create a third target history container in a target time period.
The specific implementation manner of the state obtaining module 14, the first queue processing module 15, and the second queue processing module 16 may be referred to the description of step S103 in the embodiment corresponding to fig. 4, and will not be described herein.
In one embodiment, the second queue processing module 16 may include: a queue holding unit 161, and a request deleting unit 162.
A queue holding unit 161 for holding a request queue if the creation task state is an execution task state;
the request deleting unit 162 is configured to retry the creation request from the request queue for deletion if the creation task status is the cancel task status.
The specific implementation manner of the queue holding unit 161 and the request deleting unit 162 may be referred to the description of step S103 in the embodiment corresponding to fig. 4, and will not be described herein.
In the embodiment of the application, the container creation threshold value can be determined in real time based on the real-time resource usage data of the node cluster of the container arrangement system, and the container creation threshold value can be used for representing the container creation capability of the node cluster and is used for quantifying the container creation capability of the node cluster; the creatable threshold value can dynamically adjust the task quantity of container creation of the node cluster, thereby realizing the quantitative management and control of the node cluster on the container retry creation request, further reducing the blind centralized processing of a large number of container retry creation requests and reducing the pressure brought by continuously retrying the creation requests to the node cluster. In summary, the present application can quantify the container creation capability (or referred to as container production capability) of a node cluster of a container orchestration system by determining a container creation threshold in real time, with configuration and operation utilizing container creation; meanwhile, the container creation task amount is dynamically adjusted through the container creation threshold, quantitative management and control on the retry creation container can be realized, the pressure of the node cluster can be reduced, and the stability of system resource delivery is improved.
Further, referring to fig. 9, fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 9, the data processing apparatus 1 in the embodiment corresponding to fig. 8 may be applied to the computer device 8000, and the computer device 8000 may include: processor 8001, network interface 8004, and memory 8005, and further, the above-described computer device 8000 further includes: a user interface 8003, and at least one communication bus 8002. Wherein a communication bus 8002 is used to enable connected communications between these components. The user interface 8003 may include a Display screen (Display), a Keyboard (Keyboard), and the optional user interface 8003 may also include standard wired, wireless interfaces, among others. Network interface 8004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). Memory 8005 may be a high speed RAM memory or a non-volatile memory, such as at least one disk memory. Memory 8005 may optionally also be at least one memory device located remotely from the aforementioned processor 8001. As shown in fig. 9, an operating system, a network communication module, a user interface module, and a device control application program may be included in the memory 8005, which is one type of computer-readable storage medium.
In the computer device 8000 shown in fig. 9, the network interface 8004 may provide a network communication function; while user interface 8003 is primarily an interface for providing input to the user; and the processor 8001 may be used to invoke a device control application stored in the memory 8005 to implement:
acquiring a container retry creation request amount of a node cluster in a container arranging system in a target time period; the capacity retry creation request amount refers to the request amount of one or more capacity retry creation requests, and each of the one or more capacity retry creation requests is used for requesting the node cluster to re-create a first history container, wherein the first history container refers to a container that the node cluster fails to create at a history time; the historical moment is earlier than the target time period;
acquiring a container creatable threshold value of the node cluster in a target time period; the container creatable threshold is based on real-time resource usage data of the node cluster within a target time period, the determined maximum container creatable number;
determining the container creation task amount of the node cluster in the target time period according to the container creation threshold and the container retry creation request amount; the container creation task amount is less than the container creatable threshold; the container creation task amount is used for indicating the node cluster to re-create a first target history container based on a first target container retry creation request in the one or more container retry creation requests in a target time period; the first target container retries the number of requests to create a task amount for the container.
It should be understood that the computer device 8000 according to the embodiment of the present application may perform the description of the data processing method according to the embodiment of fig. 4 to 6, and may also perform the description of the data processing apparatus 1 according to the embodiment of fig. 8, which is not repeated herein. In addition, the description of the beneficial effects of the same method is omitted.
Furthermore, it should be noted here that: the embodiment of the present application further provides a computer readable storage medium, where a computer program executed by the computer device 8000 for data processing mentioned above is stored, and the computer program includes program instructions, when the processor executes the program instructions, the description of the data processing method in the embodiment corresponding to fig. 4 to 6 can be executed, and therefore, will not be repeated herein. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer-readable storage medium according to the present application, please refer to the description of the method embodiments of the present application.
The computer readable storage medium may be the data processing apparatus provided in any one of the foregoing embodiments or an internal storage unit of the computer device, for example, a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash card (flash card) or the like, which are provided on the computer device. Further, the computer-readable storage medium may also include both internal storage units and external storage devices of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
In one aspect of the application, a computer program product or computer program is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the method provided in an aspect of the embodiment of the present application.
The terms first, second and the like in the description and in the claims and drawings of embodiments of the application are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the term "include" and any variations thereof is intended to cover a non-exclusive inclusion. For example, a process, method, apparatus, article, or device that comprises a list of steps or elements is not limited to the list of steps or modules but may, in the alternative, include other steps or modules not listed or inherent to such process, method, apparatus, article, or device.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The method and related apparatus provided in the embodiments of the present application are described with reference to the flowchart and/or schematic structural diagrams of the method provided in the embodiments of the present application, and each flow and/or block of the flowchart and/or schematic structural diagrams of the method may be implemented by computer program instructions, and combinations of flows and/or blocks in the flowchart and/or block diagrams. These computer program instructions may 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, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or structural diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or structures.
The foregoing disclosure is illustrative of the present application and is not to be construed as limiting the scope of the application, which is defined by the appended claims.
Claims (15)
1. A method of data processing, comprising:
acquiring a container retry creation request amount of a node cluster in a container arranging system in a target time period; the container retry creation request amount refers to the request amount of one or more container retry creation requests, and each container retry creation request in the one or more container retry creation requests is used for requesting the node cluster to re-create a first history container, wherein the first history container refers to a container that the node cluster fails to create at a history moment; the historical moment is earlier than the target time period;
acquiring a container creatable threshold value of the node cluster in a target time period; the container creatable threshold is based on real-time resource usage data of the cluster of nodes within the target time period, the determined maximum container creatable quantity;
determining a container creation task amount of the node cluster in the target time period according to the container creation threshold and the container retry creation request amount; the container creation task amount is less than the container creation threshold; the container creation task amount is used for indicating the node cluster to re-create a first target history container based on a first target container retry creation request in the one or more container retry creation requests in the target time period; the first target container retries the number of requests to create a task amount for the container.
2. The method of claim 1, wherein the target time period is a time period consisting of a first time and a second time, the second time being later than the first time; the real-time resource usage data comprises a first resource load of the node cluster at the second moment and a container creation request quantity indicated by the first resource load; the container creation request amount refers to a request amount of one or more container creation requests for requesting the node cluster to create a target container; the one or more container creation requests include the one or more container retry creation requests;
the acquiring the container of the node cluster in the target time period can create a threshold value, comprising:
acquiring the first resource load of the node cluster at the second moment, and acquiring the container creation request quantity indicated by the second resource load;
acquiring a second resource load of the node cluster at the time of abnormal time delay; the time delay abnormal time is the time when the container creation time delay is abnormal, and the container creation time delay is the time delay corresponding to the time delay when the node cluster creates a second historical container in the historical time period; the historical time period is earlier than the first time;
Determining the container creatable threshold of the node cluster within the target time period according to the first resource load, the container creation request amount and the second resource load.
3. The method of claim 2, wherein the cluster of nodes comprises a first computing node and a second computing node;
the obtaining the first resource load of the node cluster at the second time includes:
acquiring first maximum computing power resource information and first occupied computing power resource information of the first computing node at the second time, and acquiring second maximum computing power resource information and second occupied computing power resource information of the second computing node at the second time;
determining a first computing power resource utilization rate of the first computing node at the second moment according to the first maximum computing power resource information and the first occupied computing power resource information, and determining a second computing power resource utilization rate of the second computing node at the second moment according to the second maximum computing power resource information and the second occupied computing power resource information;
and determining the first resource load of the node cluster at the second moment according to the first computing power resource utilization rate and the second computing power resource utilization rate.
4. The method of claim 3, wherein the determining the first resource load of the node cluster at the second time instance based on the first and second computing power resource utilization rates comprises:
acquiring a first configuration resource load indicated by the first computing power resource utilization rate and a second configuration resource load indicated by the second computing power resource utilization rate;
and determining a resource load average value of the first configuration resource load and the second configuration resource load, and determining the resource load average value as the first resource load.
5. The method of claim 2, wherein the determining the container creatable threshold for the node cluster within the target time period based on the first resource load, the container creation request amount, and the second resource load comprises:
if the first resource load is smaller than the second resource load, determining an absolute value of a difference value between the first resource load and the second resource load, and determining a container creation threshold of the node cluster in the target time period according to the absolute value of the difference value and the container creation request amount;
If the first resource load is greater than the second resource load, determining an invalid value as the container creatable threshold for the node cluster within the target time period.
6. The method of claim 5, wherein the determining the container-creatable threshold for the node cluster within the target time period based on the absolute value of the difference and the container creation request amount comprises:
comparing the absolute value of the difference value with a difference threshold value;
if the absolute value of the difference is larger than the threshold value of the difference, determining a load ratio between the second resource load and the first resource load, performing operation processing on the load ratio, the container creation request amount and a cluster performance buffer value based on a first threshold configuration strategy, and determining a first operation result obtained by operation as the container creation threshold value; the cluster performance buffer value is configured for the node cluster according to the total number of nodes contained in the node cluster;
and if the absolute value of the difference is smaller than the difference threshold, carrying out operation processing on the container creation request quantity, the difference threshold and the cluster performance buffer value based on a second threshold configuration strategy, and determining a second operation result obtained by operation as the container creation threshold.
7. The method of claim 1, wherein the determining the container creation task amount for the node cluster within the target time period based on the container creatable threshold and the container retry creation request amount comprises:
if the container retry creation request is greater than a request threshold, comparing the container creation threshold to a standard threshold parameter;
when the container creation threshold is larger than the standard threshold parameter, carrying out operation processing on the ratio of the container creation threshold to a first threshold to obtain the container creation task quantity;
when the container creation threshold is smaller than the standard threshold parameter, carrying out operation processing on the ratio of the container creation threshold to a second threshold to obtain the container creation task quantity; the second threshold ratio is less than the first threshold ratio.
8. The method of claim 7, wherein the method further comprises:
when the container creation threshold is greater than the standard threshold parameter, acquiring updated resource usage data of the node cluster in the process of re-creating the first target historical container by the node cluster based on the container creation task amount; the updated resource usage data comprises real-time resource load of the node cluster at the current moment; the target time period comprises the current moment;
If the real-time resource load is smaller than the load threshold, increasing the first threshold proportion to obtain a first increasing threshold proportion; the first incremental threshold scale is used for determining an update container creation task amount of the node cluster in a residual time period together with the container creation threshold; the remaining time period is a time period formed by the current time and the ending time of the target time period; the update container creation task amount is used for indicating the node cluster to re-create the update history container based on a target update container retry creation request in an update container retry creation request set in the remaining time period; the target update container retries the request quantity of the creation request to create a task quantity for the update container; the set of update container retry creation requests is a set of requests obtained after updating the one or more container retry creation requests based on the first target container retry creation request.
9. The method of claim 1, wherein the determining the container creation task amount for the node cluster within the target time period based on the container creatable threshold and the container retry creation request amount comprises:
If the container retry creation request is less than a request threshold, comparing the container creation threshold to a standard threshold parameter;
when the container creation threshold is larger than the standard threshold parameter, carrying out operation processing on the ratio of the container creation threshold to a third threshold to obtain the container creation task quantity;
when the container creation threshold is smaller than the standard threshold parameter, performing operation processing on the ratio of the container creation threshold to a fourth threshold to obtain the container creation task quantity; the fourth threshold ratio is less than the third threshold ratio.
10. The method of claim 1, wherein the first target container retry creation request is obtained by the node cluster in a request queue, the request queue being a queue obtained by queuing the one or more container retry creation requests in a chronological order, the chronological order being a sequence between request times of the each container retry creation request;
the method further comprises the steps of:
acquiring the creation state of the first target history container;
if the creation state is a creation success state, generating a creation success notification according to the first target history container, returning the creation success notification and the first target history container to target terminal equipment, and retrying the creation request by the first target container to delete from the request queue to obtain an update request queue; the target terminal equipment is the terminal equipment corresponding to the object initiating the first target container retry creation request; the update request queue is used for the node cluster to sequentially acquire a second target container retry creation request based on the container creation task quantity, and the second target container retry creation request is used for the node cluster to recreate a second target history container in the target time period;
If the creation state is a creation failure state, acquiring a creation task state corresponding to the first target historical container, and carrying out queue processing on the request queue according to the creation task state; the request queue after queue processing is used for the node cluster to acquire a third target container retry creation request in sequence based on the container creation task amount, and the third target container retry creation request is used for the node cluster to recreate a third target history container in the target time period.
11. The method of claim 10, wherein said queuing the remaining request queues according to the create task status comprises:
if the creating task state is the executing task state, maintaining the request queue;
and if the creation task state is the cancellation task state, retrying the creation request by the first target container and deleting the creation request from the request queue.
12. A data processing apparatus, comprising:
the request quantity acquisition module is used for acquiring a container retry creation request quantity of the node cluster in the container arrangement system in a target time period; the container retry creation request amount refers to the request amount of one or more container retry creation requests, and each container retry creation request in the one or more container retry creation requests is used for requesting the node cluster to re-create a first history container, wherein the first history container refers to a container that the node cluster fails to create at a history moment; the historical moment is earlier than the target time period;
A threshold value acquisition module, configured to acquire a container creatable threshold value of the node cluster in a target time period; the container creatable threshold is based on real-time resource usage data of the cluster of nodes within the target time period, the determined maximum container creatable quantity;
a task amount determining module, configured to determine a container creation task amount of the node cluster in the target time period according to the container creatable threshold and the container retry creation request amount; the container creation task amount is less than the container creation threshold; the container creation task amount is used for indicating the node cluster to re-create a first target history container based on a first target container retry creation request in the one or more container retry creation requests in the target time period; the first target container retries the number of requests to create a task amount for the container.
13. A computer device, comprising: a processor, a memory, and a network interface;
the processor is connected to the memory and the network interface, wherein the network interface is configured to provide a network communication function, the memory is configured to store a computer program, and the processor is configured to invoke the computer program to cause the computer device to perform the method of any of claims 1-11.
14. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program adapted to be loaded by a processor and to perform the method of any of claims 1-11.
15. A computer program product, characterized in that the computer program product comprises a computer program stored in a computer readable storage medium, the computer program being adapted to be read and executed by a processor to cause a computer device having the processor to perform the method of any of claims 1-11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210561355.2A CN117149399A (en) | 2022-05-23 | 2022-05-23 | Data processing method, device, equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210561355.2A CN117149399A (en) | 2022-05-23 | 2022-05-23 | Data processing method, device, equipment and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117149399A true CN117149399A (en) | 2023-12-01 |
Family
ID=88901296
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210561355.2A Pending CN117149399A (en) | 2022-05-23 | 2022-05-23 | Data processing method, device, equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117149399A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118170565A (en) * | 2024-05-11 | 2024-06-11 | 中移(苏州)软件技术有限公司 | Cluster resource determination method based on Kubernetes |
-
2022
- 2022-05-23 CN CN202210561355.2A patent/CN117149399A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118170565A (en) * | 2024-05-11 | 2024-06-11 | 中移(苏州)软件技术有限公司 | Cluster resource determination method based on Kubernetes |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9578074B2 (en) | Adaptive content transmission | |
CN114127688A (en) | Method, apparatus and computer readable medium for network-based media processing | |
US8739175B2 (en) | System and method for rerouting a request between virtualization services | |
JP2017126975A (en) | Network traffic scheduling method and device of data center | |
Heien et al. | Computing low latency batches with unreliable workers in volunteer computing environments | |
CN110856018A (en) | Rapid transcoding method and system in monitoring system based on cloud computing | |
US10740139B2 (en) | Method and system for performing hyperconvergence using blockchains | |
CN109254854A (en) | Asynchronous invoking method, computer installation and storage medium | |
CN112579304A (en) | Resource scheduling method, device, equipment and medium based on distributed platform | |
CN111200606A (en) | Deep learning model task processing method, system, server and storage medium | |
CN113703997A (en) | Bidirectional asynchronous communication middleware system integrating multiple message agents and implementation method | |
CN117149399A (en) | Data processing method, device, equipment and readable storage medium | |
CN116304390A (en) | Time sequence data processing method and device, storage medium and electronic equipment | |
CN108111630B (en) | Zookeeper cluster system and connection method and system thereof | |
CN113608751A (en) | Operation method, device and equipment of reasoning service platform and storage medium | |
CN111090818B (en) | Resource management method, resource management system, server and computer storage medium | |
CN108829516B (en) | Resource virtualization scheduling method for graphic processor | |
CN113472638B (en) | Edge gateway control method, system, device, electronic equipment and storage medium | |
CN114385351A (en) | Cloud management platform load balancing performance optimization method, device, equipment and medium | |
CN113645324A (en) | IP distribution method and system based on queue | |
CN113628052A (en) | Block chain asset and contract processing method, system and device based on prediction machine | |
CN115022245A (en) | Data transmission method, related device, equipment and storage medium | |
CN115250276A (en) | Distributed system and data processing method and device | |
CN111984612A (en) | Method, device and system for sharing files | |
CN115525425B (en) | Federal learning calculation engine arrangement method and equipment based on cloud primordial technology |
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 |