Capacity processing method and device based on application client and related equipment
By implementing capacity processing methods based on application clients on the server, generating and issuing service scheduling policy information, the business cluster stability problems caused by the client distribution in different regions and operator environments are solved, and the priority guarantee of server stability and user access experience is achieved.
Patent Information
- Application Number
- CN202510282733.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-05-13
AI Technical Summary
In the Internet era, clients are distributed in different regions and operator environments, resulting in the inability to ensure the stability of the business cluster. How to prioritize the stability of the server and user access experience has become an urgent problem.
By implementing a capacity processing method based on the application client on the server, using the capacity management service component and the regional election and policy issuance service component, generating business scheduling policy information, and sending it to the client, so that the client automatically selects the optimal connection method, realizing capacity control and service cluster stability guarantee.
Under the premise of priority guarantee, the stability of the server, the stability of the business cluster and user access experience are guaranteed to the greatest extent, and ensure that the stability of the business cluster is automatically guaranteed when capacity impacts.
Smart Images

Figure CN119996521A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of communication between a client and a server, and more specifically, to a capacity processing method, apparatus and related equipment based on an application client. Background Art
[0002] In the Internet era, clients of a huge number of applications request the server interface through the Hypertext Transfer Protocol (HTTP) to obtain the required data. Clients are distributed in different countries, provinces, cities and other geographical information, and between operators. Their network environments are different, which makes it impossible to guarantee the stability of the business cluster.
[0003] Therefore, how to ensure the stability of the business cluster is an urgent problem to be solved in this application. Summary of the invention
[0004] In view of this, the present application discloses a capacity processing method, apparatus and related equipment based on an application client, aiming to maximize the stability of the server, the stability of the business cluster and the user access experience under the premise of priority guarantee.
[0005] In order to achieve the above purpose, the disclosed technical solution is as follows:
[0006] The first aspect of the present application discloses a capacity processing method based on an application client, the method is applied to a server, and the method includes:
[0007] When receiving a request from a client, obtain general area information and business information pre-configured by the capacity management service component;
[0008] According to the regional election and policy delivery service component, the client is queried to see whether there is election data and the query result is obtained;
[0009] Generate a corresponding service scheduling method according to the query result, and generate service scheduling strategy information according to the service scheduling method; wherein the service scheduling strategy information represents the optimal route selected by an automated election method;
[0010] Sending the service scheduling policy information to the client, so that the client initiates a request to each cluster in the service scheduling policy information, and sends a voting request to the regional election and policy delivery service component with the obtained request data;
[0011] The votes corresponding to the voting request are counted in the regional voting information to complete the network request process with the client.
[0012] Preferably, the process of generating election data includes:
[0013] Obtain the election report data of each region and determine the data volume corresponding to the election report data of each region;
[0014] Determining whether the data in each region is sufficient based on the data volume;
[0015] If it is insufficient, end the generation of election data;
[0016] If sufficient, calculate the error rate and latency of each cluster in each area;
[0017] Rank the error rates of the clusters in reverse order to obtain an error rate ranking, and rank the delays of the clusters in reverse order to obtain a delay ranking;
[0018] Calculating the error rate ranking and the delay ranking to obtain a cluster score for each region;
[0019] Calculate the estimated capacity of each area;
[0020] Determine the cluster ranking of each region according to the cluster score of each region and the estimated capacity of each region;
[0021] The ranking of each regional cluster is written into the valid election data to complete the generation process of the election data.
[0022] Preferably, the process of regional election reporting includes:
[0023] Obtaining the reported data of the client; wherein the reported data is determined by the access data obtained by the client accessing the access situation of each cluster test interface; the access data at least includes the number of accesses to each cluster, the number of errors of each cluster and the response delay of each request of each cluster;
[0024] Parse the IP address of the client to obtain region information and operator information, and combine the region information and operator information to obtain a combined region;
[0025] The reported data is counted into the combined area to complete the process of regional election reporting.
[0026] Preferably, generating a corresponding service scheduling mode according to the query result, and generating service scheduling strategy information according to the service scheduling mode, includes:
[0027] If the query result indicates that no election data is found in the client, first service scheduling strategy information is generated according to a first generation method; wherein the first generation method is determined by the capacity ratio between the service cluster and the service flood discharge cluster in the service information;
[0028] If the query result indicates that election data exists in the client, second service scheduling policy information is generated according to a second generation method; wherein the second generation method is determined by the election data and the regional election reporting data of the client.
[0029] Preferably, the process of counting the votes corresponding to the voting request into the regional voting information to complete the network request with the client includes:
[0030] Requesting each cluster in the service scheduling strategy information according to a preset ratio to obtain request data;
[0031] Through the request data, a voting request is initiated to the regional election and policy delivery service component, so that the regional election and policy delivery service component counts the votes corresponding to the voting request into the relevant regional voting information according to the source IP corresponding to the voting request, so as to complete the network request process with the client.
[0032] The second aspect of the present application discloses a capacity processing device based on an application client, the device is applied to a server, and the device includes:
[0033] An acquisition unit, configured to acquire, when receiving a request from a client, general area information and business information pre-configured by the capacity management service component;
[0034] A query unit, used to query whether the client has election data according to the regional election and policy delivery service component, and obtain the query result;
[0035] A generating unit, configured to generate a corresponding service scheduling mode according to the query result, and generate service scheduling strategy information according to the service scheduling mode; wherein the service scheduling strategy information represents an optimal route selected by an automated election method;
[0036] An initiating unit, configured to send the service scheduling policy information to a client, so that the client initiates a request to each cluster in the service scheduling policy information, and initiates a voting request to a regional election and policy delivery service component with the obtained request data;
[0037] The counting unit is used to count the votes corresponding to the voting request into the regional voting information to complete the process of network request with the client.
[0038] Preferably, the query unit of the election data generation process includes:
[0039] The first acquisition module is used to acquire the election report data of each region and determine the data volume corresponding to the election report data of each region;
[0040] A judgment module, used to judge whether the data in each area is sufficient according to the data volume;
[0041] An end module, used to end the generation of election data if it is insufficient;
[0042] A first calculation module, used to calculate the error rate and delay of each cluster in each area if sufficient;
[0043] A ranking module, used to rank the error rates of the clusters in reverse order to obtain an error rate ranking, and to rank the delays of the clusters in reverse order to obtain a delay ranking;
[0044] A second calculation module is used to calculate the error rate ranking and the delay ranking to obtain a cluster score for each region;
[0045] The third calculation module is used to calculate the estimated capacity of each area;
[0046] A determination module, configured to determine a ranking of clusters in each region according to the cluster scores of each region and the estimated capacity of each region;
[0047] The writing module is used to write the rankings of the regional clusters into the valid election data to complete the generation process of the election data.
[0048] Preferably, the first acquisition module of the regional election report includes:
[0049] The acquisition submodule is used to obtain the reported data of the client; wherein the reported data is determined by the access data obtained by the client accessing the access situation of each cluster test interface; the access data at least includes the number of accesses to each cluster, the number of errors of each cluster and the response delay of each request of each cluster;
[0050] The parsing submodule is used to parse the IP address of the client, obtain the region information and the operator information, and combine the region information and the operator information to obtain the combined area;
[0051] The counting submodule is used to count the reported data into the combined area to complete the process of regional election reporting.
[0052] A third aspect of the present application discloses a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the capacity processing method based on the application client as described in any one of the first aspects.
[0053] The fourth aspect of the present application discloses an electronic device, comprising a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the application client-based capacity processing method as described in any one of the first aspects.
[0054] It can be known from the above technical scheme that the present application discloses a capacity processing method, device and related equipment based on an application client. When a request from the client is obtained, the general area information and business information pre-configured by the capacity management service component are obtained, and the client is queried whether there is election data according to the regional election and policy delivery service component to obtain the query result, and a corresponding business scheduling method is generated according to the query result, and business scheduling policy information is generated according to the business scheduling method, wherein the business scheduling policy information represents the optimal route selected by an automated election method, and the business scheduling policy information is sent to the client so that the client initiates a request to each cluster in the business scheduling policy information, and the obtained request data is sent to the regional election and policy delivery service component to initiate a voting request, and the vote corresponding to the voting request is counted in the regional voting information to complete the network request process with the client.
[0055] Through the above scheme, through the election of clients in the same area, the server will generate business scheduling strategy information according to the business scheduling method and send it to the user client. The business scheduling strategy information is the optimal route under the dual considerations of security and capacity, so that the client automatically uses the optimal connection method. Since the capacity management service component provides a business water level configuration function for configuring the maximum capacity of each business cluster, an election capacity allocation function for allocating capacity ratios according to the maximum capacity of each cluster, and a capacity control function for the ability of business flood discharge cluster configuration, this scheme can control capacity and automatically ensure the stability of the business cluster when the capacity is impacted, so that under the premise of priority protection, the stability of the server, the stability of the business cluster and the user access experience are guaranteed to the greatest extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present application 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 embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0057] Figure 1 A schematic diagram of a capacity processing architecture based on an application client disclosed in an embodiment of the present application;
[0058] Figure 2 A schematic diagram of the generation of election data disclosed in the embodiments of this application;
[0059] Figure 3 A schematic diagram of the regional election report disclosed in the embodiment of the present application;
[0060] Figure 4 A schematic diagram of generating service scheduling strategy information disclosed in an embodiment of the present application;
[0061] Figure 5 A flow chart of a capacity processing method based on an application client disclosed in an embodiment of the present application;
[0062] Figure 6 A schematic diagram of the structure of a capacity processing device based on an application client disclosed in an embodiment of the present application;
[0063] Figure 7 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0065] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising 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 device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0066] As can be seen from the background technology, in the Internet era, a large number of applications are clients requesting the server interface through the Hypertext Transfer Protocol (HTTP) protocol to obtain the required data. Clients are distributed in different countries, provinces, cities and other regional information, operators, and their network environments are different. If there is an important area to protect, the general domain name scheduling is complicated and difficult to manage, so that the stability of the business cluster cannot be guaranteed. Therefore, how to ensure the stability of the business cluster is an urgent problem to be solved in this application.
[0067] In order to solve the above problems, the present application discloses a capacity processing method and device based on an application client. Through the election of clients in the same area, the server generates business scheduling strategy information according to the business scheduling method and sends it to the user client. The business scheduling strategy information is the optimal line under the dual consideration of security and capacity, so that the client automatically uses the optimal connection method. Since the capacity management service component provides a business water level configuration function for configuring the maximum capacity of each business cluster, an election capacity allocation function for allocating capacity ratios according to the maximum capacity of each cluster, and a capacity control function for the ability of the business flood discharge cluster configuration, this solution can control the capacity and automatically ensure the stability of the business cluster when the capacity is impacted, so that under the premise of priority guarantee, the stability of the server, the stability of the business cluster and the user access experience are guaranteed to the greatest extent. The specific implementation method is specifically described through the following embodiments.
[0068] refer to Figure 1 As shown, it is a schematic diagram of the capacity processing architecture based on the application client disclosed in the embodiment of the present application, and the capacity processing architecture based on the application client includes a server and a client, wherein the server includes a capacity management service component and a regional election and policy delivery service component. The client includes a client network module.
[0069] The regional election function and the request policy delivery function of the server are provided in the regional election and policy delivery service component; among them, the regional election function of the server refers to the server performing effective elections according to the access data and delay data reported by the client lock to form effective election data; the function of generating scheduling strategies through the cluster configuration information and key security information configured in the capacity management service component; the request policy delivery function refers to the function used to obtain access strategies in response to requests initiated by clients.
[0070] The capacity management service component provides business water level configuration function, election capacity allocation function and capacity control function. Among them, the business water level configuration function is used to configure the maximum capacity of each business cluster. The maximum capacity of each cluster is an initialization data. The maximum capacity of each cluster is set according to the actual situation. This application does not make specific restrictions; the election capacity allocation function is used to allocate capacity ratios according to the maximum capacity of each cluster. The capacity ratio is also an initialization data; the capacity control function is the ability of the business flood discharge cluster configuration.
[0071] The client network module provides regional election function and network request function. The client regional election function is a function in which the client records the test requests sent to each cluster through multiple requests according to the scheduling information sent by the server, and reports the test data after recording. The network request function is used to automatically request the backend (ie, client) service according to the scheduling results.
[0072] Among the above components, the client, the region election and policy delivery service component, and the capacity management service can all communicate via the Hypertext Transfer Protocol (HTTP).
[0073] General regional information (recorded as data D01) can be configured in the capacity management service component through the backend (client). The general regional information includes at least the regional point (a combination of country + province + city + operator) and the guarantee level (which can be divided into multiple priority levels such as 1, 2, 3, etc. sorted by numbers, and the smaller the number, the higher the guarantee level).
[0074] Back-end personnel configure business information (recorded as data D02) in the capacity management service component. The business information at least includes the business name, business cluster information and region-related information. It should be noted that the data format of region-related information is consistent with the D01 data format, and its effectiveness priority is higher than D01. If not configured, the general configuration D01 is used; each business includes at least 1 (1 or more) business clusters and 1 business flood discharge cluster; the business cluster and business flood discharge cluster at least include the cluster name, cluster access point (IP or domain name), and cluster maximum capacity. The cluster maximum capacity refers to the maximum query rate per second (Queries PerSecond, QPS).
[0075] It should be noted that both the business cluster and the business flooding cluster provide normal backend services. For example, when requesting the advertisement string interface, the business cluster returns the advertisement playback string address to the client. When the business is overloaded, the business flooding cluster dispatches all other business traffic to the flooding cluster after the ordinary business cluster carries the business volume it can carry. Among them, other business traffic refers to all other business traffic except the business traffic carried by the ordinary cluster.
[0076] To facilitate understanding of how to configure general area information in the capacity management service component, take the client requesting the splash screen ad string retrieval service as an example:
[0077] For example, deploy the regional election and policy delivery service component, capacity management service component, backend business cluster A, backend business cluster B, and business flood discharge cluster in the central computer room, start the service, and configure the general regional information in the capacity management service, as follows:
[0078] a) China-Hunan-Changsha-Telecom, priority: 1;
[0079] b) China-Beijing-Beijing-Telecom, priority: 1;
[0080] c) China-Guangdong-Guangzhou-China Unicom, priority: 2;
[0081] d) China-Guangdong-Foshan-Telecom, priority: 2;
[0082] e) China-Inner Mongolia-Chifeng-Telecom, priority: 3;
[0083] Configure the splash screen ad string retrieval service information in the capacity management service as follows:
[0084] a) Service name: Splash screen advertisement string extraction;
[0085] b) Business cluster information:
[0086] 1. Business cluster A: Cluster name: A; Cluster access point: 1.1.1.1; Cluster maximum capacity: 1000QPS;
[0087] 2. Business cluster B: Cluster name: B; Cluster access point: 1.1.1.2; Cluster maximum capacity: 2000QPS;
[0088] 3. Business flood discharge cluster: Cluster name: flood discharge cluster; Cluster access point: 1.1.1.3; Cluster maximum capacity: 2000QPS;
[0089] c) The relevant information of the region is as follows:
[0090] 1. China-Guangdong-Guangzhou-China Unicom, priority: 1.
[0091] The specific data interaction process between the capacity management service component, the regional election and policy delivery service component, and the client network module is as follows:
[0092] The regional election and policy delivery service component periodically pulls business-related information from the capacity management service component through the business information acquisition interface (recorded as request I01);
[0093] The regional election and policy delivery service component queries the client for election data and obtains the query result;
[0094] The process of generating election data is as follows: Figure 2 shown.
[0095] Figure 2 In S201: the server obtains the election report data of each region and determines the data volume corresponding to the election report data of each region.
[0096] The server enables the client to access each cluster test interface one by one according to the preset access times (N) and business information; and obtains access data by accessing the access status of each cluster test interface; wherein the access data at least includes the access times of each cluster, the error times of each cluster and the response delay of each request of each cluster.
[0097] Among them, the preset number of visits is set according to actual conditions and this application does not make any specific restrictions.
[0098] S202: Determine whether the data in each region is sufficient based on the data volume; if sufficient, execute S203; if not, execute S209.
[0099] Among them, if the data volume corresponding to the election report data of each region is greater than or equal to the preset data volume, it is determined that the corresponding data of each region is sufficient. If the data volume corresponding to the election report data of each region is less than the preset data volume, it is determined that the corresponding data of each region is insufficient.
[0100] The preset data volume is set according to the actual situation and this application does not make any specific restrictions.
[0101] S203: Calculate the error rate and delay of each cluster in each area.
[0102] In S203, the error rate of each cluster in each region is equal to the total number of test errors divided by the total number of tests. The delay of each cluster is equal to the total response delay time divided by the total number of tests;
[0103] S204: rank the error rates of each cluster in reverse order to obtain an error rate ranking, and rank the delays of each cluster in reverse order to obtain a delay ranking.
[0104] S205: Calculate the error rate ranking and the delay ranking to obtain a cluster score for each region.
[0105] In S205 , the score of each regional cluster is equal to the error rate ranking*error rate ratio (eg, 80%)+delay ranking*delay ratio (eg, 20%).
[0106] It should be noted that the error rate ratio and the delay ratio can be adjusted according to actual conditions, and this application does not make any specific limitations on the error rate ratio and the delay ratio.
[0107] S206: Calculate the estimated capacity of each area.
[0108] In S206, the method of calculating the estimated capacity of each region includes the method of calculating the estimated capacity of each region for the business with historical cluster election data and the method of calculating the estimated capacity of each region for the business with historical cluster election data. If the business has historical cluster election data, the capacity is estimated according to the election situation to obtain the estimated capacity of each region. If the business has no historical cluster election data, the region is directly allocated according to the cluster capacity ratio to obtain the estimated capacity of each region.
[0109] S207: Determine the ranking of each regional cluster according to the cluster score of each region and the estimated capacity of each region.
[0110] In S207, the clusters of each region are ranked according to their scores, and the scores of each region are determined in turn. Capacity is allocated according to the scores of each region, and the cluster with the highest regional score is preferably allocated to the region. If the capacity of the cluster can no longer meet the regional allocation, that is, the capacity of the cluster is less than the estimated capacity of the corresponding region, the next person will be replaced until the cluster of the region is elected, thereby determining the ranking of each region cluster.
[0111] S208: Write the ranking of each regional cluster into the valid election data to complete the election data generation process.
[0112] S209: End the generation of election data.
[0113] When the regional election and policy delivery service component obtains the service-related information for the first time, or the regional election and policy delivery service component fails to query the client's election data (i.e., valid election data), the regional election and policy delivery service component allocates the capacity ratio of each cluster (service cluster and flood discharge cluster) according to the capacity ratio of each cluster (service cluster and flood discharge cluster) in the D02 data, and generates the service scheduling policy information (recorded as data D03);
[0114] If it is not the case above (i.e. the regional election and policy delivery service queries the client election data), the regional election and policy delivery service component is sorted in descending order according to the score of the client election data; wherein, the client election data refers to the data scored by the average error rate and response delay of each business cluster of the voting request from the client in each region to the regional election and policy delivery service component; the election data is determined by the error rate ranking * 80% + delay ranking * 20%, and the proportion of the error rate ranking and the proportion of the delay ranking can be adjusted according to the actual situation, and this application does not make specific restrictions;
[0115] Generate a corresponding service scheduling method according to the query result, and generate service scheduling strategy information according to the service scheduling method (the service scheduling strategy information is the optimal route under the dual consideration of guarantee and capacity); wherein the service scheduling strategy information represents the optimal route selected by an automated election method;
[0116] At the same time, the regional election and policy delivery service component can calculate the capacity of each region by reporting data D04, and according to the relevant information of each cluster region in the D02 data (that is, the above-mentioned regional relevant information (the data is consistent with the D01 data format, the effective priority is higher than D01, and if not configured, the general configuration D01 is used)), the first preferred result in the election data is preferentially satisfied in the order of regional priority. If the capacity of the business cluster has reached 80% of the maximum capacity of the cluster (the proportion of the maximum capacity of the cluster can be adjusted according to the actual situation, and this application does not make specific restrictions), the second preferred result of the region is set to 100%, and the other results are 0%, and so on until the business flooding cluster, and finally the business scheduling strategy information (recorded as data D03) is obtained;
[0117] The process of client testing and election reporting is as follows Figure 3 shown.
[0118] The client accesses each cluster test interface one by one through the acquired business information and the preset number of times (N) to obtain the access status;
[0119] The client obtains access data through access conditions, and performs tests based on the access data to obtain test results; wherein the access data at least includes the number of accesses to each cluster, the number of errors in each cluster, and the response delay of each request in each cluster;
[0120] The client reports the test results as reported data to the server;
[0121] The server receives the data reported by the client, analyzes the client's IP address, obtains the country, province, city, and operator information, and combines the country, province, city, and operator information to obtain the combined area.
[0122] The server obtains the reported data from the client; the reported data is determined by the access data obtained by the client accessing the test interface of each cluster; the access data includes at least the number of accesses to each cluster, the number of errors of each cluster and the response delay of each request of each cluster;
[0123] The reported data will be included in the combined area to complete the regional election reporting process.
[0124] To help you understand the process of client testing and election reporting, here is an example:
[0125] For example, after the client is started, it periodically requests the policy information interface of the regional election and policy delivery service through the client network module, obtains the policy information, and obtains the information of all cluster access points of the opening screen advertisement string retrieval service;
[0126] The client sends 100 requests to each cluster node and records the following data: the number of cluster accesses, the number of cluster failures, and the corresponding delays of all requests. Assume that the reported data is as follows:
[0127] Cluster A, 100 accesses, 0 failures, response delay: 10ms, 12ms (omitted later);
[0128] Cluster B, 100 accesses, 1 failure, response delay: 11ms, 18ms (omitted later);
[0129] The client reports the above-mentioned reporting data to the regional election and policy delivery service component;
[0130] After receiving the reported data, the regional election and policy delivery service component resolves the client IP address to 123.123.123.123, which indicates that the client is a user in the China-Beijing-Beijing-Telecom region. The above data is included in the China-Beijing-Beijing-Telecom region data.
[0131] Specifically obtain business scheduling strategy information, such as Figure 4 shown.
[0132] Figure 4 In the process, the server pulls all business information;
[0133] The server processes the Nth service information and generates a scheduling strategy; the scheduling strategy is the service scheduling strategy information;
[0134] Read the general key area configuration to obtain the service information; wherein the general key area configuration is the general area information mentioned above, and the general area information is configured in the capacity management service, such as China-Hunan-Changsha-Telecom, priority: 1;
[0135] Determine whether the business information contains independent key area information; wherein the independent key area information is the same as the general key area configuration, except that an independent configuration of the business can be set for a certain business to cover or supplement the key area configuration;
[0136] If the business information contains independent key area information, the independent key area information contained in the business information is overwritten with the information in the general configuration containing independent key areas to generate key area information;
[0137] If the service information does not contain independent key area information, the key area information is generated according to the key area information in the general configuration (such as China-Hunan-Changsha-Telecom, priority: 1); the independent key area information is the same as the general key area configuration, except that an independent configuration can be set for a certain service to cover or supplement the key area configuration;
[0138] According to the key area information, the priority is arranged in ascending order; if the priority is the same, it is arranged in alphabetical order; for example, the key area information (1) and the key area information (2) are both of the same priority 1, the first letter of the key area information (1) is a, and the first letter of the key area information (2) is c, then the arrangement order is key area information (1), key area information (2);
[0139] Read the Nth business information, and query whether valid election data is generated according to the Nth business information;
[0140] If no valid election data is generated, calculate the total capacity, where the total capacity is equal to the sum of the capacities of all clusters of the service;
[0141] Calculate the allocation ratio of each cluster based on the total capacity and the capacity of each cluster; where the capacity ratio of each cluster = capacity of each cluster / total capacity;
[0142] Generate business scheduling strategy information based on the allocation ratio of each cluster to complete the current business scheduling;
[0143] Determine whether all business has been allocated;
[0144] If all business assignments are completed, the process ends;
[0145] If all services have not been allocated, the process returns to the step of processing the Nth service information and generating a scheduling strategy;
[0146] If valid election data is generated, the capacity allocation of the service cluster in the Mth region is started, and the allocated capacity of the cluster in the current priority is obtained; for example, cluster No. 1 is the first choice in the current region, and the current priority is cluster No. 1;
[0147] Sum the allocated capacity and pre-allocated capacity of the current priority cluster and determine whether the calculated result is greater than 80% of the total capacity of the cluster (this ratio can be adjusted according to actual conditions and is not specifically limited in this application);
[0148] If the calculated result is less than or equal to 80% of the total cluster capacity, the region being processed is assigned to the current priority cluster, and it is determined whether all regions have been assigned;
[0149] If all areas are allocated, it is determined that the current business scheduling is completed, and it is determined whether all businesses are allocated;
[0150] If all business assignments are completed, the process ends;
[0151] If all services have not been allocated, the process returns to the step of processing the Nth service information and generating a scheduling strategy;
[0152] If the calculated result is greater than 80% of the total cluster capacity, determine whether it has been allocated to the last-ranked cluster. For example, there are three business clusters, A\B\C, and flood discharge cluster D, ranked BCA, and the last-ranked cluster is A.
[0153] If it is not allocated to the last-ranked cluster, increase the ranking by 1 and return to the step of determining whether the calculation result is greater than 80% of the total cluster capacity;
[0154] If it has been allocated to the last-ranked cluster, assign all areas of the allocated cluster to the business flood discharge cluster, and determine whether all areas have been allocated;
[0155] If all areas have not been allocated, the process returns to the step of processing the Nth business information and generating a scheduling strategy;
[0156] If all areas are allocated, complete the current business scheduling and determine whether all businesses are allocated;
[0157] If all business assignments are completed, the process ends;
[0158] If all business allocations are not completed, the process returns to the step of processing the Nth business information and generating a scheduling strategy.
[0159] To facilitate understanding of the process of obtaining service scheduling policy information, an example is given here:
[0160] For example, the process of generating regional scheduling data is as follows:
[0161] The regional election and policy delivery service component requests the capacity management service to obtain business information (D02) and general key area configuration information, which is:
[0162] Business Information: [
[0164] {
[0165] "Service": "ad-kaiping",
[0166] "Cluster": {
[0167] "Normal": [
[0168] {
[0169] "Name": "A",
[0170] "Point": "1.1.1.1",
[0171] "Limit": 1000
[0172] },
[0173] {
[0174] "Name": "B",
[0175] "Point": "1.1.1.2",
[0176] "Limit": 2000
[0177] }
[0178] ],
[0179] "Low": {
[0180] "Name": "Low",
[0181] "Point": "1.1.1.3",
[0182] "Limit": 2000
[0183] }
[0184] },
[0185] "Zone": [
[0186] {
[0187] "N": "china",
[0188] "C": "guangzhou",
[0189] "P": "guangdong",
[0190] "ISP": "CUCC",
[0191] "Level": 1
[0192] } ]
[0194] } ]
[0196] The general key area configuration information is as follows:
[0197] a) China-Hunan-Changsha-Telecom, priority: 1;
[0198] b) China-Beijing-Beijing-Telecom, priority: 1;
[0199] c) China-Guangdong-Guangzhou-China Unicom, priority: 2;
[0200] d) China-Guangdong-Foshan-Telecom, priority: 2;
[0201] e) China-Inner Mongolia-Chifeng-Telecom, priority: 3;
[0202] The regional election and policy delivery service component locally stores the above-mentioned general key regional configuration information;
[0203] The regional election and policy delivery service component overwrites the general configuration information with the regional information in the business information and generates the following information:
[0204] Configuration information of key areas of the splash screen ad extraction service:
[0205] a) China-Hunan-Changsha-Telecom, priority: 1;
[0206] b) China-Beijing-Beijing-Telecom, priority: 1;
[0207] c) China - Guangdong - Guangzhou - China Unicom, priority: 1 (covered by independent configuration, where independent configuration coverage refers to the business-specific priority configuration for c) China - Guangdong - Guangzhou - China Unicom);
[0208] d) China-Guangdong-Foshan-Telecom, priority: 2;
[0209] e) China-Inner Mongolia-Chifeng-Telecom, priority: 3;
[0210] The regional election and policy delivery service generates scheduling data. If it is found that there is no valid election data (valid election data means that there is no data in the reverse ranking of error rate and delay), the following scheduling data is generated:
[0211] a) China-Hunan-Changsha-Telecom, priority: 1, cluster ratio: A-20%, B-40%, LOW-40%;
[0212] b) China-Beijing-Beijing-Telecom, priority: 1, cluster ratio: A-20%, B-40%, LOW-40%;
[0213] c) China-Guangdong-Guangzhou-China Unicom, priority: 1, cluster ratio: A-20%, B-40%, LOW-40%;
[0214] d) China-Guangdong-Foshan-Telecom, priority: 2, cluster ratio: A-20%, B-40%, LOW-40%;
[0215] e) China-Inner Mongolia-Chifeng-Telecom, priority: 3, cluster ratio: A-20%, B-40%, LOW-40%;
[0216] The regional election and policy delivery service generates scheduling data. If valid election data is found, the following scheduling data is generated:
[0217] The process of generating valid election data is as follows:
[0218] The regional election and policy delivery service pulls all regional data from the splash screen ad string retrieval service and determines whether the data volume is greater than 100,000 requests. If it is less, the process ends directly. If it is greater, the process proceeds to the next step.
[0219] Calculate the error rate of each cluster by region, assuming (taking China-Beijing-Beijing-Telecom as an example):
[0220] China-Beijing-Beijing-Telecom:
[0221] a) Cluster A, 800,000 accesses, 5 failures, error rate: 0.000625%;
[0222] b) Cluster B, 800,000 accesses, 20 failures, error rate: 0.0025%;
[0223] Calculate the latency of each cluster by region, assuming China-Beijing-Beijing-Telecom as an example:
[0224] China-Beijing-Beijing-Telecom:
[0225] a) Cluster A, access times 800,000 times, total delay 8,000,000 ms, average delay: 10 ms;
[0226] b) Cluster B, access times 800,000 times, total delay 8,200,000 ms, average delay: 10.25 ms;
[0227] Ranking by error rate and delay in reverse order:
[0228] Cluster A: Error rate ranking 2, latency ranking 2, score: 2;
[0229] Cluster B: error rate ranking 1, delay ranking 1, equal score: 1;
[0230] The valid election data that can be obtained is: China-Beijing-Beijing-Telecom, cluster priority: A, B, and then through the number of visits analysis, the QPS is estimated to be 200. Finally, the valid election data is obtained: China-Beijing-Beijing-Telecom, cluster priority: A, B, capacity requirement: 200QPS.
[0231] Assume that the valid election data is as follows:
[0232] a) China-Beijing-Beijing-Telecom, cluster priority: A, B, capacity requirement: 200QPS;
[0233] b) China-Guangdong-Guangzhou-China Unicom, cluster priority: B, A, capacity requirement: 1600QPS;
[0234] c) China-Hunan-Changsha-Telecom, cluster priority: B, A, capacity requirement: 500QPS;
[0235] d) China-Guangdong-Foshan-Telecom, cluster priority: A, B, capacity requirement: 150QPS;
[0236] e) China-Inner Mongolia-Chifeng-Telecom, cluster priority: A, B, capacity requirement: 200QPS; capacity scheduling is performed accordingly, and the service scheduling strategy information is finally obtained as follows:
[0237] China - Beijing - Beijing - Telecom Preferred A cluster meets the following requirements:
[0238] a) China-Beijing-Beijing-Telecom, priority: 1, cluster ratio: A-100%, B-0%, LOW-0%;
[0239] China-Guangdong-Guangzhou-China Unicom prefers cluster B to meet the following requirements:
[0240] b) China-Guangdong-Guangzhou-China Unicom, priority: 1, cluster ratio: A-0%, B-100%, LOW-0%;
[0241] China-Hunan-Changsha-Telecom preferred cluster B has a capacity of more than 80% and does not meet the requirements, while the second choice cluster A meets the requirements:
[0242] c) China-Hunan-Changsha-Telecom, priority: 1, cluster ratio: A-100%, B-0%, LOW-0%;
[0243] China-Guangdong-Foshan-Telecom: The preferred cluster A has a capacity of more than 80% but does not meet the requirements. The second preferred cluster B has a capacity of more than 80% but does not meet the requirements. It is allocated to the LOW cluster:
[0244] d) China-Guangdong-Foshan-Telecom, priority: 2, cluster ratio: A-0%, B-0%, LOW-100%;
[0245] China-Inner Mongolia-Chifeng-Telecom The preferred cluster A capacity exceeds 80% but does not meet the requirements. The second choice cluster B capacity exceeds 80% but does not meet the requirements, so it is allocated to the LOW cluster:
[0246] e) China-Inner Mongolia-Chifeng-Telecom, priority: 3, cluster ratio: A-0%, B-0%, LOW-100%.
[0247] The regional election and policy delivery service component sends the business scheduling policy information to the client, so that the client initiates a request to each cluster in the business scheduling policy information, and sends the obtained request data (D04) to the regional election and policy delivery service component to initiate a voting request;
[0248] After the client is started, it regularly obtains the service scheduling policy information D03 by requesting the policy information interface (recorded as request I02) from the regional election and policy distribution service component through the client network module. The client network module subsequently requests the service in proportion to each cluster in the D03 information;
[0249] The regional election and policy delivery service component counts the votes corresponding to the voting request into the regional voting information to complete the process of network request with the client.
[0250] This application uses the election of clients in the same region, and the server sends the optimal line considering both security and capacity to the user client. The client automatically uses the optimal connection method to maximize the stability of the server and the user access experience under the premise of priority protection. This application uses automated management and control to enable clients in the same region to select access points that are more suitable for the region when requesting the server, and regional scheduling facilitates the troubleshooting of common problems; this method includes the right to prioritize elections in important regions, which can focus on ensuring the stability of services in important regions, ensure sufficient capacity in important regions, and prevent traffic overload. This application improves user experience, especially in important regions; it can control capacity and automatically ensure the stability of business clusters when there is a capacity shock; regional scheduling facilitates the troubleshooting of common problems. This application achieves the purpose of improving stability through client regional elections and capacity control, that is, while automatically selecting the optimal line through elections, it ensures that the backend capacity water level achieves priority protection and improves system stability.
[0251] During the entire interface request process, after the client is started, it regularly sends a request policy information interface to the regional election and policy distribution service through the client network module to obtain the policy information; if other services need to be requested during its own operation, the request is made through the network SDK module, and the policy information data is passed to the network SDK module at the same time; the network SDK module initiates the request according to the policy, so the client can schedule according to the policy. This can ensure that the client can correctly obtain the required data while protecting the server from capacity shocks as much as possible, especially the clusters requested by key areas, thereby achieving the purpose of improving stability.
[0252] The beneficial effects of the embodiments of the present application are as follows: through the election of clients in the same area, the server will generate business scheduling strategy information according to the business scheduling method and send it to the user client. The business scheduling strategy information is the optimal route under dual considerations of security and capacity, so that the client automatically uses the optimal connection method. Since the capacity management service component provides a business water level configuration function for configuring the maximum capacity of each business cluster, an election capacity allocation function for allocating capacity ratios according to the maximum capacity of each cluster, and a capacity control function for the ability of the business flood discharge cluster configuration, this solution can control capacity and automatically ensure the stability of the business cluster when the capacity is impacted, so that under the premise of priority protection, the stability of the server, the stability of the business cluster and the user access experience are guaranteed to the greatest extent.
[0253] refer to Figure 5 As shown, a capacity processing method based on an application client disclosed in an embodiment of the present application is applied to the above embodiment. Figure 1 The disclosed server of the capacity processing architecture based on the application client, the capacity processing method based on the application client mainly comprises the following steps:
[0254] S501: When the server receives the request from the client, it obtains the general area information and business information pre-configured by the capacity management service component.
[0255] S502: The server queries the client for election data based on the regional election and policy delivery service component, and obtains the query result.
[0256] The process of generating election data mainly includes the following steps as shown in A1-A9:
[0257] A1: The server obtains the election report data of each region and determines the data volume corresponding to the election report data of each region.
[0258] The server enables the client to access each cluster test interface one by one according to the preset access times (N) and business information; and obtains access data by accessing the access status of each cluster test interface; wherein the access data at least includes the access times of each cluster, the error times of each cluster and the response delay of each request of each cluster.
[0259] A2: Determine whether the data in each region is sufficient based on the data volume. If sufficient, execute A3; if not, execute A9.
[0260] A3: Calculate the error rate and latency of each cluster in each area.
[0261] A4: Rank the error rates of each cluster in reverse order to obtain an error rate ranking, and rank the delays of each cluster in reverse order to obtain a delay ranking.
[0262] A5: Calculate the error rate ranking and latency ranking to obtain the cluster score of each region.
[0263] A6: Calculate the estimated capacity of each region.
[0264] A7: The ranking of clusters in each region is determined based on the cluster scores and estimated capacity of each region.
[0265] A8: Write the ranking of each regional cluster into the valid election data to complete the election data generation process.
[0266] A9: End the generation of election data.
[0267] The execution process and principle of A1-A9 and the implementation examples Figure 2 The execution process and execution principle of S201-S209 are consistent, which can be referred to and will not be repeated here.
[0268] S503: The server generates a corresponding service scheduling method according to the query result, and generates service scheduling strategy information (i.e., the optimal route under dual considerations of security and capacity) according to the service scheduling method; wherein the service scheduling strategy information represents the optimal route selected by an automated election method.
[0269] In S503, if the query result indicates that no election data is found on the client, first business scheduling strategy information (i.e., the optimal route under dual considerations of security and capacity) is generated according to a first generation method; wherein the first generation method is determined by the capacity ratio between the business cluster and the business flood discharge cluster in the business information; if the query result indicates that election data is found on the client, second business scheduling strategy information is generated according to a second generation method; wherein the second generation method is determined by the election data and the regional election reporting data of the client.
[0270] The execution process and execution principle of the process of generating business scheduling strategy information are similar to the above embodiment Figure 4 The execution process and execution principle are consistent, which can be used as a reference and will not be repeated here.
[0271] S504: The server sends the service scheduling policy information to the client, so that the client initiates a request to each cluster in the service scheduling policy information, and sends a voting request to the regional election and policy delivery service component with the obtained request data.
[0272] S505: The server counts the votes corresponding to the voting request into the regional voting information to complete the network request process with the client.
[0273] In S505, a request is made to each cluster in the business scheduling strategy information according to a preset ratio to obtain request data (D04). Through the request data, a voting request is initiated to the regional election and policy delivery service component, so that the regional election and policy delivery service component counts the votes corresponding to the voting request into the relevant regional voting information according to the source IP corresponding to the voting request, so as to complete the network request process with the client.
[0274] Among them, the preset ratio is set according to the actual situation and this application does not make any specific limitation.
[0275] The regional election and policy delivery service component sends the business scheduling policy information to the client, so that the client initiates a request to each cluster in the business scheduling policy information, and sends the obtained request data (D04) to the regional election and policy delivery service component to initiate a voting request.
[0276] After the client is started, it regularly obtains the service scheduling policy information D03 by requesting the policy information interface (recorded as request I02) from the regional election and policy distribution service component through the client network module. The client network module subsequently requests the service in proportion to each cluster in the D03 information.
[0277] The regional election and policy delivery service component counts the votes corresponding to the voting request into the regional voting information to complete the process of network request with the client.
[0278] The beneficial effects of the embodiments of the present application are as follows: through the election of clients in the same area, the server will generate business scheduling strategy information according to the business scheduling method and send it to the user client. The business scheduling strategy information is the optimal route under dual considerations of security and capacity, so that the client automatically uses the optimal connection method. Since the capacity management service component provides a business water level configuration function for configuring the maximum capacity of each business cluster, an election capacity allocation function for allocating capacity ratios according to the maximum capacity of each cluster, and a capacity control function for the ability of the business flood discharge cluster configuration, this solution can control capacity and automatically ensure the stability of the business cluster when the capacity is impacted, so that under the premise of priority protection, the stability of the server, the stability of the business cluster and the user access experience are guaranteed to the greatest extent.
[0279] Based on the above embodiments Figure 2 A capacity processing method based on an application client is disclosed, and an embodiment of the present application also discloses a capacity processing device based on an application client, such as Figure 6 , the capacity processing device based on the application client includes:
[0280] The acquisition unit 601 is used to acquire the general area information and service information pre-configured by the capacity management service component when acquiring the request of the client;
[0281] A query unit 602 is used to query whether there is election data on the client according to the regional election and policy delivery service component, and obtain a query result;
[0282] The generating unit 603 is used to generate a corresponding service scheduling mode according to the query result, and generate service scheduling strategy information according to the service scheduling mode; wherein the service scheduling strategy information represents the optimal route selected by the automated election method;
[0283] The initiating unit 604 is used to send the service scheduling policy information to the client, so that the client initiates a request to each cluster in the service scheduling policy information, and initiates a voting request to the regional election and policy delivery service component with the obtained request data;
[0284] The counting unit 605 is used to count the votes corresponding to the voting request into the regional voting information to complete the process of network request with the client.
[0285] Furthermore, the query unit 602 of the election data generation process includes:
[0286] The first acquisition module is used to acquire the election report data of each region and determine the data volume corresponding to the election report data of each region;
[0287] A judgment module is used to judge whether the data in each area is sufficient according to the data volume;
[0288] An end module, used to end the generation of election data if it is insufficient;
[0289] A first calculation module, used to calculate the error rate and delay of each cluster in each area if sufficient;
[0290] A ranking module is used to rank the error rates of each cluster in reverse order to obtain an error rate ranking, and to rank the delays of each cluster in reverse order to obtain a delay ranking;
[0291] A second calculation module is used to calculate the error rate ranking and the delay ranking to obtain a cluster score for each region;
[0292] The third calculation module is used to calculate the estimated capacity of each area;
[0293] A determination module, used to determine the cluster ranking of each region based on the cluster score of each region and the estimated capacity of each region;
[0294] The writing module is used to write the ranking of each regional cluster into the valid election data to complete the election data generation process.
[0295] Furthermore, the first acquisition module of the regional election report includes:
[0296] The acquisition submodule is used to obtain the reported data of the client; wherein the reported data is determined by the access data obtained by the client accessing the test interface of each cluster; the access data at least includes the number of accesses to each cluster, the number of errors of each cluster and the response delay of each request of each cluster;
[0297] The parsing submodule is used to parse the client IP, obtain the region information and operator information, and combine the region information and operator information to obtain the combined area;
[0298] The counting submodule is used to count the reported data into the combined area to complete the process of regional election reporting.
[0299] Furthermore, the generating unit 603 includes:
[0300] A first generating module is used to generate first service scheduling strategy information according to a first generating method if the query result indicates that no election data exists in the client; wherein the first generating method is determined by the capacity ratio between the service cluster and the service flood discharge cluster in the service information;
[0301] The second generating module is used to generate second service scheduling strategy information according to a second generating method if the query result indicates that election data exists in the client; wherein the second generating method is determined by the election data and the regional election reporting data of the client.
[0302] Further, it is included in unit 605, including:
[0303] A request module is used to request each cluster in the service scheduling strategy information according to a preset ratio to obtain request data;
[0304] The counting module is used to initiate a voting request to the regional election and policy delivery service component by requesting data, so that the regional election and policy delivery service component counts the votes corresponding to the voting request into the relevant regional voting information according to the source IP corresponding to the voting request, so as to complete the network request process with the client.
[0305] The beneficial effects of the embodiments of the present application are as follows: through the election of clients in the same area, the server will generate business scheduling strategy information according to the business scheduling method and send it to the user client. The business scheduling strategy information is the optimal route under dual considerations of security and capacity, so that the client automatically uses the optimal connection method. Since the capacity management service component provides a business water level configuration function for configuring the maximum capacity of each business cluster, an election capacity allocation function for allocating capacity ratios according to the maximum capacity of each cluster, and a capacity control function for the ability of the business flood discharge cluster configuration, this solution can control capacity and automatically ensure the stability of the business cluster when the capacity is impacted, so that under the premise of priority protection, the stability of the server, the stability of the business cluster and the user access experience are guaranteed to the greatest extent.
[0306] An embodiment of the present application further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned capacity processing method based on the application client.
[0307] The present application also provides an electronic device, whose structural diagram is as follows: Figure 7 As shown, it specifically includes a memory 701 and one or more instructions 702, wherein the one or more instructions 702 are stored in the memory 701 and are configured to be executed by one or more processors 703 to execute the one or more instructions 702 to perform the above-mentioned capacity processing method based on the application client.
[0308] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some 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 and modules involved are not necessarily required by the present application.
[0309] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0310] The steps in the methods of the embodiments of the present application can be adjusted in order, combined, and deleted according to actual needs.
[0311] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.
[0312] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
[0313] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A capacity processing method based on an application client, characterized in that: The method is applied to the server, and the method includes: When receiving a request from a client, obtain general area information and business information pre-configured by the capacity management service component; According to the regional election and policy delivery service component, the client is queried to see whether there is election data and the query result is obtained; Generate a corresponding service scheduling method according to the query result, and generate service scheduling strategy information according to the service scheduling method; wherein the service scheduling strategy information represents the optimal route selected by an automated election method; Sending the service scheduling policy information to the client, so that the client initiates a request to each cluster in the service scheduling policy information, and sends a voting request to the regional election and policy delivery service component with the obtained request data; The votes corresponding to the voting request are counted in the regional voting information to complete the network request process with the client.
2. The method according to claim 1, characterized in that The process of generating election data includes: Obtain the election report data of each region and determine the data volume corresponding to the election report data of each region; Determining whether the data in each region is sufficient based on the data volume; If it is insufficient, end the generation of election data; If sufficient, calculate the error rate and latency of each cluster in each area; Rank the error rates of the clusters in reverse order to obtain an error rate ranking, and rank the delays of the clusters in reverse order to obtain a delay ranking; Calculating the error rate ranking and the delay ranking to obtain a cluster score for each region; Calculate the estimated capacity of each area; Determine the cluster ranking of each region according to the cluster score of each region and the estimated capacity of each region; The ranking of each regional cluster is written into the valid election data to complete the generation process of the election data.
3. The method according to claim 2, characterized in that The process of regional election reporting includes: Obtaining the reported data of the client; wherein the reported data is determined by the access data obtained by the client accessing the access situation of each cluster test interface; the access data at least includes the number of accesses to each cluster, the number of errors of each cluster and the response delay of each request of each cluster; Parse the IP address of the client to obtain region information and operator information, and combine the region information and operator information to obtain a combined region; The reported data is counted into the combined area to complete the process of regional election reporting.
4. The method according to claim 1, characterized in that Generating a corresponding service scheduling method according to the query result, and generating service scheduling strategy information according to the service scheduling method, includes: If the query result indicates that no election data is found in the client, first service scheduling strategy information is generated according to a first generation method; wherein the first generation method is determined by the capacity ratio between the service cluster and the service flood discharge cluster in the service information; If the query result indicates that election data exists in the client, second service scheduling policy information is generated according to a second generation method; wherein the second generation method is determined by the election data and the regional election reporting data of the client.
5. The method according to claim 1, characterized in that The process of counting the votes corresponding to the voting request into the regional voting information to complete the network request with the client includes: Requesting each cluster in the service scheduling strategy information according to a preset ratio to obtain request data; Through the request data, a voting request is initiated to the regional election and policy delivery service component, so that the regional election and policy delivery service component counts the votes corresponding to the voting request into the relevant regional voting information according to the source IP corresponding to the voting request, so as to complete the network request process with the client.
6. A capacity processing device based on an application client, characterized in that: The device is applied to a server, and includes: An acquisition unit, configured to acquire, when receiving a request from a client, general area information and business information pre-configured by the capacity management service component; A query unit, used to query whether the client has election data according to the regional election and policy delivery service component, and obtain the query result; A generating unit, configured to generate a corresponding service scheduling mode according to the query result, and generate service scheduling strategy information according to the service scheduling mode; wherein the service scheduling strategy information represents an optimal route selected by an automated election method; An initiating unit, configured to send the service scheduling policy information to a client, so that the client initiates a request to each cluster in the service scheduling policy information, and initiates a voting request to a regional election and policy delivery service component with the obtained request data; The counting unit is used to count the votes corresponding to the voting request into the regional voting information to complete the process of network request with the client.
7. The device according to claim 6, characterized in that The query unit of the election data generation process includes: The first acquisition module is used to acquire the election report data of each region and determine the data volume corresponding to the election report data of each region; A judgment module, used to judge whether the data in each area is sufficient according to the data volume; An end module, used to end the generation of election data if it is insufficient; A first calculation module, used to calculate the error rate and delay of each cluster in each area if sufficient; A ranking module, used to rank the error rates of the clusters in reverse order to obtain an error rate ranking, and to rank the delays of the clusters in reverse order to obtain a delay ranking; A second calculation module is used to calculate the error rate ranking and the delay ranking to obtain a cluster score for each region; The third calculation module is used to calculate the estimated capacity of each area; A determination module, configured to determine a ranking of clusters in each region according to the cluster scores of each region and the estimated capacity of each region; The writing module is used to write the rankings of the regional clusters into the valid election data to complete the generation process of the election data.
8. The device according to claim 7, characterized in that The first acquisition module of regional election reports includes: The acquisition submodule is used to obtain the reported data of the client; wherein the reported data is determined by the access data obtained by the client accessing the access situation of each cluster test interface; the access data at least includes the number of accesses to each cluster, the number of errors of each cluster and the response delay of each request of each cluster; The parsing submodule is used to parse the IP address of the client, obtain the region information and the operator information, and combine the region information and the operator information to obtain the combined area; The counting submodule is used to count the reported data into the combined area to complete the process of regional election reporting.
9. A storage medium, characterized in that: The storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the capacity processing method based on the application client according to any one of claims 1 to 5.
10. An electronic device, characterized in that: It comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the capacity processing method based on the application client as described in any one of claims 1 to 5.
Citation Information
Cited By
Database cluster-based main / standby switching method, device and equipment
CN121579278A