CN111258710B - System maintenance method and device - Google Patents

System maintenance method and device Download PDF

Info

Publication number
CN111258710B
CN111258710B CN202010023041.8A CN202010023041A CN111258710B CN 111258710 B CN111258710 B CN 111258710B CN 202010023041 A CN202010023041 A CN 202010023041A CN 111258710 B CN111258710 B CN 111258710B
Authority
CN
China
Prior art keywords
server
monitoring data
containers
target
target server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010023041.8A
Other languages
Chinese (zh)
Other versions
CN111258710A (en
Inventor
侯诗军
吴姚笛
孟祥勇
宋小韦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tongdun Holdings Co Ltd
Original Assignee
Tongdun Holdings 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 Tongdun Holdings Co Ltd filed Critical Tongdun Holdings Co Ltd
Priority to CN202010023041.8A priority Critical patent/CN111258710B/en
Publication of CN111258710A publication Critical patent/CN111258710A/en
Application granted granted Critical
Publication of CN111258710B publication Critical patent/CN111258710B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • 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/4557Distribution of virtual machine instances; Migration and load balancing

Abstract

The embodiment of the application provides a system maintenance method and a system maintenance device, wherein the method comprises the following steps: and calculating to obtain third monitoring data according to the first monitoring data sent by each service server, determining the total container number required to be increased when the third monitoring data is greater than or equal to a first preset threshold value, determining a target server according to the load of each service server and the total container number, determining the container number increased in the target server, and increasing a certain number of containers for the target server. The method comprises the steps of using a container technology to run a target application program, monitoring the load of the target application program and the load of a service server in real time, increasing a certain amount of containers in the service server according to the load of the target application program and the load of the service server when the load of the target application program is high, expanding the capacity of the target application program, adjusting the capacity of the target application program in real time, improving the stability of a system, and avoiding the problems of system breakdown and the like caused by untimely adjustment.

Description

System maintenance method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for maintaining a system.
Background
After the application program is released and operated, the system for operating the application program needs to be maintained, the capacity of the application program is adjusted according to the load of the application program, the problems that the load is too high, the user demand cannot be met when the capacity is insufficient and the system resource is wasted due to too large capacity when the load is low are solved.
In the prior art, a virtual machine technology is mainly used for issuing an application program, that is, a certain number of virtual machines are established in a server of a system, and an application program is deployed in each virtual machine. In the system maintenance process, if the load of the application program is high, the number of the virtual machines is increased by manually operating the server by workers so as to increase the capacity of the application program and meet the user requirements, and if the load of the application program is low, the number of the virtual machines is reduced by manually operating the server by workers, the capacity of the application program is reduced, and resource waste is avoided.
In the manual maintenance process, the capacity of the application program cannot be adjusted in time in response to the change of the load, and when the number of the virtual machines is manually adjusted by a worker, much time is needed for establishing the virtual machines and deploying the application program, and the real-time requirement is difficult to meet.
Disclosure of Invention
In view of the foregoing problems, embodiments of the present application provide a system maintenance method, which can solve the problem that in the prior art, real-time performance cannot be met during system maintenance.
Correspondingly, the embodiment of the application also provides a system maintenance device, which is used for ensuring the realization and the application of the method.
In order to solve the above problem, an embodiment of the present application discloses a system maintenance method, which is applied to a control server, and includes:
receiving first monitoring data and second monitoring data respectively sent by each business server, wherein the first monitoring data is used for describing the load of all containers of a target application program deployed in the business server, and the second monitoring data is used for describing the load of the business server;
calculating to obtain third monitoring data according to the first monitoring data sent by each service server, wherein the third monitoring data are used for describing the load of the target application program;
determining a first number of the containers to be added in all the service servers according to the third monitoring data and a first preset threshold value when the third monitoring data is greater than or equal to the first preset threshold value;
determining at least one first target server from the at least one service server according to the second monitoring data and the first number sent by each service server, and determining a second number of the containers which need to be added in the first target server;
sending a first instruction to the first target server to enable the first target server to increase the second number of the containers according to the first instruction.
Correspondingly, the embodiment of the present application further discloses a system maintenance device, which is disposed in the control server, and includes:
the system comprises a receiving module, a load module and a load module, wherein the receiving module is used for receiving first monitoring data and second monitoring data which are respectively sent by each business server, the first monitoring data are used for describing the load of all containers of a target application program deployed in the business server, and the second monitoring data are used for describing the load of the business server;
the calculation module is used for calculating third monitoring data according to the first monitoring data sent by each service server, wherein the third monitoring data are used for describing the load of the target application program;
a first determining module, configured to determine, when the third monitoring data is greater than or equal to a first preset threshold, a first number of the containers that need to be added in all the service servers according to the third monitoring data and the first preset threshold;
a second determining module, configured to determine at least one first target server from the at least one service server according to the second monitoring data and the first number sent by each service server, and determine a second number of the containers that need to be added in the first target server;
a sending module, configured to send a first instruction to the first target server, so that the first target server increases the second number of containers according to the first instruction.
An apparatus is also provided in an embodiment of the present application, comprising a processor and a memory, wherein,
the processor executes the computer program code stored in the memory to implement the system maintenance method described herein.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the system maintenance method described in the present application.
The embodiment of the application has the following advantages:
the method comprises the steps of receiving first monitoring data and second monitoring data sent by each service server respectively, obtaining third monitoring data through calculation according to the first monitoring data sent by each service server, determining a first number of containers needing to be added in all the service servers according to the third monitoring data and a first preset threshold value under the condition that the third monitoring data are larger than or equal to the first preset threshold value, determining at least one first target server from at least one service server according to the second monitoring data and the first number sent by each service server, determining a second number of containers needing to be added in the first target server, and sending a first instruction to the first target server so that the first target server can add the containers of the second number according to the first instruction. The method comprises the steps of running a target application program by using a container technology, monitoring the load of the target application program and the load of a service server in real time in the running process of the target application program, adding a certain amount of containers in the corresponding service server according to the load of the target application program and the load of each service server when the load of the target application program is high, expanding the capacity of the target application program, adjusting the capacity of the target application program in real time, improving the stability of a system, and avoiding the problems of system breakdown and the like caused by untimely adjustment.
Drawings
FIG. 1 illustrates a flow chart of steps of a system maintenance method of the present application;
FIG. 2 illustrates a schematic diagram of an application system of the present application;
FIG. 3 is a flow chart illustrating steps of another system maintenance method of the present application;
fig. 4 shows a block diagram of an embodiment of a system maintenance apparatus according to the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
Referring to fig. 1, a flowchart of steps of a system maintenance method according to the present application is shown, and the system maintenance method provided in this embodiment is suitable for system maintenance to solve a real-time problem in a system maintenance process. The system maintenance method provided in this embodiment may be executed by a system maintenance apparatus, and the system maintenance apparatus may be disposed in the control server. The system maintenance device is typically implemented in software and/or hardware, and the method may include the steps of:
step 101, receiving first monitoring data and second monitoring data respectively sent by each service server.
The first monitoring data is used for describing the load of all containers of the target application program deployed in the business server, and the second monitoring data is used for describing the load of the business server.
Referring to fig. 2, fig. 2 shows a schematic structural diagram of an application system of the present application, and as shown in fig. 2, the application system may include a control server and at least one service server, where the control server is configured to control each service server to run a target application and maintain a running process of the target application. The target application program runs in the service server in a container mode, for example, the control server may generate a container mirror image corresponding to the target application program according to a source code of the target application program and a container mirror image mode, send the container mirror image to each service server, and the service server establishes and runs a plurality of containers corresponding to the target application program in the service server according to the container mirror image, so as to implement the running of the target application program in the service server. The method for creating and operating the container may refer to a method for operating an application program using a container technology in the prior art, which is not described in detail in this embodiment.
In this embodiment, the first monitoring data is used to describe a total load of all containers corresponding to the target application running in the service server. As shown in fig. 2, if a container 1, a container 2, and a container 3 corresponding to a target application are running in the service server 1, the first monitoring data may be the sum of the throughputs of the container 1, the container 2, and the container 3 and/or the sum of TPS (Transaction throughput Per Second). The service server collects the throughput or TPS of each container in real time, obtains first monitoring data according to the throughput or TPS of each container, for example, the service server 1 may collect the throughputs of the container 1, the container 2, and the container 3, and obtains the first monitoring data after adding the throughputs of the container 1, the container 2, and the container 3. The second monitoring data is used to describe the load of the service server, for example, the second monitoring data may be the usage rate of a Central Processing Unit (CPU) and/or a memory of the service server 1, and represents the load capacity of the service server 1.
The business server can acquire the first monitoring data and the second monitoring data in real time and send the first monitoring data and the second monitoring data to the control server. The control server may receive the first monitoring data and the second monitoring data respectively sent by each service server, and is used to determine the load level of each service server and determine the load levels of all containers of the target application program running in each service server. The prior art may be referred to in the process of receiving, by the control server, the first monitoring data and the second monitoring data sent by the service server, which is not limited in this embodiment.
In practical use, specific parameters included in the first monitoring data and the second monitoring data may be selected according to practical requirements, which is not limited in this embodiment.
And 102, calculating to obtain third monitoring data according to the first monitoring data sent by each service server.
And the third monitoring data is used for describing the load of the target application program, and represents the total load of all containers corresponding to the target application program, which run in all the business servers.
In this embodiment, after receiving the first monitoring data sent by each service, the control server may calculate, according to the first monitoring data sent by each service server, third monitoring data corresponding to the target application program. In conjunction with step 101, if the first monitoring data selects the throughput parameter of the container, after receiving the sum of the throughputs of the container 1, the container 2, and the container 3, the sum of the throughputs of the container 4, the container 5, and the container 6, and the sum of the throughputs of the container 7, the container 8, and the container 9, sent by the service server 1, sent by the service server 2, the control server may add the first monitoring data sent by the service server 1, the service server 2, and the service server 3, respectively, to obtain third monitoring data, that is, the sum of the throughputs of the container 1 to the container 9, where the sum of the throughputs of the container 1 to the container 9 represents the total throughput of the target application program.
It should be noted that, the method for obtaining the third monitoring data by calculating according to the first monitoring data may be set according to specific parameters included in the first monitoring data, which is not limited in this embodiment.
Step 103, determining a first number of containers to be added in all the service servers according to the third monitoring data and the first preset threshold value when the third monitoring data is greater than or equal to the first preset threshold value.
The first number represents the number of containers that need to be increased for the target application, that is, the container capacity that needs to be increased in the entire system when the capacity of the target application needs to be increased.
With reference to step 101 and step 102, the third monitoring data is used to describe the load of the target application program, and when the third monitoring data is greater than or equal to the first preset threshold, it indicates that the load of the target application program is high, and the capacity of the target application program needs to be expanded. For example, the first preset threshold may be set to 100 million (the preset total throughput of the target application), and if the third monitoring data is 120 million, it indicates that the throughput of the target application at this time has exceeded the preset throughput (the first preset threshold), and the throughput of the target application needs to be increased. At this time, a difference (20 megabytes) between the third monitoring data and the first preset threshold value may be determined, and the number of containers that need to be increased may be determined based on the difference between the third monitoring data and the first preset threshold value. For example, if a throughput of 5 million can be increased per one container added, it may be determined that a total of 4 (a first number) containers need to be added in the service server 1, the service server 2, and the service server 3. The size and form of the first preset threshold may be set according to the third monitoring data, which is not limited in this embodiment.
In practical use, the method for determining the first quantity according to the third monitoring data and the first preset threshold may be selected according to requirements, which is not limited in this embodiment.
And step 104, determining at least one first target server from the at least one service server according to the second monitoring data and the first quantity sent by each service server, and determining a second quantity of containers which need to be added in the first target server.
When the first target server is the service server capable of increasing the capacity of the target application program, the service servers of the containers can be added in all the service servers, and the second number is the number of the containers which can be added in the first target server.
In this embodiment, the second monitoring data is used to describe the load of the service servers, and when containers are added to the service servers, a first number of containers may be allocated to the plurality of service servers according to the load of each service server. Therefore, it is necessary to determine a first target server, i.e., a business server to which a container can be added, from among a plurality of business services, and determine the number of containers (second number) to which the first target server can be added. With reference to steps 101 to 103, if the CPU usage of the service server 1 is 90%, the CPU usage of the service server 2 is 80%, and the CPU usage of the service server 3 is 70%, it may be determined that the load of the service server 1 is high and the load of the service server 3 is low. At this time, it may be determined that the service server 3 is the first target server, and 4 (second number) containers are added to the service server 3. Or determining the service server 2 and the service server 3 as a first target server, adding 2 (second number) containers in the service server 3, and adding 2 (second number) containers in the service server 2. The method for determining the first target server according to the second monitoring data and the first number sent by each service server and determining the second number of containers to be added to the first target server may be set according to the requirement, and this embodiment does not limit this.
Step 105, sending a first instruction to the first target server, so that the first target server increases a second number of containers according to the first instruction.
In this embodiment, after determining the first target server and determining the second number of containers that need to be added in the first target server, the first instruction may be sent to the first target server, where the first instruction may include the second number, and accordingly, after receiving the first instruction, the first target server may parse the first instruction, thereby determining the second number and adding the containers of the second number. Specifically, the process of sending the first instruction to the first target server, and the process of establishing the second number of containers by the first target server according to the first instruction may refer to the process of establishing the containers in the prior art, which is not limited in this embodiment.
To sum up, the system maintenance method provided by the embodiment of the present application includes: the method comprises the steps of receiving first monitoring data and second monitoring data sent by each service server respectively, obtaining third monitoring data through calculation according to the first monitoring data sent by each service server, determining a first number of containers needing to be added in all the service servers according to the third monitoring data and a first preset threshold value under the condition that the third monitoring data are larger than or equal to the first preset threshold value, determining at least one first target server from at least one service server according to the second monitoring data and the first number sent by each service server, determining a second number of containers needing to be added in the first target server, and sending a first instruction to the first target server so that the first target server can add the containers of the second number according to the first instruction. The method comprises the steps of running a target application program by using a container technology, monitoring the load of the target application program and the load of a service server in real time in the running process of the target application program, increasing a certain amount of containers in the service server according to the load of the target application program and the load of the service server when the load of the target application program is higher, expanding the capacity of the target application program, adjusting the capacity of the target application program in real time, improving the stability of a system, and avoiding the problems of system collapse and the like caused by untimely adjustment.
Referring to FIG. 3, a flow chart of the steps of another system maintenance method of the present application is shown, the method comprising the steps of:
step 301, sending a fifth instruction to each service server.
And the fifth instruction is used for enabling each service server to establish and run an eighth number of containers according to the fifth instruction respectively so as to deploy the target application program, wherein the eighth number is the number of containers preset by the user.
In this embodiment, in the development process of the target application program, a developer may store the source code of the target application program in a repository (Gitlab). When the target application program is released, the control server may obtain the source code of the target application program from the storage repository, obtain a container image template (Dockerfile) from an application container engine (Docker), and generate a container image according to the container image template and the source code of the target application program. The control server may store the container image in a container image repository after generating the container image. For example, a private container mirror library (harbor) may be established, and after the container mirror is generated, the container mirror is sent to the container mirror library, and the container mirror is stored using the container mirror library. The process of generating the container mirror image is specifically performed, a container mirror image library is established, and the prior art can be referred to for the process of storing the container mirror image through the container mirror image library, which is not described in detail herein.
Alternatively, a container mirror library may be established in each business server.
As shown in fig. 2, a container mirror library may be established in the service server 1, the service server 2, and the service server 3, respectively, and the control server may send a container mirror of the target application to the service server 1, the service server 2, and the service server 3, respectively, to store the container mirror of the target application in each service server, respectively.
In this embodiment, the fifth instruction may include a container mirror identifier corresponding to the target application, the eighth number, and container mirror configuration information. After receiving the fifth instruction, the service server may analyze the fifth instruction, determine the number of containers to be established and operated according to the eighth number, obtain corresponding container images from the container image library according to the container image identifiers, and establish an eighth number of containers according to the container images and the container configuration information after obtaining the container images. For example, after receiving the fifth instruction, the service server 3 may obtain a container mirror image corresponding to the target application program from the container mirror library 3 in the service server 3 according to the container mirror image identifier included in the fifth instruction, and establish the container 7, the container 8, and the container 9 according to the obtained container mirror image and the container configuration information. The container mirror image library is established in each service server, and the container mirror images of the target application programs are stored, so that when the service servers establish the containers, the container mirror images can be conveniently and quickly acquired, the containers can be quickly established, and the efficiency is improved. The prior art may be referred to in the process of specifically acquiring the container mirror image and establishing the container according to the container mirror image and the container configuration information, and this embodiment does not limit this.
Step 302, receiving first monitoring data and second monitoring data respectively sent by each service server.
Step 303, calculating to obtain third monitoring data according to the first monitoring data sent by each service server.
And step 304, determining a first number of containers which need to be added in all the service servers according to the third monitoring data and the first preset threshold value under the condition that the third monitoring data is greater than or equal to the first preset threshold value.
And 305, determining at least one first target server from the at least one business server according to the second monitoring data and the first quantity sent by each business server, and determining a second quantity of containers needing to be added in the first target server.
The process of determining at least one first target server from at least one service server and determining the second number of containers to be added to the first target server according to the second monitoring data and the first number sent by each service server may be implemented as follows:
sequencing each service server according to the second monitoring data sent by each service server to obtain a sequencing result;
and determining a first target server according to the sequencing result, and determining a second number of containers which need to be added in the first target server.
In this embodiment, all the service servers may be sorted according to the second monitoring data sent by each service server to obtain a sorting result. In combination with step 104, the service servers 1, 2 and 3 may be sorted according to the CPU utilization of each service server, so as to obtain a sorting result that the service server 1 is larger than the service server 2, and the service server 2 is larger than the service server 3. The load of each service server can be determined according to the sorting result so as to determine the number of containers allocated to each service server. As can be seen from the sorting result, the load of the service server 3 is the lowest, and more containers can be allocated to the service server 3 and fewer containers can be allocated to the service server 1. Specifically, 2 containers (second number) may be allocated to the service server 1, and 1 container (second number) may be allocated to the service server 1 and the service server 2, respectively. The service servers are ranked according to the second monitoring data sent by each service server, the first number of containers are distributed in the plurality of service servers according to the ranking result, the first number of containers can be more reasonably distributed to each service server, a large number of containers are prevented from being distributed to the service servers with higher loads, and the loads of the service servers are increased. The process of allocating the containers according to the sorting result may be set according to actual requirements, and this embodiment does not limit this.
Step 306, sending a first instruction to the first target server, so that the first target server increases a second number of containers according to the first instruction.
In this embodiment, the first instruction may include a container mirror identifier, a second number, and container configuration information. After receiving the first instruction, the service server (the first target server) may parse the first instruction, and determine the container image identifier, the second number, and the container configuration information included in the first instruction. And acquiring corresponding container mirror images from the container mirror image library according to the container mirror image identifiers, and establishing a second number of containers according to the container mirror images and the container configuration information after the container mirror images are acquired. For example, after receiving the first instruction, the service server 1 may obtain a container mirror image corresponding to the target application program from the container mirror library 1 in the service server 1 according to the container mirror image identifier included in the first instruction, and establish 1 container according to the obtained container mirror image and the container configuration information.
And 307, determining a third number of containers to be reduced in all the service servers according to the third monitoring data and the second preset threshold value under the condition that the third monitoring data is less than or equal to the second preset threshold value.
The third number represents the number of containers that need to be reduced in all the service servers for the target application, that is, the reduced container capacity is needed when the capacity of the target application needs to be reduced.
In this embodiment, the third monitoring data is less than or equal to the second preset threshold, which indicates that the load of the target application program is low, and part of resources in the target application program are idle, so that a certain number of containers can be reduced, and resources of the service server are released, so that the service server performs other services, thereby improving the service efficiency of the service server.
With reference to the first embodiment, if the second preset threshold is 20 megabytes and the third monitoring data is 10 megabytes, it may be determined that the load of the target application is low, and the number of containers may be reduced. Specifically, a difference value (10 million) between the third monitoring data and a second preset threshold may be calculated, and a total of 2 (a third number) containers may be reduced in the service server 1, the service server 2, and the service server 3 according to the determination of the difference value between the third monitoring data and the second preset threshold, so as to reduce the capacity of the target application. The method for determining the third quantity according to the third monitoring data and the second preset threshold may be selected according to the requirement, which is not limited in this embodiment
And 308, determining at least one second target server from the at least one service server according to the second monitoring data and the third quantity sent by each service server, and determining a fourth quantity of containers needing to be reduced in the second target server.
Wherein the fourth number represents the number of containers that need to be reduced in the second target server when reducing the capacity of the target application.
In combination with the first embodiment, when the containers of the target application are reduced, a third number of containers may be allocated in the multiple traffic servers according to the load of each traffic server. Specifically, the load of each service server may be determined according to the second monitoring data sent by each service server, the second target server may be determined according to the load of each service server, and the number of containers (the fourth number) that need to be reduced in the second target server may be determined. With reference to the foregoing example, when it is determined that the load of the service server 1 is high and the load of the service server 3 is low, it may be determined that the service server 1 is the second target server, and 2 (the fourth number) containers are directly reduced in the service server 1. It may also be determined that the service server 1 and the service server 2 are simultaneously the second target server, and 1 (fourth number) of containers may be respectively reduced for the service server 1 and the service server 2.
It should be noted that, when the containers of the target application program are reduced, the service servers may also be sorted according to the second monitoring data, the second target servers are determined according to the sorting result, and the fourth number corresponding to each second target server is determined, which is not limited in this embodiment.
Step 309, sending a second instruction to the second target server, so that the second target server reduces the fourth number of containers according to the second instruction.
In this embodiment, the second instruction may include the fourth number and the container identifier. In actual use, the business server can simultaneously run containers of a plurality of target application programs. The second instruction comprises a fourth quantity and a container identifier, the service server can analyze the second instruction after receiving the second instruction, determine a container corresponding to the target application program according to the container identifier included in the second instruction, and close the container corresponding to the fourth quantity and the container identifier. The process of the service server reducing the containers may refer to the prior art, which is not limited by this embodiment.
Optionally, the method may further include:
in response to a user operation, a fifth number of containers that need to be added or subtracted in all of the traffic servers is determined.
And determining at least one third target server from the at least one business server according to the second monitoring data and the fifth number sent by each business server, and determining a sixth number of containers needing to be added or reduced in the third target server.
And sending a third instruction to the third target server to enable the third target server to increase or decrease the sixth number of containers according to the third instruction.
In this embodiment, the control server may determine, in response to the operation of the user, a fifth number of containers that need to be added or subtracted in all the service servers according to the operation of the user, that is, determine, according to the user requirement, that the capacity of the target application program needs to be increased or decreased, and determine the specific number of containers. In actual use, a user needs to actively adjust the capacity of the target application program according to the running condition of the target application program. For example, the user may manually increase the capacity of the target application (increase a number of containers) when the user access increases and decrease the capacity of the target application (decrease a number of containers) when the user access decreases for a particular period of time.
For example, the user may operate the client, send an increase or decrease instruction to the server through the client, and the fifth number. After receiving the increase or decrease instruction sent by the client, the control server may determine a third target server according to the second monitoring data and the fifth quantity sent by each service server, and determine a sixth quantity. The process of determining the third target server and the sixth number by the control server according to the second monitoring data and the fifth number sent by each service server may refer to the process of determining the second target server and the second number by the control server according to the first number and the second monitoring data sent by each service server in the foregoing embodiment, which is not described herein again in this embodiment. The control server can respond to the operation of the user, determine the number of the containers which need to be increased or decreased, increase or decrease a certain number of containers in the corresponding service server to control the capacity of the target application program, adjust the capacity of the target application program according to the user requirement, improve the flexibility of system maintenance and improve the operation efficiency of the system.
Optionally, the method may further include:
determining the number of containers deployed in a fourth target server under the condition that the fourth target server is determined to be in fault, wherein the fourth target server is any one of the at least one service server;
determining at least one fifth target server from all the business servers except the fourth target server according to the second monitoring data sent by each business server except the fourth target server and the number of containers deployed in the fourth target server, and determining a seventh number of containers required to be added in the fifth target server
And sending a fourth instruction to the fifth target server to enable the fifth target server to increase the seventh number of containers according to the fourth instruction.
In this embodiment, the control server may monitor the operation state of each service server, and when it is determined that a certain service server fails and cannot operate a container, a certain amount of containers may be added to the service server that normally operates, so as to maintain the capacity of the target application program unchanged, so as to improve the stability of the target application program.
Specifically, the control server may receive a failure signal sent by each service server, for example, when the control server receives the failure signal of the service server 1 (fourth target server), it may determine that the service server 1 fails and cannot operate the container. If the service server 1 is deployed with 10 containers, 10 containers may be added to the service server 2 and the service server 3, and the number of containers is kept unchanged, so as to keep the capacity of the target application program unchanged. The method for determining the fifth target server from the service server 2 and the service server 3 by the control server according to the number of containers deployed by the service server 1 and the second monitoring data respectively sent by the service server 2 and the service server 3 may refer to the foregoing embodiment, and the process for determining the first target server and the second target server by the control server according to the first number and the second monitoring data sent by each service server is not described herein in detail in this embodiment. The method for determining the fault of the service server by the control server may be determined according to actual requirements, for example, the fault of the service server may be determined under the condition that the first monitoring data and the second monitoring data sent by the service server are not received within a preset time length, which is not limited in this embodiment.
In this embodiment, the control server may increase a certain number of containers when the load of the target application is high, decrease a certain number of containers when the load is low, and may automatically adjust the capacity of the target application, thereby avoiding the problems of tedious operation and long time consumption when manually adjusting the capacity of the target application, improving the real-time performance of system maintenance, and flexibly adjusting the capacity of the target application according to the load, and improving the operating efficiency of the system. Meanwhile, when the service server fails, a certain number of containers can be automatically added to the normally running service server, so that the capacity of the target application program is kept unchanged, and the stability of the system can be improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the embodiments. Further, those of skill in the art will recognize that the embodiments described in this specification are presently preferred embodiments and that no particular act is required to implement the embodiments of the disclosure.
Referring to fig. 4, a block diagram of a system maintenance apparatus according to an embodiment of the present disclosure is shown, which may specifically include the following modules: a receiving module 401, a calculating module 402, a first determining module 403, a second determining module 404 and a sending module 405.
The receiving module 401 is configured to receive first monitoring data and second monitoring data that are respectively sent by each service server, where the first monitoring data is used to describe load levels of all containers of a target application deployed in the service server, and the second monitoring data is used to describe load levels of the service server.
The calculating module 402 is configured to calculate third monitoring data according to the first monitoring data sent by each service server, where the third monitoring data is used to describe load of the target application program.
The first determining module 403 is configured to determine, according to the third monitoring data and the first preset threshold, a first number of containers that need to be added in all the service servers, when the third monitoring data is greater than or equal to the first preset threshold.
The second determining module 404 is configured to determine at least one first target server from the at least one service server according to the second monitoring data and the first number sent by each service server, and determine a second number of containers that need to be added in the first target server.
The sending module 405 is configured to send a first instruction to the first target server, so that the first target server increases the containers by a second number according to the first instruction.
Optionally, in an optional embodiment of the present application, the first determining module 403 is further configured to determine, when the third monitoring data is less than or equal to a second preset threshold, a third number of containers that need to be reduced in all the service servers according to the third monitoring data and the second preset threshold.
The second determining module 404 is further configured to determine at least one second target server from the at least one service server according to the second monitoring data and the third number sent by each service server, and determine a fourth number of containers that need to be reduced in the second target server.
The sending module 405 is further configured to send a second instruction to the second target server, so that the second target server reduces the fourth number of containers according to the second instruction.
Optionally, in an optional embodiment of the present application, the first determining module 403 is further configured to determine, in response to a user operation, a fifth number of containers that need to be added or subtracted in all the service servers.
The second determining module 404 is further configured to determine at least one third target server from the at least one service server according to the second monitoring data and the fifth number sent by each service server, and determine a sixth number of containers that need to be added or subtracted in the third target server.
The sending module 405 is further configured to send a third instruction to the third target server, so that the third target server increases or decreases the sixth number of containers according to the third instruction.
Optionally, in an optional embodiment of the present application, the first determining module 403 is further configured to determine, when it is determined that a fourth target server fails, the number of containers deployed in the fourth target server, where the fourth target server is any server in the at least one service server.
The second determining module 404 is further configured to determine at least one fifth target server from all the service servers except the fourth target server according to the second monitoring data sent by each service server except the fourth target server and the number of containers deployed in the fourth target server, and determine a seventh number of containers that need to be added in the fifth target server.
The sending module 405 is further configured to send a fourth instruction to the fifth target server, so that the fifth target server adds a seventh number of containers according to the fourth instruction.
Optionally, in an optional embodiment of the present application, the sending module 405 is further configured to send a fifth instruction to each service server, so that each service server establishes and runs an eighth number of the containers according to the fifth instruction, where the eighth number is the number of the containers preset by the user.
To sum up, the system maintenance apparatus provided in the embodiment of the present application includes: the method comprises the steps of receiving first monitoring data and second monitoring data sent by each business server respectively, obtaining third monitoring data through calculation according to the first monitoring data sent by each business server, determining a first number of containers needing to be added in all the business servers according to the third monitoring data and a first preset threshold value under the condition that the third monitoring data are larger than or equal to the first preset threshold value, determining at least one first target server from at least one business server according to the second monitoring data and the first number sent by each business server, determining a second number of containers needing to be added in the first target server, and sending a first instruction to the first target server so that the first target server can add containers of the second number according to the first instruction. The method comprises the steps of running a target application program by using a container technology, monitoring the load of the target application program and the load of a service server in real time in the running process of the target application program, adding a certain amount of containers in the service server according to the load of the target application program and the load of the service server when the load of the target application program is high, expanding the capacity of the target application program, adjusting the capacity of the target application program in real time, improving the stability of a system, and avoiding the problems of system breakdown and the like caused by untimely adjustment.
The present application further provides a non-transitory readable storage medium, where one or more modules (programs) are stored in the storage medium, and when the one or more modules are applied to a server, the one or more modules may cause the server to execute instructions (instructions) of method steps in this application.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one of skill in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrases "comprising one of \ 8230; \8230;" does not exclude the presence of additional like elements in a process, method, article, or terminal device that comprises the element.
The principle and the implementation of the present application are explained herein by applying specific examples, and the above description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A system maintenance method is applied to a control server and comprises the following steps:
receiving first monitoring data and second monitoring data respectively sent by each business server, wherein the first monitoring data are used for describing the load of all containers of a target application program deployed in the business server, and the second monitoring data are used for describing the load of the business server;
calculating to obtain third monitoring data according to the first monitoring data sent by each service server, wherein the third monitoring data are used for describing the load of the target application program;
determining a first number of the containers to be added in all the service servers according to the third monitoring data and a first preset threshold value when the third monitoring data is greater than or equal to the first preset threshold value;
determining at least one first target server from the at least one service server according to the second monitoring data and the first number sent by each service server, and determining a second number of the containers required to be added in the first target server;
sending a first instruction to the first target server to enable the first target server to increase the second number of the containers according to the first instruction.
2. The method of claim 1, further comprising:
determining a third number of the containers which need to be reduced in all the service servers according to the third monitoring data and a second preset threshold value under the condition that the third monitoring data is smaller than or equal to the second preset threshold value;
determining at least one second target server from the at least one service server according to the second monitoring data and the third number sent by each service server, and determining a fourth number of the containers which need to be reduced in the second target server;
sending a second instruction to the second target server to enable the second target server to reduce the fourth number of the containers according to the second instruction.
3. The method of claim 1, further comprising:
determining a fifth number of the containers that need to be added or subtracted in all the service servers in response to a user operation;
determining at least one third target server from the at least one service server according to the second monitoring data and the fifth number sent by each service server, and determining a sixth number of the containers which need to be increased or decreased in the third target server;
sending a third instruction to the third target server to cause the third target server to increase or decrease the sixth number of the containers according to the third instruction.
4. The method of claim 1, further comprising:
determining the number of the containers deployed in a fourth target server under the condition that the fourth target server is determined to be failed, wherein the fourth target server is any one of the at least one business server;
determining at least one fifth target server from all the service servers except the fourth target server according to the second monitoring data sent by each service server except the fourth target server and the number of the containers deployed in the fourth target server, and determining a seventh number of the containers required to be added in the fifth target server;
a fourth instruction sent to the fifth target server, so that the fifth target server increases the seventh number of containers according to the fourth instruction.
5. The method according to any one of claims 1 to 4, wherein before said receiving the first monitoring data and the second monitoring data respectively transmitted by each traffic server, further comprising:
and respectively sending a fifth instruction to each service server so that each service server respectively establishes and operates the containers with an eighth quantity according to the fifth instruction, wherein the eighth quantity is the quantity of the containers preset by the user.
6. A system maintenance device, which is provided in a control server, includes:
the system comprises a receiving module, a load module and a load module, wherein the receiving module is used for receiving first monitoring data and second monitoring data which are respectively sent by each business server, the first monitoring data are used for describing the load of all containers of a target application program deployed in the business server, and the second monitoring data are used for describing the load of the business server;
the calculation module is used for calculating third monitoring data according to the first monitoring data sent by each service server, wherein the third monitoring data are used for describing the load of the target application program;
a first determining module, configured to determine, when the third monitoring data is greater than or equal to a first preset threshold, a first number of the containers that need to be added in all the service servers according to the third monitoring data and the first preset threshold;
a second determining module, configured to determine at least one first target server from the at least one service server according to the second monitoring data and the first number sent by each service server, and determine a second number of the containers that need to be added in the first target server;
a sending module, configured to send a first instruction to the first target server, so that the first target server increases the second number of containers according to the first instruction.
7. The apparatus of claim 6, wherein the first determining module is further configured to determine, in a case that the third monitoring data is smaller than or equal to a second preset threshold, a third number of the containers that need to be reduced in all the traffic servers according to the third monitoring data and the second preset threshold;
the second determining module is further configured to determine at least one second target server from the at least one service server according to the second monitoring data and the third number sent by each service server, and determine a fourth number of the containers that need to be decreased in the second target server;
the sending module is further configured to send a second instruction to the second target server, so that the second target server reduces the fourth number of containers according to the second instruction.
8. The apparatus of claim 6, further comprising:
the first determining module is further configured to determine, in response to a user operation, a fifth number of the containers that need to be increased or decreased in all the service servers;
the second determining module is further configured to determine at least one third target server from the at least one service server according to the second monitoring data and the fifth number sent by each service server, and determine a sixth number of the containers that need to be added or subtracted in the third target server;
the sending module is further configured to send a third instruction to the third target server, so that the third target server increases or decreases the sixth number of containers according to the third instruction.
9. The apparatus of claim 6, wherein the first determining module is further configured to determine the number of containers deployed in a fourth target server if it is determined that the fourth target server fails, and the fourth target server is any server of the at least one business server;
the second determining module is further configured to determine, according to the second monitoring data sent by each service server except the fourth target server and the number of the containers deployed in the fourth target server, at least one fifth target server from all the service servers except the fourth target server, and determine a seventh number of the containers that need to be added in the fifth target server;
the sending module is further configured to send a fourth instruction to the fifth target server, so that the fifth target server increases the seventh number of containers according to the fourth instruction.
10. The apparatus according to any one of claims 6 to 9, wherein the sending module is further configured to send a fifth instruction to each service server, respectively, so that each service server establishes and runs an eighth number of the containers according to the fifth instruction, respectively, where the eighth number is a number of containers preset by a user.
CN202010023041.8A 2020-01-09 2020-01-09 System maintenance method and device Active CN111258710B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010023041.8A CN111258710B (en) 2020-01-09 2020-01-09 System maintenance method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010023041.8A CN111258710B (en) 2020-01-09 2020-01-09 System maintenance method and device

Publications (2)

Publication Number Publication Date
CN111258710A CN111258710A (en) 2020-06-09
CN111258710B true CN111258710B (en) 2023-03-31

Family

ID=70948638

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010023041.8A Active CN111258710B (en) 2020-01-09 2020-01-09 System maintenance method and device

Country Status (1)

Country Link
CN (1) CN111258710B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108111566A (en) * 2016-11-25 2018-06-01 杭州海康威视数字技术股份有限公司 A kind of cloud storage system expansion method, device and cloud storage system
CN108683528A (en) * 2018-04-26 2018-10-19 深圳银澎云计算有限公司 A kind of data transmission method, central server, server and data transmission system
CN108769100A (en) * 2018-04-03 2018-11-06 郑州云海信息技术有限公司 A kind of implementation method and its device based on kubernetes number of containers elastic telescopics
CN109669758A (en) * 2018-09-11 2019-04-23 深圳平安财富宝投资咨询有限公司 Concocting method, device, equipment and the storage medium of server resource
CN110474795A (en) * 2019-07-11 2019-11-19 中国平安财产保险股份有限公司 Processing method and processing device, storage medium and the electronic equipment of server capacity

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9749208B2 (en) * 2014-06-30 2017-08-29 Microsoft Technology Licensing, Llc Integrated global resource allocation and load balancing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108111566A (en) * 2016-11-25 2018-06-01 杭州海康威视数字技术股份有限公司 A kind of cloud storage system expansion method, device and cloud storage system
CN108769100A (en) * 2018-04-03 2018-11-06 郑州云海信息技术有限公司 A kind of implementation method and its device based on kubernetes number of containers elastic telescopics
CN108683528A (en) * 2018-04-26 2018-10-19 深圳银澎云计算有限公司 A kind of data transmission method, central server, server and data transmission system
CN109669758A (en) * 2018-09-11 2019-04-23 深圳平安财富宝投资咨询有限公司 Concocting method, device, equipment and the storage medium of server resource
CN110474795A (en) * 2019-07-11 2019-11-19 中国平安财产保险股份有限公司 Processing method and processing device, storage medium and the electronic equipment of server capacity

Also Published As

Publication number Publication date
CN111258710A (en) 2020-06-09

Similar Documents

Publication Publication Date Title
CN108632365B (en) Service resource adjusting method, related device and equipment
CN108845884B (en) Physical resource allocation method, device, computer equipment and storage medium
CN111818159B (en) Management method, device, equipment and storage medium of data processing node
CN105912399B (en) Task processing method, device and system
US20210006505A1 (en) A bursty traffic allocation method, device and proxy server
CN110659123B (en) Distributed task distribution scheduling method and device based on message
CN108279974B (en) Cloud resource allocation method and device
CN113010260A (en) Elastic expansion method and system for container quantity
CN110716808A (en) Service processing method, device, computer equipment and storage medium
CN109117244B (en) Method for implementing virtual machine resource application queuing mechanism
CN112698952A (en) Unified management method and device for computing resources, computer equipment and storage medium
Bolodurina et al. Approach to the effective controlling cloud computing resources in data centers for providing multimedia services
CN115297124A (en) System operation and maintenance management method and device and electronic equipment
CN111352726B (en) Stream data processing method and device based on containerized micro-service
CN113608838A (en) Deployment method and device of application image file, computer equipment and storage medium
CN113961353A (en) Task processing method and distributed system for AI task
EP3672203A1 (en) Distribution method for distributed data computing, device, server and storage medium
Samir et al. Autoscaling recovery actions for container‐based clusters
CN111258710B (en) System maintenance method and device
CN112261125A (en) Centralized unit cloud deployment method, device and system
CN110413393B (en) Cluster resource management method and device, computer cluster and readable storage medium
CN112163734A (en) Cloud platform based dynamic scheduling method and device for setting computing resources
CN105335376A (en) Stream processing method, device and system
CN114385366A (en) Elastic capacity expansion method, system, medium and equipment for container group of container cloud platform
CN114070855B (en) Resource allocation method, resource allocation device, resource allocation system, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant