Data processing method and device based on cloud computing platform, equipment and medium

By using Tengine's VTS module and shared memory technology in the cloud computing platform, the rate of load balancing load-balanced response codes is solved in real time, and the complex problems of response code monitoring data delay and processing in the existing technology are solved, achieving more efficient and convenient monitoring data processing.

CN119814625AActive Publication Date: 2025-04-11CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411770673.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-04-11
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

When the prior art uses Nginx access log to obtain load balancing response code monitoring data, there are problems such as data delay, unfriendly data format and slow reading speed, which is difficult to meet the needs of tenants for real-time monitoring.

Method used

By introducing Tengine's VTS module into the cloud computing platform, the response code data is stored using shared memory, the response code accumulation value is updated and collected in real time, and the response code rate is calculated based on the values ​​and interval time of adjacent two acquisitions, and finally reported to the database for display.

Benefits of technology

It realizes the optimization of the response code monitoring data of load balancing network elements in the cloud computing platform, improves the timeliness and convenience of the response code monitoring data processing, and can more accurately reflect the operating status of cloud services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814625A_ABST
    Figure CN119814625A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data processing method and device based on a cloud computing platform, equipment and a medium, and the method comprises the steps: receiving an access request for a virtual host of a tenant in the cloud computing platform, and processing the access request through a load balancing network element in the cloud computing platform; acquiring a current response code of the load balancing network element for the access request, and updating a response code accumulated value corresponding to the current response code in the shared memory according to the current response code; acquiring response code accumulation values from the shared memory according to the interval duration, and determining a response code rate according to the response code accumulation values acquired from the shared memory for two adjacent times and the interval duration; and the response code rate is reported to the database to be displayed on the tenant monitoring platform, so that optimization processing of the response code monitoring data of the load balancing network element in the cloud computing platform is realized, and timeliness and convenience of processing of the response code monitoring data of the load balancing network element are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technology, and in particular to a data processing method, device, equipment and medium based on a cloud computing platform. Background Art

[0002] When tenants use the load balancing products of cloud computing vendors, the load balancer will return different HTTP response codes according to the processing of the request. The response code is obtained by using the access log of Nginx (a high-performance open source Web server and reverse proxy server). The $status field is added to the log_format of access_log in the Nginx configuration file. Whenever there is a request to access the load balancer, the access log will record the response code returned by the load balancer to the front-end device, thereby obtaining the rate of each response code. However, there are many limitations in collecting response code monitoring data through Nginx access logs, which is difficult to meet the needs. Summary of the invention

[0003] In view of the above problems, a data processing method, apparatus, device and medium based on a cloud computing platform are proposed to overcome the above problems or at least partially solve the above problems, including:

[0004] A data processing method based on a cloud computing platform, wherein the cloud computing platform deploys a server cluster and a load balancing cluster, wherein the cloud computing platform provides a virtual host for a tenant through the server cluster and provides a load balancing network element through the load balancing cluster, comprising:

[0005] Receiving an access request for a virtual host of a tenant in the cloud computing platform, and processing the access request through a load balancing network element in the cloud computing platform;

[0006] Obtaining a current response code of the load balancing network element to the access request, and updating a response code accumulation value corresponding to the current response code in a shared memory according to the current response code;

[0007] Collecting the response code accumulation value from the shared memory according to the interval duration, and determining the response code rate according to the response code accumulation value obtained from the shared memory for two consecutive times and the interval duration;

[0008] The response code rate is reported to the database for display on the tenant monitoring platform.

[0009] Optionally, before receiving the access request for the virtual host of the tenant in the cloud computing platform, the method further includes:

[0010] In the preset structure, add a response code cumulative value field for the target response code;

[0011] The updating, in a shared memory, of a response code accumulation value corresponding to the current response code according to the current response code includes:

[0012] When it is detected that the current response code is the target response code, the response code cumulative value recorded in the response code cumulative value field for the target response code is increased.

[0013] Optionally, collecting the response code cumulative value from the shared memory according to the interval duration includes:

[0014] Obtaining a target listener identifier and / or a target load balancing network element identifier to be collected; wherein each load balancing network element corresponds to multiple listeners, and different listeners listen to different types of access requests;

[0015] According to the target listener identifier and / or the target load balancing network element identifier, the response code cumulative value is collected from the shared memory according to the interval duration; wherein the shared memory records the response code cumulative value according to the dimension of the listener in the load balancing network element.

[0016] Optionally, determining the response code rate according to the cumulative value of the response codes obtained from the shared memory for two consecutive times and the interval duration includes:

[0017] Determine a difference value according to cumulative values ​​of response codes obtained from the shared memory twice in a row;

[0018] A response code rate is determined according to the difference and the interval duration.

[0019] Optionally, determining the response code rate according to the difference and the interval duration includes:

[0020] In the case where there are multiple load balancing network elements, the differences of the multiple load balancing network elements are summed to obtain a difference sum, and the difference sum and the interval duration are used to determine the response code rate.

[0021] Optionally, obtaining a current response code of the load balancing network element to the access request includes:

[0022] Obtaining monitoring data of the load balancing network element for the access request;

[0023] The monitoring data is parsed into a specified format, and a current response code of the load balancing network element to the access request is obtained through the monitoring data in the specified format.

[0024] Optionally, the load balancing network element is a seven-layer load balancing network element.

[0025] A data processing device based on a cloud computing platform, wherein the cloud computing platform deploys a server cluster and a load balancing cluster, wherein the cloud computing platform provides a virtual host for a tenant through the server cluster and provides a load balancing network element through the load balancing cluster, comprising:

[0026] An access request processing module, used to receive an access request for a virtual host of a tenant in the cloud computing platform, and process the access request through a load balancing network element in the cloud computing platform;

[0027] A response code cumulative value updating module, used to obtain the current response code of the load balancing network element to the access request, and update the response code cumulative value corresponding to the current response code in the shared memory according to the current response code;

[0028] A response code rate determination module, used to collect the response code cumulative value from the shared memory according to the interval duration, and determine the response code rate according to the response code cumulative value obtained from the shared memory for two consecutive times and the interval duration;

[0029] The response code rate display module is used to report the response code rate to the database for display on the tenant monitoring platform.

[0030] An electronic device comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the method described above when executed by the processor.

[0031] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.

[0032] The embodiments of the present invention have the following advantages:

[0033] In an embodiment of the present invention, an access request for a virtual host of a tenant in a cloud computing platform is received, and the access request is processed by a load balancing network element in the cloud computing platform; the current response code of the load balancing network element for the access request is obtained, and according to the current response code, the response code cumulative value corresponding to the current response code is updated in a shared memory; the response code cumulative value is collected from the shared memory according to the interval duration, and the response code rate is determined according to the response code cumulative value and the interval duration obtained from the shared memory for two adjacent times; the response code rate is reported to a database for display on a tenant monitoring platform, thereby achieving optimized processing of response code monitoring data of the load balancing network element in the cloud computing platform, and improving the timeliness and convenience of processing response code monitoring data of the load balancing network element. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0035] Figure 1 It is a schematic diagram of a process of monitoring indicator collection provided by some embodiments of the present invention;

[0036] Figure 2 is an architecture diagram of a seven-layer load balancing network provided by some embodiments of the present invention;

[0037] Figure 3 is a flowchart of another data processing method based on a cloud computing platform provided by some embodiments of the present invention;

[0038] Figure 4 It is a structural block diagram of a data processing device based on a cloud computing platform provided by some embodiments of the present invention. DETAILED DESCRIPTION

[0039] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0040] With the rapid development of cloud computing technology, load balancing, as a core component in cloud architecture, plays a key role in ensuring the stability, reliability and performance of cloud services. It is located at the front end of the cloud architecture and is responsible for intelligently distributing traffic, requests and workloads to multiple backend servers to maintain server load balance and prevent any single server from failing due to overload. This mechanism is crucial to ensuring the efficient operation of cloud services.

[0041] At the same time, with the popularity of cloud computing services, tenant monitoring has become an indispensable service provided by cloud computing vendors. Through tenant monitoring, cloud computing vendors can grasp the operating status of tenant cloud services in real time, ensure service availability, optimize resource utilization, reduce costs, and promptly discover and respond to faults that may affect tenant applications, thereby improving troubleshooting efficiency. This is of great significance for improving tenant satisfaction and enhancing the competitiveness of cloud computing vendors.

[0042] When tenants use the seven-layer load balancing product of cloud computing vendors, the load balancer will return different HTTP response codes according to the processing of the request. These response codes not only reflect the processing results of the request, but also contain fault information. For example, the 404 Not Found response code indicates that the resource requested by the client does not exist on the server, which may mean that there are some problems with the tenant's service; the 429 Too Many Requests response code indicates that the client has sent too many requests and may have been attacked maliciously; the 499 Client Closed Request response code indicates that the client disconnected before the server returned a response, which may be a client-side timeout caused by network fluctuations; and the 502 Bad Gateway response code indicates that the load balancer cannot obtain a valid response from the backend server, which may be caused by a backend server failure or a load balancing instance configuration error.

[0043] In the related art, Nginx's access log is used to obtain response code monitoring data. As the main carrier of the seven-layer load balancing service, Nginx customizes the log_format of access_log in the configuration file and adds the $status field to record the response code returned by the load balancing to the front-end device. However, this method has the following problems:

[0044] 1. Data delay. Nginx access logs are written to disk asynchronously. Therefore, in high-traffic situations, the acquired monitoring data may be delayed and cannot reflect the operating status of the cloud service in real time.

[0045] 2. The data format is not user-friendly. Access logs are stored in plain text format. Complex parsing strategies such as regular expressions are required to parse specific response codes. This not only consumes a lot of CPU resources, but also increases the complexity and cost of data processing.

[0046] 3. Slow reading speed. Since the access log is stored on the disk, the file system API needs to be called to read it. As the log file grows (usually an access log is about 1GB), frequent reading of disk files not only increases the memory burden, but also reduces the speed of data reading, affecting the real-time and accuracy of monitoring.

[0047] In order to solve the above problems, Tengine (a high-performance HTTP and reverse proxy server based on Nginx) is a high-performance enhanced version of Nginx. In an embodiment of the present invention, it is proposed to introduce the ngx_http_vhost_traffic_status (Vhost Traffic Status / VTS, virtual host traffic status monitoring) module in Tengine, which is specially designed to collect and count the real-time traffic data of virtual hosts. The VTS module can accumulate and update the traffic statistics of virtual hosts in real time, including but not limited to key indicators such as the number of requests, processing time, and bandwidth consumption, providing administrators with a window to fully understand the server load status, which is helpful for targeted resource optimization and performance tuning.

[0048] However, the original VTS module is relatively limited in response code statistics, focusing mainly on common success and error response codes, such as 200 (success) and 500 (internal server error), etc., and does not provide direct statistical support for response codes in certain scenarios, such as 404 (not found), 429 (too many requests), 499 (client closed connection) and 502 (bad gateway), etc. These response codes often reflect specific situations such as client request problems, server overload or upstream service failure, which are crucial for in-depth analysis of service performance and user experience.

[0049] Therefore, based on the introduction of the VTS module of Tengine, the present invention has made innovative extensions, adding additional response code fields such as 404, 429, 499 and 502 for each virtual traffic node, and by modifying the statistical process, ensuring that these newly added fields can accurately and real-time capture the corresponding response code data. This improvement not only enriches the dimensions of monitoring data, but also enables administrators to understand the performance of the server in different situations in more detail, providing data support for further optimization.

[0050] In addition, compared with the access log monitoring method in the related art, in an embodiment of the present invention, the VTS module adopts a shared memory storage mechanism, and this design greatly improves the speed of data reading. In the Master (MasterProcess) process of Nginx, an independent memory area is allocated to the listener of each load balancing instance for accumulating monitoring data. When the Worker (work) process processes the HTTP request, it will directly update the corresponding shared memory area according to the response code and other information, avoiding the overhead of log writing. At the same time, the VTS module supports parsing monitoring data into multiple formats such as json and prometheus, which not only facilitates the subsequent processing and analysis of data, but also reduces the resource consumption in the data conversion process, making the entire monitoring collection process more efficient and flexible.

[0051] In a specific implementation, the embodiments of the present invention may include the following

[0052] 1. Combined with Tengine's VTS module, this module is developed based on Nginx, adds relevant configuration items, and intervenes in the log module processing stage of Nginx request processing (using Nginx as the carrier of load balancing, configuring load balancing service on this type of server, and introducing Tengine's vts module into Nginx occupancy).

[0053] 2. Add stat_404_counter, stat_429_counter, stat_499_counter, and stat_502_counter fields to the ngx_http_vhost_traffic_status_node_t structure of the VTS module to record the cumulative value of the response code obtained by the current listener (that is, the number of times the response code appears within the preset time). This structure stores traffic statistics in the virtual host and upstream server.

[0054] 3. Whenever Nginx processes an HTTP request, the statistical information in the structure is updated during the log module processing phase. By judging the response code of the load balancing server in the ngx_http_vhost_traffic_status_node_update function, if it is judged as the above response code, the cumulative value in the shared memory corresponding to the listener is updated. Specifically, the cloud computing platform establishes a virtual host (backend server) for the tenant through a server cluster; the client sends an HTTP request to request access to the tenant's virtual host; the HTTP request is first sent to Nginx for load balancing processing, and then it is determined to be sent to the target virtual host; after the request is processed, the listener monitors the response code corresponding to the request, and then updates the response code accumulation value recorded in the VTS according to the response code.

[0055] 4. In order to distinguish the monitoring data of the load balancing instance dimension and the listener dimension, a configuration item is added in the embodiment of the present invention to filter the statistical information by service ID, which contains the load balancing instance ID and the listener ID (wherein, a load balancing instance can include multiple listeners, and different listeners are used to monitor different types of requests). After configuring the VTS module, each time the interface provided by the module is called, the cumulative value of the response code of the listener where each load balancing instance is located can be obtained in real time.

[0056] 5. The Agent is responsible for filtering and assembling the statistical information to obtain the monitoring information needed. The Monitor process is then called at intervals of one minute to collect the response code rate of the seven-layer load balancing network element. The overall process is as follows: Figure 1 As shown, the data is finally reported to the Prometheus database. Agent refers to the application responsible for managing and querying load balancing, such as issuing nginx configuration information and calling nginx-related interfaces to query information. Prometheus refers to an open source system monitoring and alert toolkit that uses a flexible data model and can mark and query data in multiple dimensions. Monitoring data can be stored as time series data, and the query language is flexible.

[0057] 6. The overall architecture and traffic path of the seven-layer load balancing service are as follows Figure 2 As shown, in order to ensure the high availability of the load balancing service, multiple load balancing network elements can be deployed in a clustered manner, which are responsible for processing requests and distribution at the same time. If only the tenant monitoring data of a single load balancing unit is collected, it will inevitably be inaccurate. Therefore, it is necessary to collect the monitoring data of each seven-layer load balancing network element, and finally calculate the rate and display it to the tenant monitoring platform. The calculation formula is as follows:

[0058]

[0059] Among them, n represents the number of seven-layer load balancing network elements in the cluster; t represents the interval time for collecting monitoring data, such as 60 seconds; rc represents the cumulative value of monitoring response codes collected in real time, and rcl represents the cumulative value of response codes collected through shared memory last time. Finally, the rate of a certain load balancing response code within one minute can be obtained through calculation. Specifically, Agent can obtain recorded data from VTS; Monitor calls Agent to obtain data at intervals of one minute, calculates the response code rate of the seven-layer load balancing network element, and passes the calculated response code rate to the Prometheus database; when users need to monitor data, they can obtain data from the Prometheus database and display it on the tenant monitoring platform.

[0060] The embodiments of the present invention have the following advantages:

[0061] 1. In view of the shortcomings of the log collection method in the related art, such as high latency, complex data processing, and slow reading speed, in the embodiment of the present invention, the VTS module is secondary developed, the flexibility of the nginx module is fully utilized, and the data related to the load balancing response code is stored in the shared memory, thereby solving the shortcomings of the log collection method.

[0062] 2. In an embodiment of the present invention, a scheme for reporting response code data in shared memory is proposed, and Agent and Monitor are modified so that monitoring data can be divided in the dimensions of load balancing instance and listener instance, and the response code rate that needs to be counted is generated.

[0063] The present invention will be further described below in conjunction with the accompanying drawings:

[0064] Reference Figure 3 , showing a step flow chart of a data processing method based on a cloud computing platform provided by some embodiments of the present invention, wherein the cloud computing platform deploys a server cluster and a load balancing cluster, and the cloud computing platform provides virtual hosts for tenants through the server cluster and provides load balancing network elements through the load balancing cluster.

[0065] Among them, the cloud computing platform can provide an environment in which computing power, storage space and information services can be provided to users (tenants) on demand.

[0066] A server cluster refers to a system consisting of multiple servers that are connected through a network and work together to provide higher computing power and reliability. In a cloud computing platform, a server cluster can be used to provide virtual hosts for tenants. A virtual host is a logical server created on a physical server through virtualization technology. Each virtual host can independently run its own operating system and applications.

[0067] Load balancing cluster is a technology that improves system throughput and reliability by distributing access requests for network or application services to multiple servers or network nodes. In cloud computing platforms, load balancing clusters can provide load balancing network elements.

[0068] The load balancing network element can be a load balancer, which is a key component in the load balancing cluster. It is responsible for receiving requests from clients and distributing these requests to different servers in the cluster according to certain strategies (such as polling, minimum number of connections, etc.) to avoid overloading a single server and improve the overall performance and stability of the system.

[0069] In actual applications, cloud computing platforms can provide virtual hosts for tenants through server clusters, so that tenants can obtain one or more virtual servers to run their applications or websites; cloud computing platforms use load balancing network elements provided by load balancing clusters to distribute tenants' requests to different servers in the server cluster according to certain strategies, so as to avoid overloading of a single server and improve the overall performance and stability of the system.

[0070] Specifically, the following steps may be included:

[0071] Step 301: receiving an access request for a virtual host of a tenant in the cloud computing platform, and processing the access request through a load balancing network element in the cloud computing platform.

[0072] As some examples, tenants in cloud computing platforms refer to organizations or individuals who use cloud services. They can choose different cloud services according to their needs, such as computing resources, storage space, network bandwidth, etc.

[0073] In some examples, when a tenant's client (such as a browser, application, etc.) attempts to access a virtual host deployed by the tenant on the cloud computing platform, the cloud computing platform receives the access request.

[0074] When the cloud computing platform receives the access request, it can pass it to the load balancing network element for processing. The load balancing network element is responsible for allocating and managing the access requests to the virtual host to decide which server or virtual machine to send the request to.

[0075] In some embodiments of the present invention, before receiving an access request to a virtual host of a tenant in the cloud computing platform, the method further includes: adding a response code accumulation value field for a target response code in a preset structure.

[0076] As some examples, a new field can be added to an already defined structure (data structure). This new field is used to record the number of occurrences of a specific target response code, that is, the cumulative value of the response code. The target response code can be predetermined and represent a specific state or result, such as success, error, timeout, etc.

[0077] For example, you can add stat_404_counter, stat_429_counter, stat_499_counter, and stat_502_counter fields to the ngx_http_vhost_traffic_status_node_t structure of the VTS module to record the cumulative value of the response code obtained by the current listener (that is, the number of times the response code appears within the preset time). This structure stores traffic statistics in the virtual host and upstream server.

[0078] In some embodiments of the present invention, the load balancing network element is a seven-layer load balancing network element.

[0079] The load balancing network element is a seven-layer load balancing network element, which refers to a load balancing device or component working on the application layer (seventh layer) of the OSI (Open System Interconnection) network model in the load balancing technology.

[0080] The seven-layer load balancing network element is located at the highest layer of the OSI model, namely the application layer. It distributes requests to different servers by analyzing and processing network traffic to achieve load balancing. For example, the seven-layer load balancing network element can decide how to distribute requests based on the content of the request (such as URL path, request parameters, etc.), thereby ensuring that the request is distributed to the most suitable server and improving the performance and reliability of the system. This load balancing method can perform intelligent traffic distribution based on application layer protocols (such as HTTP, HTTPS, SMTP, etc.), thereby improving the performance and reliability of the server.

[0081] Step 302: Obtain the current response code of the load balancing network element to the access request, and update the response code accumulation value corresponding to the current response code in the shared memory according to the current response code.

[0082] In some examples, the current response code refers to the response code returned by the server for the current access request. Specifically, when the load balancing network element distributes the access request to the backend server in the server cluster, the server returns a response code to the load balancing network element to indicate the processing result of the access request. The response code can be an HTTP status code, such as 200, 404, 500, etc.

[0083] Shared memory refers to a common storage area that allows multiple processes or threads to access. Through shared memory, different processes or threads can share data, thereby achieving fast data transmission and synchronization.

[0084] As some examples, listeners can be preset, and a load balancing instance can include multiple listeners, with different listeners used to listen to different types of requests; each time the load balancing network element receives a response code, 1 can be added to the listener corresponding to the response code to record the number of times the response code appears.

[0085] As some examples, updating the response code accumulation value corresponding to the current response code in the shared memory means that when the load balancing network element receives the current response code returned by the backend server, it can find the listener corresponding to the response code. Then, the value of the listener is increased by 1 to indicate that the response code appears again, thereby updating the response code accumulation value corresponding to the current response code.

[0086] In some embodiments of the present invention, obtaining the current response code of the load balancing network element to the access request includes: obtaining monitoring data of the load balancing network element to the access request; parsing the monitoring data into a specified format, and obtaining the current response code of the load balancing network element to the access request through the monitoring data in the specified format.

[0087] The monitoring data refers to data collected in real time or periodically by the load balancing network element for processing the access request. For example, the monitoring data of the load balancing network element for the access request can be obtained through a log module.

[0088] As some examples, the specified format refers to a monitoring data format defined to meet specific requirements or standards. The specified format may include the name, type, order, etc. of the data field.

[0089] After obtaining the monitoring data, the monitoring data can be parsed into a specified format, and based on the monitoring data in the specified format, the current response code of the load balancing network element for the access request can be obtained; for example, a specific data field can be searched in the monitoring data in the specified format and returned as the current response code.

[0090] In some embodiments of the present invention, based on the current response code, the response code cumulative value corresponding to the current response code is updated in the shared memory, including: when it is detected that the current response code is the target response code, the response code cumulative value recorded in the response code cumulative value field for the target response code is increased.

[0091] In some examples, after obtaining the current response code, the field of the current response code can be matched with the field of the target response code added in the preset structure. If the current response code matches the target response code, the response code cumulative value recorded in the response code cumulative value field for the target response code is increased (that is, the cumulative count of the current response code is increased by 1).

[0092] Step 303: Collect the response code accumulation value from the shared memory according to the interval duration, and determine the response code rate according to the response code accumulation values ​​obtained from the shared memory for two consecutive times and the interval duration.

[0093] Collecting the cumulative value of response codes from the shared memory according to the interval time refers to collecting the cumulative value of response codes according to a certain time interval; the interval time can be fixed (such as every second, every minute, etc.) or variable (dynamically adjusted according to factors such as system load and user demand).

[0094] Two consecutive times refers to the process of collecting the response code cumulative value from the shared memory twice in a row according to the above interval. According to the response code cumulative value collected twice in a row and the interval between them, the average rate of occurrence of a specific response code per unit time is calculated.

[0095] For example, the response code rate calculation formula is as follows:

[0096]

[0097] Among them, n represents the number of seven-layer load balancing network elements in the cluster; t represents the interval time for collecting monitoring data, such as 60 seconds; rc represents the cumulative value of monitoring response codes collected in real time, and rcl represents the cumulative value of response codes collected through shared memory last time. Finally, the rate of a certain load balancing response code within one minute can be obtained through calculation. Specifically, Agent can obtain recorded data from VTS; Monitor calls Agent to obtain data at intervals of one minute, calculates the response code rate of the seven-layer load balancing network element, and passes the calculated response code rate to the Prometheus database; when users need to monitor data, they can obtain data from the Prometheus database and display it on the tenant monitoring platform.

[0098] In some embodiments of the present invention, determining the response code rate based on the cumulative value of the response codes obtained from the shared memory twice adjacently and the interval duration includes: determining the difference based on the cumulative value of the response codes obtained from the shared memory twice adjacently; determining the response code rate based on the difference and the interval duration.

[0099] The cumulative value of response codes obtained from two consecutive acquisitions means the cumulative value of response codes of the same listener (or load balancing network element) read from the shared memory at two consecutive time points (or acquisition cycles). By calculating the difference between the cumulative values ​​of response codes at these two time points, the change in the number of response codes processed by the listener (or load balancing network element) between two consecutive acquisitions can be obtained. This difference reflects the increase or decrease in the number of response codes within a given time interval.

[0100] As in the above formula (rc i -rcl i ), rc represents the cumulative value of monitoring response codes collected in real time, rcl represents the cumulative value of response codes collected through shared memory last time, and t represents the interval time for collecting monitoring data.

[0101] In some embodiments of the present invention, determining the response code rate based on the difference and the interval duration includes: in the case where there are multiple load balancing network elements, summing the differences of the multiple load balancing network elements to obtain the sum of the differences, and using the sum of the differences and the interval duration to determine the response code rate.

[0102] As some examples, there are one or more load balancing network elements running in the cloud computing platform, each of which is responsible for processing a portion of network traffic and distributing requests to backend servers. The difference between two consecutive cumulative values ​​of response codes obtained from the shared memory can be calculated for each load balancing network element.

[0103] Then, the differences of all load balancing network elements are added together to obtain a total difference, namely the difference sum, which represents the total change in the number of response codes processed by all load balancing network elements in a given time interval.

[0104] In some examples, the calculated difference sum is divided by the interval length to obtain the overall response code rate, which represents the number of response codes processed by all load balancing network elements in a unit of time.

[0105] In some embodiments of the present invention, the cumulative value of response codes is collected from the shared memory according to the interval duration, including: obtaining the target listener identifier and / or the target load balancing network element identifier to be collected; wherein each load balancing network element corresponds to multiple listeners, and different listeners listen to different types of access requests; according to the target listener identifier and / or the target load balancing network element identifier, the cumulative value of response codes is collected from the shared memory according to the interval duration; wherein the shared memory records the cumulative value of response codes according to the dimension of the listener in the load balancing network element.

[0106] The target listener identifier refers to the unique identifier of a specific listener that collects the cumulative value of the response code. The target load balancing network element identifier refers to the unique identifier of a load balancing device that includes multiple listeners.

[0107] Recording the response code accumulation value according to the dimension of the listener in the load balancing network element means that in the shared memory, the response code accumulation value is recorded according to the dimension of each listener in the load balancing network element. That is, for each listener, there is a corresponding response code accumulation value record.

[0108] In actual applications, the accumulated value of the response code of the corresponding listener can be read from the shared memory according to the obtained target listener identifier and / or target load balancing network element identifier and the set interval duration.

[0109] As some examples, you can add configuration items in the VTS module to filter statistical information by service ID. This service ID can include the load balancing instance ID and the listener ID. After the VTS module is configured, each time the interface provided by the module is called, the cumulative value of the response code of the listener where each load balancing instance is located can be obtained in real time.

[0110] The Agent is responsible for filtering and assembling the statistical information to obtain the monitoring information needed. The Monitor process is then called at intervals of every minute to collect the response code rate of the seven-layer load balancing network element.

[0111] Step 304: Report the response code rate to the database for display on the tenant monitoring platform.

[0112] In practical applications, the calculated response code rate data can be sent to a database for storage. A database is a centralized data storage system that can efficiently store, retrieve, and manage large amounts of data.

[0113] The tenant monitoring platform refers to a monitoring and display platform for tenants (i.e., customers or users who use load balancing services). It can provide a graphical interface so that tenants can intuitively understand the performance and status of the load balancing services they use.

[0114] As some examples, once the response code rate data is stored in the database, the tenant monitoring platform can retrieve this data from the database and display it in the form of charts, dashboards, etc. In this way, tenants can understand the response code rate of their load balancing services in real time, as well as possible performance bottlenecks or problems.

[0115] In an embodiment of the present invention, an access request for a virtual host of a tenant in a cloud computing platform is received, and the access request is processed by a load balancing network element in the cloud computing platform; the current response code of the load balancing network element for the access request is obtained, and according to the current response code, the response code cumulative value corresponding to the current response code is updated in a shared memory; the response code cumulative value is collected from the shared memory according to the interval duration, and the response code rate is determined according to the response code cumulative value and the interval duration obtained from the shared memory for two adjacent times; the response code rate is reported to a database for display on a tenant monitoring platform, thereby achieving optimized processing of response code monitoring data of the load balancing network element in the cloud computing platform, and improving the timeliness and convenience of processing response code monitoring data of the load balancing network element.

[0116] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0117] Reference Figure 4 , showing a structural schematic diagram of a data processing device based on a cloud computing platform provided by some embodiments of the present invention, wherein the cloud computing platform deploys a server cluster and a load balancing cluster, and the cloud computing platform provides virtual hosts for tenants through the server cluster and provides load balancing network elements through the load balancing cluster.

[0118] Specifically, the following modules may be included:

[0119] The access request processing module 401 is used to receive an access request for a virtual host of a tenant in the cloud computing platform, and process the access request through a load balancing network element in the cloud computing platform;

[0120] A response code cumulative value updating module 402 is used to obtain the current response code of the load balancing network element to the access request, and update the response code cumulative value corresponding to the current response code in the shared memory according to the current response code;

[0121] A response code rate determination module 403, configured to collect response code accumulation values ​​from the shared memory according to an interval duration, and determine a response code rate according to two consecutive response code accumulation values ​​obtained from the shared memory and the interval duration;

[0122] The response code rate display module 404 is used to report the response code rate to the database for display on the tenant monitoring platform.

[0123] In some embodiments of the present invention, the device further comprises:

[0124] A field adding module is used to add a response code cumulative value field for a target response code in a preset structure;

[0125] The response code cumulative value updating module 402 includes:

[0126] The response code cumulative value increasing submodule is used to increase the response code cumulative value recorded in the response code cumulative value field for the target response code when detecting that the current response code is the target response code.

[0127] In some embodiments of the present invention, the response code rate determination module 403 includes:

[0128] The identification acquisition submodule is used to obtain the target listener identification and / or target load balancing network element identification to be collected; wherein each load balancing network element corresponds to multiple listeners, and different listeners listen to different types of access requests;

[0129] The response code cumulative value collection submodule is used to collect the response code cumulative value from the shared memory according to the target listener identifier and / or the target load balancing network element identifier at an interval; wherein the shared memory records the response code cumulative value according to the dimension of the listener in the load balancing network element.

[0130] In some embodiments of the present invention, the response code rate determination module 403 includes:

[0131] A difference determination submodule, used to determine a difference according to the cumulative value of the response code obtained from the shared memory twice adjacently;

[0132] The response code rate determination submodule is used to determine the response code rate according to the difference and the interval duration.

[0133] In some embodiments of the present invention, the response code rate determination submodule includes:

[0134] The summing unit is used to sum the differences of the multiple load balancing network elements when there are multiple load balancing network elements to obtain the sum of the differences, and use the sum of the differences and the interval duration to determine the response code rate.

[0135] In some embodiments of the present invention, the response code cumulative value updating module 402 includes:

[0136] A monitoring data acquisition submodule, used to obtain monitoring data of the load balancing network element for the access request;

[0137] The monitoring data parsing submodule is used to parse the monitoring data into a specified format, and obtain the current response code of the load balancing network element to the access request through the monitoring data in the specified format.

[0138] In some embodiments of the present invention, the load balancing network element is a seven-layer load balancing network element.

[0139] In an embodiment of the present invention, an access request for a virtual host of a tenant in a cloud computing platform is received, and the access request is processed by a load balancing network element in the cloud computing platform; the current response code of the load balancing network element for the access request is obtained, and according to the current response code, the response code cumulative value corresponding to the current response code is updated in a shared memory; the response code cumulative value is collected from the shared memory according to the interval duration, and the response code rate is determined according to the response code cumulative value and the interval duration obtained from the shared memory for two adjacent times; the response code rate is reported to a database for display on a tenant monitoring platform, thereby achieving optimized processing of response code monitoring data of the load balancing network element in the cloud computing platform, and improving the timeliness and convenience of processing response code monitoring data of the load balancing network element.

[0140] Some embodiments of the present invention further provide an electronic device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the above method is implemented when the computer program is executed by the processor.

[0141] Some embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, and the computer program implements the above method when executed by a processor.

[0142] Some embodiments of the present invention further provide a computer program product, including a computer program, which implements the above method when executed by a processor.

[0143] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0144] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0145] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0146] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0147] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0148] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0149] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0150] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0151] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the above elements.

[0152] The data processing method, device, equipment and medium based on the cloud computing platform are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A data processing method based on a cloud computing platform, characterized in that: The cloud computing platform deploys a server cluster and a load balancing cluster. The cloud computing platform provides a virtual host for a tenant through the server cluster and provides a load balancing network element through the load balancing cluster, including: Receiving an access request for a virtual host of a tenant in the cloud computing platform, and processing the access request through a load balancing network element in the cloud computing platform; Obtaining a current response code of the load balancing network element to the access request, and updating a response code accumulation value corresponding to the current response code in a shared memory according to the current response code; Collecting the response code accumulation value from the shared memory according to the interval duration, and determining the response code rate according to the response code accumulation value obtained from the shared memory for two consecutive times and the interval duration; The response code rate is reported to the database for display on the tenant monitoring platform.

2. The method according to claim 1, characterized in that Before receiving the access request for the virtual host of the tenant in the cloud computing platform, the method further includes: In the preset structure, add a response code cumulative value field for the target response code; The updating, in a shared memory, of a response code accumulation value corresponding to the current response code according to the current response code includes: When it is detected that the current response code is the target response code, the response code cumulative value recorded in the response code cumulative value field for the target response code is increased.

3. The method according to claim 1, characterized in that The step of collecting the response code accumulation value from the shared memory according to the interval duration includes: Obtaining a target listener identifier and / or a target load balancing network element identifier to be collected; wherein each load balancing network element corresponds to multiple listeners, and different listeners listen to different types of access requests; According to the target listener identifier and / or the target load balancing network element identifier, the response code cumulative value is collected from the shared memory according to the interval duration; wherein the shared memory records the response code cumulative value according to the dimension of the listener in the load balancing network element.

4. The method according to any one of claims 1 to 3, characterized in that: The step of determining the response code rate according to the cumulative value of the response codes obtained from the shared memory for two consecutive times and the interval duration includes: Determine a difference value according to cumulative values ​​of response codes obtained from the shared memory twice adjacently; A response code rate is determined according to the difference and the interval duration.

5. The method according to claim 4, characterized in that The determining the response code rate according to the difference and the interval duration includes: In the case where there are multiple load balancing network elements, the differences of the multiple load balancing network elements are summed to obtain a difference sum, and the difference sum and the interval duration are used to determine the response code rate.

6. The method according to any one of claims 1 to 3, characterized in that: The obtaining of a current response code of the load balancing network element to the access request includes: Obtaining monitoring data of the load balancing network element for the access request; The monitoring data is parsed into a specified format, and a current response code of the load balancing network element to the access request is obtained through the monitoring data in the specified format.

7. The method according to claim 1, characterized in that The load balancing network element is a seven-layer load balancing network element.

8. A data processing device based on a cloud computing platform, characterized in that: The cloud computing platform deploys a server cluster and a load balancing cluster. The cloud computing platform provides a virtual host for a tenant through the server cluster and provides a load balancing network element through the load balancing cluster, including: An access request processing module, used to receive an access request for a virtual host of a tenant in the cloud computing platform, and process the access request through a load balancing network element in the cloud computing platform; A response code cumulative value updating module, used to obtain the current response code of the load balancing network element to the access request, and update the response code cumulative value corresponding to the current response code in the shared memory according to the current response code; A response code rate determination module, used to collect the response code cumulative value from the shared memory according to the interval duration, and determine the response code rate according to the response code cumulative value obtained from the shared memory for two consecutive times and the interval duration; The response code rate display module is used to report the response code rate to the database for display on the tenant monitoring platform.

9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the method according to any one of claims 1 to 7 when executed by the processor.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Cloud big data acquisition crawler system

    CN118349719A

  • System for Communicating Between Two Electrical Devices and Method Therefore

    US20120054400A1