CN114003340A - Elastic expansion method, device and equipment for container cluster and storage medium - Google Patents

Elastic expansion method, device and equipment for container cluster and storage medium Download PDF

Info

Publication number
CN114003340A
CN114003340A CN202111245358.7A CN202111245358A CN114003340A CN 114003340 A CN114003340 A CN 114003340A CN 202111245358 A CN202111245358 A CN 202111245358A CN 114003340 A CN114003340 A CN 114003340A
Authority
CN
China
Prior art keywords
container
target
communication connection
expansion
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111245358.7A
Other languages
Chinese (zh)
Inventor
杨鹏
张剑
张烙铭
李皈颖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN SECURITIES INFORMATION CO Ltd
Southwest University of Science and Technology
Original Assignee
SHENZHEN SECURITIES INFORMATION CO Ltd
Southwest University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHENZHEN SECURITIES INFORMATION CO Ltd, Southwest University of Science and Technology filed Critical SHENZHEN SECURITIES INFORMATION CO Ltd
Priority to CN202111245358.7A priority Critical patent/CN114003340A/en
Publication of CN114003340A publication Critical patent/CN114003340A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45591Monitoring or debugging support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

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 Transfer Between Computers (AREA)

Abstract

The invention discloses a container cluster elastic expansion method, a device, equipment and a storage medium. The elastic expansion and contraction method of the container cluster comprises the following steps: acquiring preset historical data; constructing a target container according to the historical data; establishing a first communication connection between a preset target task and a target container; traversing the target tasks according to the established first communication connection, and screening out idle tasks from the target tasks; constructing an expansion container according to the task number of the idle tasks; establishing a second communication connection between the expansion container and the idle task; the method further comprises one of the following steps: monitoring the target container and the expansion container according to the connection state information of the first communication connection and the second communication connection; or monitoring the target container according to the connection state information of the first communication connection; or monitoring the expansion container according to the connection state information of the second communication connection. Through the technical scheme, the container resources can be monitored, and the use efficiency of the container resources is improved.

Description

Elastic expansion method, device and equipment for container cluster and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a container cluster elastic expansion method, a device, equipment and a storage medium.
Background
As a new generation of virtualization technology, unlike the hardware virtualization of a virtual machine, a container is virtualized at an operating system level, and usually a plurality of containers are run on an operating system kernel, and the container has the characteristic of being lighter: they share the kernel of the operating system, start up faster, and occupy very little memory compared to starting up the whole operating system. Service-based applications are best suited to use containers, run-time checks can be performed on each container, each service is restricted to using only specific resources, and each service is started and stopped independently without interfering with each other. Container organization techniques have emerged, and organization services such as kubernets (k8s) have gained wide acceptance by enterprises.
In the related art, the extended container method generally includes: active expansion and passive expansion. The active capacity expansion means that additional resources are applied in advance in a state that the resources are still sufficient, and preparation is made for a task to be received. Correspondingly, passive capacity expansion refers to applying for additional resources to meet the needs of the existing tasks under the condition of insufficient resources, and has the advantages that the use efficiency of cluster resources is high, and the defects that the tasks are delayed greatly under the condition of large connection quantity are overcome.
Therefore, the traditional method for expanding the container considers more resource information of the server side and expands based on the occupation situation of hardware, and considers less the delay problem of the user side and the problem of low utilization rate of the container resource.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, the invention provides a container cluster elastic expansion method, a device, equipment and a storage medium, which can flexibly monitor container resources and improve the use efficiency of the container resources.
According to the container cluster elastic expansion method in the first aspect embodiment of the invention application, the method comprises the following steps:
acquiring preset historical data;
constructing a target container according to the historical data;
establishing a first communication connection between a preset target task and a target container;
traversing the target tasks according to the established first communication connection, and screening out idle tasks from the target tasks;
constructing an expansion container according to the task number of the idle tasks;
establishing a second communication connection between the expansion container and the idle task;
the elastic expansion and contraction method for the container cluster further comprises one of the following steps:
monitoring the target container and the expansion container according to the connection state information of the first communication connection and the second communication connection;
or
Monitoring the target container according to the connection state information of the first communication connection;
or
And monitoring the expansion container according to the connection state information of the second communication connection.
In the container cluster elastic expansion method of the embodiment, preset historical data is acquired; constructing a target container according to the historical data; establishing a first communication connection between a preset target task and a target container; traversing the target tasks according to the established first communication connection, and screening out idle tasks from the target tasks; constructing an expansion container according to the task number of the idle tasks; establishing a second communication connection between the expansion container and the idle task; the elastic expansion and contraction method for the container cluster further comprises one of the following steps: monitoring the target container and the expansion container according to the connection state information of the first communication connection and the second communication connection; or monitoring the target container according to the connection state information of the first communication connection; or monitoring the expansion container according to the connection state information of the second communication connection. The container resource can be monitored, and the use efficiency of the container resource is improved.
According to some embodiments of the application, comprising:
acquiring a preset data center list;
screening out initial data centers with idle containers according to the data center list;
the empty container is closed by the initial data center.
According to some embodiments of the application, comprising:
predicting the container number of the target container according to historical data;
acquiring a preset target data center;
and constructing a target container of the container quantity through the target data center.
According to some embodiments of the application, comprising:
analyzing and processing the historical data to obtain analysis data;
and performing time series prediction processing on the analysis data to obtain the container number of the target container.
According to some embodiments of the application, comprising:
acquiring position information of a target task;
and screening the target data center from the data center list according to the position information.
According to some embodiments of the application, comprising:
acquiring a distribution proportion for distributing a target container;
in the destination data center, a destination container corresponding to the distribution ratio is constructed.
According to some embodiments of the application, comprising:
if the connection state information of the first communication connection is disconnection, closing the target container;
or
And if the connection state information of the second communication connection is disconnection, closing the expansion container.
A container cluster elastic expansion device according to an embodiment of the second aspect of the present application, comprising:
the acquisition module is used for acquiring preset historical data;
the first construction module is used for constructing a target container according to historical data;
the first communication connection module is used for establishing first communication connection between a preset target task and a target container;
the screening module is used for traversing the target tasks according to the established first communication connection and screening out idle tasks from the target tasks;
the second construction module is used for constructing an expansion container according to the task number of the idle tasks;
the second communication connection module is used for establishing second communication connection between the expansion container and the idle task;
the monitoring module is used for realizing one of the following functions:
the system comprises a first communication connection, a second communication connection, a target container and an expansion container, wherein the first communication connection is used for communicating with the second communication connection;
or
The system comprises a monitoring module, a first communication module, a second communication module and a third communication module, wherein the monitoring module is used for monitoring a target container according to the connection state information of the first communication connection;
or
And the expansion container is monitored according to the connection state information of the second communication connection.
A container cluster elastic expansion device according to an embodiment of the third aspect of the present application, comprising:
at least one memory;
at least one processor;
at least one program;
the program is stored in the memory, and the processor executes at least one program to implement:
a method of elastically telescoping a cluster of containers according to the first aspect of the invention.
A storage medium according to an embodiment of the fourth aspect of the present application stores executable instructions that are executable by a computer to cause the computer to perform a container cluster elastic collapsing method according to the first aspect of the present invention.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The invention is further described with reference to the following figures and examples, in which:
FIG. 1 is a schematic flow chart of a method for elastically stretching a container cluster according to the present invention;
FIG. 2 is a flowchart illustrating a specific process before step S200 in FIG. 1;
FIG. 3 is a flowchart illustrating a specific process of step S200 in FIG. 1;
FIG. 4 is a flowchart illustrating a specific process of step S210 in FIG. 3;
FIG. 5 is a flowchart illustrating a specific process of step S220 in FIG. 3;
fig. 6 is a specific flowchart of step S230 in fig. 3.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
In the description of the present invention, it should be understood that the orientation or positional relationship referred to in the description of the orientation, such as the upper, lower, front, rear, left, right, etc., is based on the orientation or positional relationship shown in the drawings, and is only for convenience of description and simplification of description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention.
In the description of the present invention, the meaning of a plurality is one or more, the meaning of a plurality is two or more, and the above, below, exceeding, etc. are understood as excluding the present numbers, and the above, below, within, etc. are understood as including the present numbers. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present invention, unless otherwise explicitly limited, terms such as arrangement, installation, connection and the like should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific contents of the technical solutions.
In the description of the present invention, reference to the description of the terms "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
First, several terms referred to in the present application are resolved:
a container: a container is a collection of interfaces between components and a platform in an application server, typically within the application server, which is responsible for loading and maintenance. One container can typically only exist within one application server, and one application server can establish and maintain multiple containers, including at least one of the following in some embodiments of the present application: target container, extended container.
A data center; the data centers are globally coordinated networks of devices used to communicate, accelerate, present, compute, store data information over an internet network infrastructure, including in some embodiments of the present application, an initial data center and a target data center.
Data center list: the set of data centers is a data center list.
And (3) target tasks: in some embodiments of the present application, the data connection is performed with a target container or an expansion container, so that the target container or the expansion container is used for loading the target task, thereby achieving load balancing.
A target container: the system and the method are used for solving the problem that the system and the method are not suitable for the data center, and are not suitable for the data center.
And (4) idle container: in some embodiments of the present application, to containers that are not communicatively coupled to a work task.
An initial data center: in some embodiments of the present application, before constructing the target container, the data centers in the query data center list are traversed to screen out the data centers in which the free container exists, i.e., the initial data center.
A target data center: in some embodiments of the present application, the data center closest to the target task is selected according to the proximity principle, and is used for constructing the target container.
The first communication connection: for establishing a first communication connection between the target task and the target container such that the target container is loaded with the target task.
And the second communication connection: and the second communication connection is used for establishing the idle task and the expansion container, so that the expansion container loads the idle task.
As shown in fig. 1, which is a schematic flow chart illustrating an implementation of a container cluster elastic expansion and contraction method provided in an embodiment of the present application, the container cluster elastic expansion and contraction method may include, but is not limited to, steps S100 to S900.
S100, acquiring preset historical data;
s200, constructing a target container according to historical data;
s300, establishing a first communication connection between a preset target task and a target container;
s400, traversing target tasks according to the established first communication connection, and screening out idle tasks from the target tasks;
s500, constructing an expansion container according to the task number of the idle tasks;
s600, establishing a second communication connection between the expansion container and the idle task;
s700, monitoring a target container and an expansion container according to the connection state information of the first communication connection and the second communication connection;
or
S800, monitoring the target container according to the connection state information of the first communication connection;
or
And S900, monitoring the expansion container according to the connection state information of the second communication connection.
In step S100 of some embodiments, preset history data, that is, relevant data for acquiring a work task request issued by a user in each time period in the past by a computer program and performing data connection between the work task request and a data container, is acquired.
Further, data of the past 10 days that the user accessed the data container is selected as the history data.
Optionally, 20 minutes is taken as an interval, the time of each day is divided into a plurality of time periods, and the number of data connections established between the target task and the data container in each time period is counted. And the system is used for analyzing the historical data and actively predicting and constructing the target container.
In some embodiments, referring to fig. 2, the container cluster elastic telescoping method may further include, but is not limited to, steps S101 to S103.
S101, acquiring a preset data center list;
s102, screening out an initial data center with an idle container according to the data center list;
and S103, closing the idle container through the initial data center.
In step S101 of some embodiments, a preset data center list is obtained, and before step S200 is executed to construct a target container according to historical data, the preset data center list is obtained, where the data center list includes a plurality of data centers, and is used to execute step S102 to screen out an initial data center having a free container.
In step S102 in some embodiments, an initial data center with an idle container is screened out according to the data center list, that is, the data centers in the data center list are traversed, a plurality of containers in the plurality of data centers are queried, and a data container with an idle container is found, where the data center with an idle container is the initial data center.
In step S103 of some embodiments, the idle containers are closed by the initial data center, after the initial data center with the idle containers is obtained in step S102, all the idle containers are closed in the initial data center, that is, the data container resources are subjected to capacity reduction processing, so as to avoid the idle containers from wasting the data resources, and meanwhile, in order to execute step S200, the target container is constructed according to the historical data, and an environment is provided by active capacity expansion of the container cluster elastic expansion method, so that the container cluster elastic expansion method of the present application has a more accurate demand for predicted container resources.
In step S200 of some embodiments, the step of specifically executing the step of constructing the target container according to the history data includes: the container number of the target container is predicted according to historical data, a preset target data center is obtained, and the target container with the container number is constructed through the target data center.
In some embodiments, referring to fig. 3, step S200 may include, but is not limited to, steps S210 to S220.
S210, predicting the container number of the target container according to historical data;
s220, acquiring a preset target data center;
and S230, constructing the target container with the container number through the target data center.
In step S210 of some embodiments, the container number of the target container is predicted according to the history data, and the target container number may be predicted by using a prediction algorithm according to the history data acquired in step S100.
Further, the container quantity formula of the predicted target container is as follows:
Figure BDA0003320695480000071
wherein, NumContainer is the container number of the target container, Num is the historical data connection times.
In step S220 of some embodiments, a preset target data center is obtained, and before step S230 is executed, the preset target data center is obtained, specifically: the method comprises the steps of firstly obtaining the position information of a target task, and then screening a target data center from a data center list according to the position information of the target task.
In step S230 of some embodiments, the target containers for constructing the container number by the target data center are specifically: after the target data center in step S220 is acquired, the allocation proportion for allocating the target containers is acquired, and then the target containers corresponding to the allocation proportion are constructed in the target data center.
In some embodiments, referring to fig. 4, step S210 may include, but is not limited to, steps S211 to S212.
S211, analyzing and processing the historical data to obtain analysis data;
s212, performing time series prediction processing on the analysis data to obtain the container number of the target container.
In step S211 of some embodiments, the historical data is analyzed to obtain analysis data, and after the historical data in step S100 is obtained, the historical data is analyzed first, the data of the demand of a single user for accessing the container resource in each past time period is counted, the demand data is sorted, and the demand data is classified according to a fixed interval, so as to obtain the analysis data.
In step S212 of some embodiments, the time-series prediction processing is performed on the analysis data to obtain the container number of the target container, and after the analysis data obtained in step S211 is executed, the time-series prediction algorithm is used to perform the prediction processing on the analysis data to obtain the container number of the target container, which is used for constructing the target container according to the container number.
In some embodiments, referring to fig. 5, step S220 may include, but is not limited to, steps S221 to S222.
S221, acquiring position information of the target task;
s222, screening out a target data center from the data center list according to the position information.
In step S221 of some embodiments, the location information of the target task is obtained, and before step S230 is executed, the target data center needs to be obtained first, and the location information of the target task, that is, the location information of the work task request sent by the user needs to be obtained first, so as to establish a communication connection with the target data center closest to the user.
In step S222 of some embodiments, a target data center is screened from the data center list according to the location information, the location information of the target task is obtained after step S221 is executed, the location information of each data center in the data center list is found, location distance data between the location of the target task and the location of the data center is calculated, and a data center with the smallest location distance data is determined as the target data center by using the principle of proximity, so as to screen the target data center from the target data list.
In some embodiments, referring to fig. 6, step S230 may include, but is not limited to, steps S231 to S232.
S231, acquiring a distribution proportion for distributing the target container;
s232, in the destination data center, a destination container corresponding to the distribution ratio is constructed.
In step S231 of some embodiments, a distribution ratio for distributing the target containers is obtained, and after step S222 is executed, the container number of the target containers obtained in step S212 is proportionally distributed, and the target containers corresponding to the distribution ratio are distributed to the data centers, where the distribution ratio is analyzed according to the historical data in step S100.
In step S232 of some embodiments, in the target data center, a target container corresponding to the distribution ratio is constructed, and when the distribution ratio for distributing the target container is obtained in step S231, the target container is constructed in the target data center according to a preset ratio, and is used for establishing the first communication connection with the preset target task in step S300.
In step S300 of some embodiments, a first communication connection between the preset target task and the target container is established, and after step S232 is completed, the target task sent by the user corresponding to the history data in step S100 is first acquired, and then the first communication connection between the preset target task and the target container established in step S232 is established.
Further, the communication connections between the target containers and the preset target tasks are in one-to-one correspondence, and it can be understood that one target container only loads one target task.
In step S400 of some embodiments, the target task is traversed according to the established first communication connection, and an idle task is screened from the target task, that is, after the preset first communication connection between the target task and the target container is established in step S300, the target task is traversed, and the target task not connected to the target container is screened, so as to obtain the idle task.
In step S500 of some embodiments, an expansion container is constructed according to the number of tasks of the idle task, the idle task obtained after the target task is screened in step S400 is obtained first, the number of tasks of the idle task is counted, and then expansion containers with the same number as the number of idle tasks are constructed in the target data center obtained in step S222, so as to establish the second communication connection between the expansion container and the idle task in step S600.
In step S600 of some embodiments, a second communication connection between the extension container and the idle task is established, and after step S500 is performed and the extension container is constructed according to the number of tasks of the idle task, the second communication connection between the extension container obtained in step S500 and the idle task obtained in step S400 is established.
In step S700 of some embodiments, the target container and the extended container are monitored according to the connection state information of the first communication connection and the second communication connection, and after the step S600 of establishing the second communication connection between the extended container and the idle task is completed, the connection state information of the preset first communication connection between the target task and the target container established in step S300 and the second communication connection between the extended container and the idle task established in step S600 is obtained, and the target container and the extended container are monitored.
In step S800 of some embodiments, the target container is monitored according to the connection status information of the first communication connection, after the second communication connection between the extended container and the idle task is established in step S600, if the connection status information of the first communication connection is disconnection, the target container is closed, that is, the target container established in step S230 has been loaded and processed with the target task with which the first communication connection is performed, and the target container has not been in communication connection with other work tasks, and at this time, the connection status information of the first communication connection is disconnection, the processor closes the target container to release the computer resource.
In step S900 of some embodiments, the extended container is monitored according to the connection status information of the second communication connection, after the second communication connection between the extended container and the idle task is established in step S600, if the connection status information of the second communication connection is disconnection, the extended container is closed, that is, the extended container established in step S500 has been subjected to load processing to complete the idle task in the second communication connection therewith, and the extended container is not in communication connection with other work tasks, and at this time, the connection status information of the second communication connection is disconnection, the processor closes the extended container to release the computer resource.
In some embodiments, a container cluster elastic telescopic device comprises: the acquisition module is used for acquiring preset historical data; the first construction module is used for constructing a target container according to historical data; the first communication connection module is used for establishing first communication connection between a preset target task and a target container; the screening module is used for traversing the target tasks according to the established first communication connection and screening out idle tasks from the target tasks; the second construction module is used for constructing an expansion container according to the task number of the idle tasks; the second communication connection module is used for establishing second communication connection between the expansion container and the idle task; the monitoring module is used for realizing one of the following functions: the system comprises a first communication connection, a second communication connection, a target container and an expansion container, wherein the first communication connection is used for communicating with the second communication connection; or the target container is monitored according to the connection state information of the first communication connection; or the expansion container is monitored according to the connection state information of the second communication connection.
The specific implementation of the elastic expansion device for a container cluster in this embodiment is substantially the same as the specific implementation of the elastic expansion method for a container cluster, and is not described herein again.
In some embodiments, a container cluster elastic telescopic device, comprising: at least one memory; at least one processor; at least one program, wherein the memory is for storing an executable program, which when executed performs the container cluster elastic scaling method as described above.
In some embodiments, the storage medium stores executable instructions that are executable by a computer.
The memory, as a non-transitory storage medium, may be used to store non-transitory software programs as well as non-transitory computer-executable programs. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The embodiments described in the embodiments of the present disclosure are for more clearly illustrating the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation to the technical solutions provided in the embodiments of the present disclosure, and it is obvious to those skilled in the art that the technical solutions provided in the embodiments of the present disclosure are also applicable to similar technical problems with the evolution of technology and the emergence of new application scenarios.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes multiple instructions for causing a computer device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing programs, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The preferred embodiments of the present disclosure have been described above with reference to the accompanying drawings, and therefore do not limit the scope of the claims of the embodiments of the present disclosure. Any modifications, equivalents and improvements within the scope and spirit of the embodiments of the present disclosure should be considered within the scope of the claims of the embodiments of the present disclosure by those skilled in the art.

Claims (10)

1. A method for elastic expansion and contraction of a container cluster, the method comprising:
acquiring preset historical data;
constructing a target container according to the historical data;
establishing a first communication connection between a preset target task and the target container;
traversing the target task according to the established first communication connection, and screening out an idle task from the target task;
constructing an expansion container according to the task number of the idle tasks;
establishing a second communication connection between the expansion container and the idle task;
the method further comprises one of the following steps:
monitoring the target container and the expansion container according to the connection state information of the first communication connection and the second communication connection;
or
Monitoring the target container according to the connection state information of the first communication connection;
or
And monitoring the expansion container according to the connection state information of the second communication connection.
2. The container cluster elastic collapsing method of claim 1, wherein prior to said building a target container from said historical data, said method further comprises:
acquiring a preset data center list;
screening out the initial data centers with idle containers according to the data center list;
closing the free container through the initial data center.
3. The container cluster elastic stretching method of claim 2, wherein the constructing a target container according to the historical data comprises:
predicting the container number of the target container according to the historical data;
acquiring a preset target data center;
constructing the target container of the container number through the target data center.
4. The container cluster elastic expansion method according to claim 3, wherein said predicting the number of containers of the target container from the historical data comprises:
analyzing and processing the historical data to obtain analysis data;
and performing time series prediction processing on the analysis data to obtain the container number of the target container.
5. The method of claim 3, wherein the acquiring the predetermined target data center comprises:
acquiring the position information of the target task;
and screening the target data center from the data center list according to the position information.
6. The container cluster elastic expansion method according to claim 3, wherein said constructing the target container of the container number by the target data center comprises:
acquiring a distribution proportion for distributing the target container;
in the target data center, the target container corresponding to the allocation ratio is constructed.
7. The method of elastic expansion and contraction of a container cluster according to any one of claims 1 to 6,
the monitoring the target container according to the connection state information of the first communication connection includes:
if the connection state information of the first communication connection is disconnection, closing the target container;
or
The monitoring the extended container according to the connection state information of the second communication connection includes:
and if the connection state information of the second communication connection is disconnection, closing the expansion container.
8. Container cluster elastic expansion device, characterized in that, the device includes:
the acquisition module is used for acquiring preset historical data;
the first construction module is used for constructing a target container according to the historical data;
the first communication connection module is used for establishing a first communication connection between a preset target task and the target container;
the screening module is used for traversing the target tasks according to the established first communication connection and screening out idle tasks from the target tasks;
the second construction module is used for constructing an expansion container according to the task number of the idle task;
the second communication connection module is used for establishing second communication connection between the expansion container and the idle task;
a monitoring module for implementing one of the following functions:
the system comprises a first communication connection, a second communication connection, a target container and an expansion container, wherein the first communication connection is used for communicating with the expansion container;
or
The target container is monitored according to the connection state information of the first communication connection;
or
And the expansion container is monitored according to the connection state information of the second communication connection.
9. Container cluster elastic expansion device, characterized in that it comprises:
at least one memory;
at least one processor;
at least one program;
the programs are stored in a memory, and a processor executes the at least one program to implement:
a method of elastically collapsing a cluster of containers according to any one of claims 1 to 7.
10. A storage medium having stored thereon executable instructions executable by a computer to cause the computer to perform:
a method of elastically collapsing a cluster of containers according to any one of claims 1 to 7.
CN202111245358.7A 2021-10-26 2021-10-26 Elastic expansion method, device and equipment for container cluster and storage medium Pending CN114003340A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111245358.7A CN114003340A (en) 2021-10-26 2021-10-26 Elastic expansion method, device and equipment for container cluster and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111245358.7A CN114003340A (en) 2021-10-26 2021-10-26 Elastic expansion method, device and equipment for container cluster and storage medium

Publications (1)

Publication Number Publication Date
CN114003340A true CN114003340A (en) 2022-02-01

Family

ID=79924063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111245358.7A Pending CN114003340A (en) 2021-10-26 2021-10-26 Elastic expansion method, device and equipment for container cluster and storage medium

Country Status (1)

Country Link
CN (1) CN114003340A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582441A (en) * 2018-11-30 2019-04-05 北京百度网讯科技有限公司 For providing system, the method and apparatus of container service
CN110287003A (en) * 2019-06-28 2019-09-27 北京九章云极科技有限公司 The management method and management system of resource
CN112463290A (en) * 2020-11-10 2021-03-09 中国建设银行股份有限公司 Method, system, apparatus and storage medium for dynamically adjusting the number of computing containers
CN113010260A (en) * 2020-09-29 2021-06-22 证通股份有限公司 Elastic expansion method and system for container quantity

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582441A (en) * 2018-11-30 2019-04-05 北京百度网讯科技有限公司 For providing system, the method and apparatus of container service
CN110287003A (en) * 2019-06-28 2019-09-27 北京九章云极科技有限公司 The management method and management system of resource
CN113010260A (en) * 2020-09-29 2021-06-22 证通股份有限公司 Elastic expansion method and system for container quantity
CN112463290A (en) * 2020-11-10 2021-03-09 中国建设银行股份有限公司 Method, system, apparatus and storage medium for dynamically adjusting the number of computing containers

Similar Documents

Publication Publication Date Title
CN111464355A (en) Method and device for controlling expansion capacity of Kubernetes container cluster and network equipment
US7730488B2 (en) Computer resource management method in distributed processing system
CN105373429A (en) Task scheduling method, device and system
CN105049268A (en) Distributed computing resource allocation system and task processing method
CN108900626B (en) Data storage method, device and system in cloud environment
CN112698952A (en) Unified management method and device for computing resources, computer equipment and storage medium
CN116662020B (en) Dynamic management method and system for application service, electronic equipment and storage medium
CN108694083B (en) Data processing method and device for server
CN111796933A (en) Resource scheduling method, device, storage medium and electronic equipment
CN111565216A (en) Back-end load balancing method, device, system and storage medium
CN111143033B (en) Operation execution method and device based on scalable operation system
CN114003340A (en) Elastic expansion method, device and equipment for container cluster and storage medium
CN111367660A (en) Method and system for sharing group shared resources
CN110347502A (en) Load equilibration scheduling method, device and the electronic equipment of cloud host server
CN115827236A (en) Method and system for optimizing load performance of live-action three-dimensional cloud release process
US8850440B2 (en) Managing the processing of processing requests in a data processing system comprising a plurality of processing environments
CN109408230A (en) Docker container dispositions method and system based on energy optimization
CN114924888A (en) Resource allocation method, data processing method, device, equipment and storage medium
CN114489978A (en) Resource scheduling method, device, equipment and storage medium
CN116010019A (en) Memory resource allocation method, related device and equipment
CN111147556A (en) Load balancing method, device, equipment and storage medium
CN114003378B (en) Container cluster load balancing method, device, equipment and storage medium
CN117785486B (en) Environment resource allocation method, device, equipment and medium
US12008402B2 (en) Determining computer resource usage at multiple levels of a container orchestration system hierarchy
CN114745282B (en) Resource allocation model prediction method and device and electronic equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220201

RJ01 Rejection of invention patent application after publication