CN115145793A - Method and device for adjusting number of container groups, electronic device and storage medium - Google Patents

Method and device for adjusting number of container groups, electronic device and storage medium Download PDF

Info

Publication number
CN115145793A
CN115145793A CN202210912541.6A CN202210912541A CN115145793A CN 115145793 A CN115145793 A CN 115145793A CN 202210912541 A CN202210912541 A CN 202210912541A CN 115145793 A CN115145793 A CN 115145793A
Authority
CN
China
Prior art keywords
preset
theme
parameter
preset theme
format
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
CN202210912541.6A
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.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202210912541.6A priority Critical patent/CN115145793A/en
Publication of CN115145793A publication Critical patent/CN115145793A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a device for adjusting the number of container groups, electronic equipment and a storage medium, wherein the method for adjusting the number of the container groups comprises the following steps: acquiring a preset theme in a cluster, and acquiring a preset theme parameter; carrying out format conversion on the preset theme parameters according to a preset conversion format, wherein the preset conversion format is determined according to the identification data format of the cluster; and adjusting the number of container groups corresponding to the preset theme according to preset parameters and the preset theme parameters after format conversion. The invention can effectively solve the problem that the Pod number is not matched with the actual requirement in the running process of the system, thereby causing resource waste or data accumulation.

Description

Method and device for adjusting number of container groups, electronic device and storage medium
Technical Field
The application relates to the technical field of kubernets cluster control, in particular to a container group quantity adjusting method and device, electronic equipment and a storage medium.
Background
Pod (number of container group) is the minimum unit of deployment in the kubernets system, and a Pod is composed of one or more containers, and containers in the same Pod share a namespace. However, in the existing kubernets cluster, in order to save resources and avoid waste of resources, the pod numbers are consistent. However, this results in the number of Pod not matching the actual demand during the operation of the system, which results in wasting resources or accumulating data. For example, when the ELK platform is used for consuming the data of kafka by logstack, the problem that the log query of the ELK is not real-time due to the fact that the production speed and the consumption speed of kafka are inconsistent exists. Because kafka stores log information collected by filebeat, log generation is 2-3 times more than usual in early and late peak or holidays, and the number of nodes configured in normal times for not wasting resources logstack is fixed, so that when the production speed of kafka is suddenly increased, the consumption speed cannot be automatically adjusted, so that kafka data accumulation is caused, manual increase of nodes is needed to increase the consumption speed, and redundant consumers have resource waste in peak periods (such as 1 to 5 points in the morning).
Disclosure of Invention
In view of the above-mentioned drawbacks of the prior art, the present invention provides a method and apparatus for adjusting the number of container groups, an electronic device, and a storage medium, so as to solve the above-mentioned technical problems.
The invention provides a method for adjusting the quantity of container sets, which comprises the following steps:
acquiring a preset theme in a cluster, and acquiring a preset theme parameter;
carrying out format conversion on the preset theme parameters according to a preset conversion format, wherein the preset conversion format is determined according to the identification data format of the cluster;
and adjusting the number of container groups corresponding to the preset theme according to preset parameters and the preset theme parameters after format conversion.
In an embodiment of the present invention, the preset parameters include:
at least one of the capacity expansion parameter and the capacity reduction parameter, and the adjusting the number of the container groups corresponding to the preset theme according to the preset theme parameter after the preset parameter and the format conversion comprises:
if the preset theme parameter after format conversion is larger than the expansion parameter, increasing the number of container groups corresponding to the preset theme;
and if the preset theme parameter after the format conversion is smaller than the capacity reduction parameter, reducing the number of container groups corresponding to the preset theme.
In an embodiment of the present invention, acquiring a preset topic in a cluster, and acquiring the preset topic parameter includes: constructing a monitoring module and a data collection module of a cluster, and presetting a theme through a preset function of the monitoring module, wherein the preset function is realized in a self-defined mode; the data collection module acquires corresponding preset theme data according to the preset theme and obtains the preset theme parameter based on the preset theme data.
In an embodiment of the invention, the predetermined theme is a production and consumption relationship of Kafka data, and the predetermined theme parameter is a production and consumption relationship value of Kafka data.
In an embodiment of the present invention, the preset theme data includes: the write size of Kafka and the consumption size of Kafka.
In an embodiment of the present invention, after the step of performing format conversion on the preset theme parameter according to a preset conversion format, the method includes: and storing the data after format conversion, generating a key value by using the storage address, and registering the key value into the aggregator.
In an embodiment of the present invention, the adjusting the number of container groups corresponding to the preset theme according to the preset parameter and the preset theme parameter after the format conversion includes: constructing a log acquisition module, and carrying out HPA configuration based on the preset theme; and the HPA acquires the preset theme parameters through the key values and adjusts the number of corresponding container groups according to the preset theme parameters and the preset parameters. The log collection module is logstack.
The invention provides a container group quantity adjusting device, which comprises: the device comprises a presetting module, a data conversion module and an adjusting module. The system comprises a presetting module, a processing module and a processing module, wherein the presetting module is used for acquiring a preset theme in a cluster and acquiring a preset theme parameter; the data conversion module is used for carrying out format conversion on the preset theme parameters according to a preset conversion format, and the preset conversion format is determined according to the identification data format of the cluster; the adjusting module is used for adjusting the number of the container groups corresponding to the preset theme according to preset parameters and the preset theme parameters after format conversion.
A cluster, comprising: the device comprises a monitoring module, a data collecting module, an adapting module, a container group stretching module and a container group. The monitoring module is used for monitoring the cluster and providing a theme configuration function; the data collection module is used for collecting data corresponding to a preset theme according to the preset theme so as to obtain preset theme parameters; the adaptation module is used for carrying out adaptation configuration so that the preset subject parameters can be converted into a data format which can be recognized by the cluster, and the data format can be provided for rule configuration of HPA query adaptation through custom. The container group stretching module is used for expanding or contracting the container group.
The present invention provides an electronic device, including:
one or more processors;
a storage device for storing one or more programs, which when executed by the one or more processors, cause the electronic device to implement the container group quantity adjustment method.
The present invention provides a storage medium having stored thereon a computer program which, when executed by a processor, implements the container group quantity adjustment method.
The invention has the beneficial effects that: the method and the device obtain the preset theme parameters through the preset theme, and adjust the number of the container groups (Pod) based on the preset theme parameters and the preset parameters after format conversion. Therefore, the number of the container groups is always matched with the number of the container groups required by the cluster preset theme, and the configuration of cluster resources is more reasonable.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 is a schematic diagram of a method of adjusting the number of groups of containers according to the present invention;
FIG. 2 is a flow chart of a container group quantity adjustment method of the present invention;
FIG. 3 is a block diagram showing the structure of a container group quantity adjusting apparatus according to the present invention;
FIG. 4 is a block diagram of the structure of a cluster of the present invention;
FIG. 5 is a block diagram of the architecture of the computer system of the present invention.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the disclosure of the present specification, wherein the following description is made for the embodiments of the present invention with reference to the accompanying drawings and the preferred embodiments. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It should be understood that the preferred embodiments are illustrative of the invention only and are not limiting upon the scope of the invention.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the drawings only show the components related to the present invention rather than being drawn according to the number, shape and size of the components in actual implementation, and the type, amount and proportion of each component in actual implementation can be changed freely, and the layout of the components can be more complicated.
In the following description, numerous details are set forth to provide a more thorough explanation of embodiments of the present invention, however, it will be apparent to one skilled in the art that embodiments of the present invention may be practiced without these specific details, and in other embodiments, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring embodiments of the present invention.
HPA (Horizontal Pod Autoscaler) controllers currently support four types of indicators, resource, object, external, and Pods, respectively. Data can be acquired from three aggregated APIs (metrics.k 8s. Io, custom. Metrics.k8s. Io, and external. Metrics.k8s. Io) according to preset indexes, and the pod numbers in the set of stateful set, replica controller, replica set, and the like can be periodically adjusted to achieve the target specified by the user. Wherein custom metric.k 8s.io can provide custom metric data.
Prometheus (k 8s for short) a known open source monitoring system has the characteristics of multiple data dimensions, high storage efficiency, convenience in use, customization of monitoring data required by the system and the like. Prometheus realizes three api interfaces of metrics.k8s.io, custom.metrics.k8s.io and external.metrics.k8s.io, replaces k8s own metrics-server, and provides index data service for HPA.
The prometheus-adapter receives the index query request transmitted from HPA through the apiserver assembler, then transmits a corresponding request to prometheus according to the content to take the index data, and returns the index data to HPA for use after processing.
Referring to fig. 1 and fig. 2, a method for adjusting the number of container sets according to the present invention includes:
and acquiring a preset theme in the cluster, and acquiring the preset theme parameter. The method comprises the steps of constructing a monitoring module and a data collecting module of a cluster, and presetting a theme through a preset function of the monitoring module, wherein the preset function is realized in a user-defined mode. The data collection module acquires corresponding preset theme data according to the preset theme and obtains the preset theme parameter based on the preset theme data. The invention can preset the theme module in the cluster monitoring module by self definition, and can adaptively adjust the Pod number required by various themes.
In an embodiment of the invention, the predetermined theme is a production and consumption relationship of Kafka data, and the predetermined theme parameter is a production and consumption relationship value of Kafka data. Correspondingly, the preset theme data comprises: the write size of Kafka and the consumption size of Kafka.
Carrying out format conversion on the preset theme parameters according to a preset conversion format, wherein the preset conversion format is determined according to the identification data format of the cluster; and storing the data after format conversion, generating a key value by using the storage address, and registering the key value into the aggregator.
Adjusting the number of container groups corresponding to the preset theme according to preset parameters and the preset theme parameters after format conversion: and constructing a log acquisition module, wherein the log acquisition module is logstack. Carrying out HPA configuration based on the preset theme; and the HPA acquires the preset theme parameters through the key values and adjusts the number of corresponding container groups according to the preset theme parameters and the preset parameters. The adjustment basis may be: if the preset theme parameter after format conversion is larger than the expansion parameter, increasing the number of container groups corresponding to the preset theme; and if the preset theme parameter after the format conversion is smaller than the capacity reduction parameter, reducing the number of container groups corresponding to the preset theme. The preset parameters include: at least one of a capacity expansion parameter and a capacity reduction parameter. The preset parameters can be set by workers according to preset themes, and the preset parameters corresponding to different preset themes are different.
Taking Kafka production and consumption relation value as an example, logstack automatically increases nodes to reach a fixed state of consumption speed and production speed, and comprises the following steps:
(1) Installation of prometheus and kafka-exporter generates the required monitoring data
In this step, a new name space needs to be established in the k8s cluster to install prometheus and kafka-exporter; specifically, the method comprises the following steps:
a) Collecting the write quantity of topic and the consumption quantity of a consumption group in kafka by using kafka-exporter;
b) Extracting consumption speed and production speed within 1 minute using a function of prometheus;
c) Calculating the ratio kafka _ speed _ ratio of the production speed to the consumption speed by using the racord, and storing the ratio into the promemeus
After installation of the prometheus, a custom monitoring index is added in the prometheus monitoring system by using a random rule, and the ratio of the production speed to the consumption speed within 1 minute obtained in the expr of the random rule is stored in kafka _ speed _ ratio of the prometheus again
Figure BDA0003774347800000061
Figure BDA0003774347800000071
Loading configuration in a premeheus configuration file, and confirming that the function kafka _ speed _ ratio acquisition value can be inquired in the grah of the premeheus
Figure BDA0003774347800000072
(2) Installing a prometheus adapter; adapter configuration
And installing an adapter connected with prometheus in the same name space, configuring a rule of the adapter, acquiring kafka _ speed _ ratio data, converting the kafka _ speed _ ratio data into a data format which can be identified by k8s, and registering speed _ ratio _ default _ log into an agglegrator.
Because the metric data provided by prometheus cannot be directly used for k8s, the adapter calls the prometheus query data according to the hpa timing, converts the prometheus query data into data which can be identified by k8s and registers the data into the aggregator, and provides the data to the hap query through custom
Rule configuration of adapter
Figure BDA0003774347800000073
Figure BDA0003774347800000081
Call custom. Metrics. K8s. Io api to view k8s data, which is provided to hpa query
Figure BDA0003774347800000082
Figure BDA0003774347800000091
(3) Installing logstack and configuring hpa
Logstack is installed in the same name space and hpa of logstack is configured, which obtains data from custom.
And installing the configuration logstash hpa, and expanding the nodes when the configuration value exceeds 2 times, wherein the configuration value is the ratio kafka _ speed _ ratio of the production speed to the consumption speed.
Figure BDA0003774347800000092
Figure BDA0003774347800000101
The expansion results are shown in the table below.
Figure BDA0003774347800000102
The capacity expansion structure can check k8s data after capacity expansion by calling custom.
Figure BDA0003774347800000103
Figure BDA0003774347800000111
Referring to fig. 3, the present invention provides a container group quantity adjusting device, which includes: the system comprises a presetting module 100, a data conversion module 200 and an adjusting module 300. The system comprises a presetting module, a processing module and a processing module, wherein the presetting module is used for acquiring a preset theme in a cluster and acquiring a preset theme parameter; the data conversion module is used for carrying out format conversion on the preset theme parameters according to a preset conversion format, and the preset conversion format is determined according to the identification data format of the cluster; the adjusting module is used for adjusting the number of the container groups corresponding to the preset theme according to preset parameters and the preset theme parameters after format conversion.
Referring to fig. 4, a cluster includes: a monitoring module 400, a data collection module 500, an adaptation module 600, a container group stretching module 700, and a container group 800. Wherein, the monitoring module 400 is configured to monitor the cluster and provide a theme configuration function; the data collection module 500 is configured to collect data corresponding to a preset theme according to the preset theme so as to obtain a preset theme parameter; the adaptation module 600 is configured to perform adaptation configuration so that the preset topic parameters can be transformed into a data format recognizable by the cluster, and can be provided to the rule configuration of HPA query adaptation through custom. The container group stretching module 700 is used for expanding or contracting the container group 800.
An embodiment of the present application further provides an electronic device, including: one or more processors; the storage device is configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device is enabled to implement the road condition refreshing method provided in each of the above embodiments.
FIG. 5 illustrates a schematic structural diagram of a computer system suitable for use to implement the electronic device of the embodiments of the subject application. It should be noted that the computer system 900 of the electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the application scope of the embodiments of the present application.
As shown in fig. 5, the computer system 900 includes a Central Processing Unit (CPU) 901, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 902 or a program loaded from a storage portion 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for system operation are also stored. The CPU 901, ROM 902, and RAM 903 are connected to each other via a bus 904. An Input/Output (I/O) interface 905 is also connected to bus 904.
The following components are connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 908 including a hard disk and the like; and a communication section 909 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
In particular, according to embodiments of the present application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The computer program executes various functions defined in the system of the present application when executed by a Central Processing Unit (CPU) 901.
It should be noted that the computer readable media shown in the embodiments of the present application may be computer readable signal media or computer readable storage media or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer-readable signal medium may comprise a propagated data signal with a computer-readable computer program embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
Another aspect of the present application also provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor of a computer, causes the computer to execute the road condition refreshing method as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist separately without being incorporated in the electronic device.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Those skilled in the art can modify or change the above-described embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (10)

1. A method for adjusting the number of container groups, comprising:
acquiring a preset theme in a cluster, and acquiring a preset theme parameter;
carrying out format conversion on the preset theme parameters according to a preset conversion format, wherein the preset conversion format is determined according to the identification data format of the cluster;
and adjusting the number of container groups corresponding to the preset theme according to preset parameters and the preset theme parameters after format conversion.
2. The method of adjusting the number of groups of containers according to claim 1, wherein the preset parameters include: at least one of the capacity expansion parameter and the capacity reduction parameter, and the adjusting the number of the container groups corresponding to the preset theme according to the preset theme parameter after the preset parameter and the format conversion comprises:
if the preset theme parameter after format conversion is larger than the expansion parameter, increasing the number of container groups corresponding to the preset theme;
and if the preset theme parameter after the format conversion is smaller than the capacity reduction parameter, reducing the number of container groups corresponding to the preset theme.
3. The method according to claim 1, wherein the obtaining of the preset theme in the cluster and the obtaining of the preset theme parameter comprise: constructing a monitoring module and a data collection module of a cluster, and presetting a theme through a preset function of the monitoring module, wherein the preset function is realized in a self-defined mode; the data collection module acquires corresponding preset theme data according to the preset theme and obtains the preset theme parameter based on the preset theme data.
4. The method according to claim 3, wherein the predetermined theme is a production and consumption relationship of Kafka data, and the predetermined theme parameter is a production and consumption relationship value of Kafka data.
5. The method according to claim 4, wherein the preset theme data includes: the write size of Kafka and the consumption size of Kafka.
6. The method according to claim 1, wherein the step of converting the format of the preset theme parameters according to a preset conversion format is followed by the step of: and storing the data after format conversion, generating a key value by using the storage address, and registering the key value into the aggregator.
7. The method according to claim 6, wherein the adjusting the number of container groups corresponding to the preset theme according to a preset parameter and the preset theme parameter after format conversion comprises: constructing a log acquisition module, and carrying out HPA configuration based on the preset theme; and the HPA acquires the preset theme parameters through the key values and adjusts the number of corresponding container groups according to the preset theme parameters and the preset parameters.
8. A container group quantity adjusting apparatus, characterized in that the container group adjusting apparatus comprises:
the system comprises a presetting module, a parameter setting module and a parameter setting module, wherein the presetting module is used for acquiring a preset theme in a cluster and acquiring a preset theme parameter;
the data conversion module is used for carrying out format conversion on the preset theme parameters according to a preset conversion format, and the preset conversion format is determined according to the identification data format of the cluster;
and the adjusting module is used for adjusting the number of the container groups corresponding to the preset theme according to the preset parameters and the preset theme parameters after format conversion.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
storage means for storing one or more programs that, when executed by the one or more processors, cause the electronic device to implement the container group quantity adjustment method according to any one of claims 1 to 7.
10. A storage medium having stored thereon a computer program which, when executed by a processor, implements the container group quantity adjustment method according to any one of claims 1 to 7.
CN202210912541.6A 2022-07-30 2022-07-30 Method and device for adjusting number of container groups, electronic device and storage medium Pending CN115145793A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210912541.6A CN115145793A (en) 2022-07-30 2022-07-30 Method and device for adjusting number of container groups, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210912541.6A CN115145793A (en) 2022-07-30 2022-07-30 Method and device for adjusting number of container groups, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN115145793A true CN115145793A (en) 2022-10-04

Family

ID=83415068

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210912541.6A Pending CN115145793A (en) 2022-07-30 2022-07-30 Method and device for adjusting number of container groups, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN115145793A (en)

Similar Documents

Publication Publication Date Title
CN112506444A (en) Kubernetes cluster-based expansion and contraction capacity control method and device and electronic equipment
CN109408205B (en) Task scheduling method and device based on hadoop cluster
CN109446032A (en) The method and system of the scalable appearance of Kubernetes copy
CN109614227B (en) Task resource allocation method and device, electronic equipment and computer readable medium
CN102880503A (en) Data analysis system and data analysis method
CN103970520A (en) Resource management method and device in MapReduce framework and framework system with device
CN115373835A (en) Task resource adjusting method and device for Flink cluster and electronic equipment
CN112052082B (en) Task attribute optimization method, device, server and storage medium
CN112099937A (en) Resource management method and device
CN110019537A (en) Local cache method for refreshing, device, computer equipment and storage medium
CN114490078A (en) Dynamic capacity reduction and expansion method, device and equipment for micro-service
CN113141410A (en) Dynamically adjusted QPS control method, system, device and storage medium
CN111190719B (en) Method, device, medium and electronic equipment for optimizing cluster resource allocation
CN114490048A (en) Task execution method and device, electronic equipment and computer storage medium
CN116450353A (en) Processor core matching method and device, electronic equipment and storage medium
KR20200091917A (en) Resource processing method and system, storage medium, electronic device
CN111752916B (en) Data acquisition method and device, computer readable storage medium and electronic equipment
CN110347546B (en) Dynamic adjustment method, device, medium and electronic equipment for monitoring task
CN112463305A (en) Management method, system and related device of cloud virtualization GPU
CN115145793A (en) Method and device for adjusting number of container groups, electronic device and storage medium
CN116185578A (en) Scheduling method of computing task and executing method of computing task
CN111984723A (en) Data synchronization method and device and terminal equipment
CN106033211B (en) A kind of method and device of control gluing board rubber head cleaning
CN111694672B (en) Resource allocation method, task submission method, device, electronic equipment and medium
CN112860292A (en) Configuration management method and device based on application

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