Service elastic scaling monitoring method based on cloud computing

CN118964127APending Publication Date: 2024-11-15HANGZHOU MAXTOR BIG DATA SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411007096.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

[0005]最后,从性能和稳定性、安全性考虑:目前在自动伸缩的过程中,系统会面临瞬间的性能下降或不稳定,特别是在自动监控预警方面不完善的情况下,弹性伸缩也会增加安全风险

Benefits of technology

[0016] 1. The present invention uses programming language to realize semi-automatic server scaling, avoiding excessive manual operation of machine services and reducing misoperation. At the same time, containerized deployment combined with Jenkins is used to package, deploy, and restart services in one step to make it more lightweight.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964127A_ABST
    Figure CN118964127A_ABST
Patent Text Reader

Abstract

The invention discloses a service elastic scaling monitoring method based on cloud computing, and the method comprises the following steps: 1, applying for machine creation through a client, searching user binding information through a server according to a mysql database, and judging whether a machine is bound or not; 2, if it is judged that the server side is not bound with the machine, accessing a mysql database through an http request, checking whether a current server has an idle server or not, and binding the machine if the current server has the idle server; step 3, if no idle server exists, creating a machine through a pythin language according to pre-set server configuration; step 4, monitoring whether the use of the machine is expired or not through a java timed task schedled polling machine according to the machine use duration set by creating the machine, and if the use of the machine is expired, automatically releasing the machine; and step 5, the machine releases and notifies the python server through the http request, and the python server uses the Ali cloud sdk to close the machine. According to the method, the independent server is created for special users, user experience is improved, and company cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automatic creation of cloud services, and in particular to a service elastic scaling monitoring method based on cloud computing. Background Art

[0002] Service elastic scaling means automatically creating, expanding or destroying services in near real time according to specific scenarios. Currently, most companies are still using manual methods (customers who purchase paid modules need to allocate separate machines to bind paid users, and separate machines are manually created after the backend management has reviewed them) or using machine scaling will also cause various problems:

[0003] From the perspective of complexity and management cost: elastic scaling requires precise configuration and monitoring to ensure that the system can automatically adjust according to demand. As the number of machines increases, the difficulty of monitoring will continue to increase, and it often requires deep professionalism and work experience to achieve accurate monitoring. It can be imagined that manual monitoring may not only lead to various errors, but also lead to increasing labor costs.

[0004] In addition, from the perspective of cost budget: although elastic scaling can dynamically adjust resources according to load conditions, there may be wrong configurations that lead to resource waste. In this case, database polling monitoring can be used to release redundant resources caused by wrong configurations in real time.

[0005] Finally, from the perspective of performance, stability and security: Currently, during the process of automatic scaling, the system may face momentary performance degradation or instability, especially when automatic monitoring and early warning are not perfect, elastic scaling will also increase security risks. In response to this, the monitoring and early warning system in the system is used to monitor the current operating status of each machine service in real time, and the operation and maintenance personnel are notified by email for possible problems. At the same time, in-depth cooperation is carried out with cloud service providers to carry out performance, stability and security maintenance at the same time. Summary of the invention

[0006] In view of the deficiencies in the prior art, the present invention proposes a service elastic scaling monitoring method based on cloud computing, which automatically scales servers based on programming languages ​​and cloud computing, creates separate servers for special users, improves user experience and reduces company costs.

[0007] In order to solve the above technical problems, the technical solution of the present invention is:

[0008] A cloud computing-based service elastic scaling monitoring method comprises the following steps:

[0009] Step 1: The client applies for machine creation. The server (java, python) first searches the MySQL database for user binding information to determine whether the machine has been bound.

[0010] Step 2: If the machine is not bound, access the MySQL database through an HTTP request to check whether the current server has an idle server for binding.

[0011] Step 3: If there is no idle server, use Python to create a machine according to the pre-set server configuration (the specific configuration needs to be set according to actual needs, for example, a 2-core 4G machine: instance_type = "ecs.s6-c1m2.small")

[0012] Step 4: Monitor whether the machine usage time set when creating the machine + Java scheduled task scheduled has expired, and automatically release the machine if it expires

[0013] Step 5: The machine is released and the Python server is notified through an HTTP request. The Python server uses the Alibaba Cloud SDK to shut down the machine.

[0014] As a preferred option, to improve the client experience, n machines are preheated each time a machine is created.

[0015] The present invention has the following characteristics and beneficial effects:

[0016] 1. The present invention uses programming language to achieve semi-automatic server expansion, avoiding excessive manual operation of machine services and reducing misoperation. At the same time, containerized deployment combined with Jenkins is used to package, deploy, and restart services in one piece, making them more lightweight.

[0017] 2. The reduction of manual operations will further increase the security and privacy of the service.

[0018] 3. Automated scaling services can be enabled on-demand and paid for on-demand, simplifying operation and maintenance and reducing long-term operation and maintenance costs

[0019] 4. Maintain good system response time, avoid performance degradation due to insufficient resources, and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0021] Figure 1 The present invention is a method flow chart of an embodiment of a method for monitoring elastic scaling of services based on cloud computing. DETAILED DESCRIPTION

[0022] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0023] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", and the like may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.

[0024] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood by specific circumstances.

[0025] The present invention provides a service elastic scaling monitoring method based on cloud computing, such as Figure 1 As shown, the following steps are included:

[0026] Step 1: Apply for machine creation through the client, and the server searches the user binding information in the MySQL database to determine whether the machine has been bound;

[0027] Specifically, the method for creating a MySQL database is:

[0028] When creating a MySQL database, use utf8mb4 as the character set, define category data, which includes user ID, public network address, intranet address, domain name, instance image, instance specification, instance ID, instance name, switch ID, security group ID, and billing type, and set the character set to utf8mb4.

[0029] Furthermore, when defining category data, the data type of the public network address, intranet address, and domain name is stored as varchar(32), the data type of the instance image, instance specification, instance id, instance name, switch id, and billing type is stored as varchar(64), and the data type of the security group id is stored as varchar(128).

[0030] In addition, the default value of each column of category data is set to NULL. If no value is provided for the column when data is inserted, it will be automatically set to NULL.

[0031] Furthermore, the method of searching through the MySQL database is: searching according to the user ID in the MySQL database.

[0032] Step 2: If it is determined that the server is not bound to the machine, access the MySQL database through an HTTP request to check whether the current server has an idle server. If there is an idle server, bind the machine;

[0033] Specifically, the method for checking whether there is a controllable server through the MySQL database is: the method for checking whether there is a controllable server through the MySQL database is: from the domain name pool of the MySQL database, select the keyword is_user. When is_user=0, there is no controllable server.

[0034] Step 3: If there is no idle server, create a machine using Python language according to the pre-set server configuration;

[0035] The configuration of the server is set according to the requirements of the created machine configuration.

[0036] In this embodiment, the specific configuration needs to be set according to actual needs. A 2-core 4G machine: instance_type = "ecs.s6-c1m2.smal.

[0037] Step 4: According to the machine usage time set by the machine creation, the Java scheduled task scheduled polls the machine to monitor whether the machine usage has expired. If expired, the machine is automatically released;

[0038] Step 5: The machine is released and the Python server is notified through an HTTP request. The Python server uses the Alibaba Cloud SDK to shut down the machine.

[0039] Understandably, in order to improve the client's experience, in step 1, each time a machine is created, n machines need to be preheated in advance. We will set the specific preheated machines according to the actual situation, such as: when the normal concurrency is low, 5 machines will be set, and when we conduct promotional activities, there will be high concurrency, then 10 to 20 machines will be set, and the specific setting will be based on the degree of promotional discount.

[0040] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions and variations of these embodiments including components are made without departing from the principles and spirit of the present invention, and still fall within the scope of protection of the present invention.

Claims

1. A service elastic scaling monitoring method based on cloud computing, characterized in that: The steps include: Step 1: Apply for machine creation through the client, and the server searches the user binding information in the MySQL database to determine whether the machine has been bound; Step 2: If it is determined that the server is not bound to the machine, access the MySQL database through an HTTP request to check whether the current server has an idle server. If there is an idle server, bind the machine; Step 3: If there is no idle server, create a machine using Python language according to the pre-set server configuration; Step 4: According to the machine usage time set by the machine creation, the Java scheduled task scheduled polls the machine to monitor whether it has expired. If it has expired, the machine is automatically released; Step 5: The machine is released and the Python server is notified through an HTTP request. The Python server uses the Alibaba Cloud SDK to shut down the machine.

2. According to the cloud computing-based service elastic scaling monitoring method according to claim 1, it is characterized in that: In step 1, each time a machine is created, n machines need to be preheated in advance.

3. The method for monitoring elastic scaling of services based on cloud computing according to claim 1, characterized in that: In step 1, the method for creating the mysql database is: When creating a MySQL database, define category data, including user ID, public network address, intranet address, domain name, instance image, instance specification, instance ID, instance name, switch ID, security group ID, and billing type, and set the character set to utf8mb4.

4. The method for monitoring elastic scaling of services based on cloud computing according to claim 3, characterized in that: When defining category data, the data type of the public network address, intranet address, and domain name is stored as varchar(32), the data type of the instance image, instance specification, instance id, instance name, switch id, and billing type is stored as varchar(64), and the data type of the security group id is stored as varchar(128).

5. The method for monitoring elastic scaling of services based on cloud computing according to claim 3, characterized in that: When creating a MySQL database, use utf8mb4 as the character set.

6. A cloud computing-based service elastic scaling monitoring method according to claim 3, 4 or 5, characterized in that: When creating a MySQL database, set the default value of each column category data to NULL. If no value is provided for the column data when inserting data, it will be automatically set to NULL.

7. The method for monitoring elastic scaling of services based on cloud computing according to claim 3, characterized in that: In the step 1, the method of searching through the MySQL database is: searching according to the user ID in the MySQL database.

8. The method for monitoring elastic scaling of services based on cloud computing according to claim 3, characterized in that: In step 2, the method of checking whether there is a controllable server through the MySQL database is: from the domain name pool of the MySQL database, select the keyword is_user, when is_user=0, there is no controllable server.

9. The method for monitoring elastic scaling of services based on cloud computing according to claim 1, characterized in that: In step 3, the configuration of the server is set according to the requirements of the created machine configuration.