A traffic switching method and traffic management server across public cloud active-active structure

The traffic management server determines and switches user access traffic to the public cloud platform, which solves the problems of traffic switching interruption and low stability when the public cloud fails, achieves fast and reliable traffic switching, and reduces the probability of failure and business losses.

CN113765705BActive Publication Date: 2024-10-15SHENZHEN ZHENAI JIEYUN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110923057.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-12
Publication Date
2024-10-15
Estimated Expiration
2041-08-12

AI Technical Summary

Technical Problem

In the existing technology, when the public cloud fails, the process of switching core business traffic to the disaster recovery cloud is easily interrupted. The switching time is long and the stability is low, resulting in serious business losses and poor user experience.

Method used

Obtain monitoring results through the traffic management server, determine the area unit to be switched and switch the user access traffic of the first public cloud platform to the second public cloud platform, use the DNS service provider API to change the DNS resolution to achieve traffic switching, and ensure the second public cloud The platform is active to reduce the probability of failure.

Benefits of technology

Shorten the traffic switching time, reduce the probability of failure during switching, improve the stability and work efficiency of the second public cloud, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113765705B_ABST
    Figure CN113765705B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a traffic switching method and traffic management server across a public cloud active-active structure, which is beneficial to improving the stability and work efficiency of the second public cloud as a disaster recovery cloud, and is beneficial to reducing the probability of failure of the second public cloud during traffic switching. The method of the embodiment of the present application includes: the traffic management server obtains at least one monitoring result corresponding to at least one preset regional unit, each monitoring result includes a first interface status code set and a first response time set of the first public cloud platform, a second interface status code set and a second response time set of the second public cloud platform, and the first public cloud platform and the second public cloud platform constitute an active-active public cloud platform; for any one of the monitoring results, the traffic management server determines whether the preset regional unit corresponding to the monitoring result is a regional unit to be switched; if so, the traffic management server switches the user access traffic of the first public cloud platform in the regional unit to be switched to the second public cloud platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of Internet technology, and in particular to a traffic switching method and a traffic management server across a public cloud active-active structure. Background Art

[0002] With the continuous development of Internet technology, more and more businesses operate their core businesses through services provided by a public cloud. The quality and reliability of the services are completely dependent on the public cloud. In order to prevent the core business of the business from being paralyzed when the public cloud has a decline in service quality or is unavailable, disaster recovery cloud came into being.

[0003] In the prior art, the first public cloud, which serves as the primary cloud service, usually receives and processes core business traffic, and periodically backs up the core business-related data to the second public cloud, which serves as a disaster recovery cloud. When the first public cloud experiences a decline in service quality or becomes unavailable, the second public cloud is enabled to provide cloud services.

[0004] However, when the first public cloud fails, the merchant's core business will be interrupted during the process of switching the core business traffic of the first public cloud to the second public cloud until the traffic switching is successful. The traffic switching may easily cause the core business connected to the first public cloud to be unavailable, and the process of starting the second public cloud usually takes half an hour, an hour or even longer, resulting in serious losses to the core business and low working efficiency of the second public cloud. At the same time, the backup mode of the second public cloud is cold standby, which is usually in an inactive state. When the second public cloud is enabled, the second public cloud is prone to failure, resulting in the failure of switching the core business traffic, which makes the business connected to the cloud service unable to operate normally, the stability of the traffic switching is low, and the user experience is not high. Summary of the invention

[0005] The embodiment of the present application provides a traffic switching method and a traffic management server across a public cloud active-active structure, which is beneficial to improving the stability and work efficiency of a second public cloud serving as a disaster recovery cloud, and is beneficial to reducing the probability of failure of the second public cloud during traffic switching.

[0006] A first aspect of an embodiment of the present application provides a method for traffic switching across a public cloud active-active structure, including:

[0007] The traffic management server obtains at least one monitoring result corresponding to at least one preset regional unit, each of the monitoring results including a first interface status code set and a first response time set of a first public cloud platform, a second interface status code set and a second response time set of a second public cloud platform, and the first public cloud platform and the second public cloud platform constitute an active-active public cloud platform;

[0008] For any of the monitoring results, the traffic management server determines whether the preset area unit corresponding to the monitoring result is the area unit to be switched;

[0009] If so, the traffic management server switches the user access traffic of the first public cloud platform in the to-be-switched area unit to the second public cloud platform.

[0010] Optionally, the traffic management server determines whether the preset area unit corresponding to the monitoring result is the area unit to be switched, including:

[0011] The traffic management server calculates a first abnormality rate and a second abnormality rate of the monitoring result, wherein the first abnormality rate is a proportion of abnormal status codes in the first interface status code set, and the second abnormality rate is a proportion of abnormal status codes in the second interface status code set;

[0012] The traffic management server determines whether the first abnormality rate is greater than the second abnormality rate, and / or whether the mean of the first response time set is greater than the mean of the second response time set;

[0013] If the first abnormality rate is greater than the second abnormality rate, and / or the mean of the first response time set is greater than the mean of the second response time set, the traffic management server determines that the preset area unit corresponding to the monitoring result is the area unit to be switched.

[0014] Optionally, the traffic management server determines whether the preset area unit corresponding to the monitoring result is the area unit to be switched, including:

[0015] The traffic management server calculates a first timeout rate and a second timeout rate of the monitoring result, the first timeout rate being the proportion of the timeout response time in the first response time concentration, and the second timeout rate being the proportion of the timeout response time in the second response time concentration;

[0016] The traffic management server determines whether the first timeout rate is greater than the second timeout rate;

[0017] If so, the traffic management server determines that the preset area unit corresponding to the monitoring result is the area unit to be switched.

[0018] Optionally, the traffic management server determines whether the preset area unit corresponding to the monitoring result is the area unit to be switched, including:

[0019] The traffic management server calculates a response ratio of the monitoring result, where the response ratio is a ratio of a mean value of a first response time to access the same port number to a mean value of a second response time;

[0020] The traffic management server determines whether the response ratio is greater than a preset response ratio threshold;

[0021] If so, the traffic management server determines that the preset area unit corresponding to the monitoring result is the area unit to be switched.

[0022] Optionally, the traffic management server switches the user access traffic of the first public cloud platform in the to-be-switched area unit to the second public cloud platform, including:

[0023] The traffic management server calls the application programming interface API provided by the domain name system DNS service provider according to the area unit to be switched, and changes the DNS resolution corresponding to the area unit to be switched to the entry Internet Protocol IP address of the second public cloud platform.

[0024] Optionally, the traffic management server obtains at least one monitoring result corresponding to at least one preset area unit, including:

[0025] The traffic management server obtains at least one monitoring result corresponding to at least one preset area unit through a monitoring point associated therewith, wherein the monitoring point monitors the first public cloud platform through a domain name, and the monitoring point monitors the second public cloud platform through a host.

[0026] A second aspect of an embodiment of the present application provides a traffic management server, including:

[0027] an acquisition unit, configured to acquire at least one monitoring result corresponding to at least one preset area unit, each of the monitoring results comprising a first interface status code set and a first response time set of a first public cloud platform, a second interface status code set and a second response time set of a second public cloud platform, the first public cloud platform and the second public cloud platform forming an active-active public cloud platform;

[0028] A judgment unit, configured to judge, for any one of the monitoring results, whether the preset area unit corresponding to the monitoring result is the area unit to be switched;

[0029] A switching unit is used to switch the user access traffic of the first public cloud platform in the regional unit to be switched to the second public cloud platform when the judgment unit determines that the preset regional unit corresponding to the monitoring result is the regional unit to be switched.

[0030] Optionally, the judgment unit includes a first judgment module, and the first judgment module is used to:

[0031] Calculate a first abnormality rate and a second abnormality rate of the monitoring result, wherein the first abnormality rate is a ratio of abnormal status codes in the first interface status code set, and the second abnormality rate is a ratio of abnormal status codes in the second interface status code set;

[0032] Determine whether the first abnormality rate is greater than the second abnormality rate, and / or whether the mean of the first response time set is greater than the mean of the second response time set;

[0033] If the first abnormality rate is greater than the second abnormality rate, and / or the mean of the first response time set is greater than the mean of the second response time set, it is determined that the preset area unit corresponding to the monitoring result is the area unit to be switched.

[0034] Optionally, the judgment unit includes a second judgment module, and the second judgment module is used to:

[0035] Calculate a first timeout rate and a second timeout rate of the monitoring result, wherein the first timeout rate is a proportion of the timeout response time in the first response time concentration, and the second timeout rate is a proportion of the timeout response time in the second response time concentration;

[0036] Determining whether the first timeout rate is greater than the second timeout rate;

[0037] If so, it is determined that the preset area unit corresponding to the monitoring result is the area unit to be switched.

[0038] Optionally, the judgment unit includes a third judgment module, and the third judgment module is used to:

[0039] Calculating a response ratio of the monitoring result, the response ratio being a ratio of a mean value of a first response time to access the same port number to a mean value of a second response time;

[0040] Determining whether the response ratio is greater than a preset response ratio threshold;

[0041] If so, it is determined that the preset area unit corresponding to the monitoring result is the area unit to be switched.

[0042] Optionally, the switching unit is specifically used for:

[0043] According to the area unit to be switched, an application programming interface API provided by a domain name system DNS service provider is called to change the DNS resolution corresponding to the area unit to be switched to the entry Internet Protocol IP address of the second public cloud platform.

[0044] Optionally, the acquiring unit is specifically used for:

[0045] At least one monitoring result corresponding to at least one preset area unit is obtained through a monitoring point associated with the traffic management server, wherein the monitoring point monitors the first public cloud platform through a domain name, and the monitoring point monitors the second public cloud platform through a host.

[0046] A third aspect of an embodiment of the present application provides a traffic management server, including:

[0047] Processor, memory, input-output unit, and bus;

[0048] The processor is connected to the memory, the input and output unit, and the bus;

[0049] The memory stores program instructions;

[0050] The processor executes the program instructions to perform the method in the first aspect and any possible implementation manner of the first aspect.

[0051] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the computer executes the method in the first aspect and any possible implementation of the first aspect.

[0052] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0053] In the method provided in the embodiment of the present application, the traffic management server first obtains at least one monitoring result corresponding to at least one preset area unit, wherein one preset area unit corresponds to one monitoring result. For any monitoring result, the traffic management server determines whether the monitoring result is a to-be-switched area unit. If so, the user access traffic of the first public cloud platform in the to-be-switched area unit is switched to the second public cloud platform. In this way, the second public cloud platform and the first public cloud platform form an active-active public cloud platform. The second public cloud platform is usually active and has a certain amount of user access traffic. When the first public cloud platform fails, the traffic management server can quickly switch the user access traffic of the first public cloud platform to the second public cloud platform, which is conducive to shortening the traffic switching time, reducing the probability of failure during traffic switching, and facilitating the stability and work efficiency of the second public cloud. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 A flow chart of an embodiment of a method for traffic switching across a public cloud active-active structure in an embodiment of the present application;

[0055] Figure 2This is a flow chart of another embodiment of a method for traffic switching across a public cloud active-active structure in an embodiment of the present application;

[0056] Figure 3 This is a flow chart of another embodiment of a method for traffic switching across a public cloud active-active structure in an embodiment of the present application;

[0057] Figure 4 This is a flow chart of another embodiment of a method for traffic switching across a public cloud active-active structure in an embodiment of the present application;

[0058] Figure 5 This is a schematic diagram of the structure of an embodiment of a traffic management server in an embodiment of the present application;

[0059] Figure 6 A structural diagram of another embodiment of the traffic management server in the embodiment of the present application;

[0060] Figure 7 This is a structural diagram of another embodiment of the traffic management server in the embodiments of the present application. DETAILED DESCRIPTION

[0061] The embodiment of the present application provides a traffic switching method and a traffic management server across a public cloud active-active structure, which are used to reduce the occurrence of failures when switching user access traffic.

[0062] The technical solution in the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0063] See also Figure 1 , Figure 1 It is a flow chart of a traffic switching method across a public cloud active-active structure provided by an embodiment of the present application, including:

[0064] 101. The traffic management server obtains at least one monitoring result corresponding to at least one preset area unit;

[0065] Optionally, the traffic management server can obtain at least one monitoring result corresponding to at least one preset area unit, wherein one preset area unit corresponds to one monitoring result. The monitoring results include the first interface status code set and the second response time set of the first public cloud platform, and the second interface status code set and the second response time set of the second public cloud platform. The first public cloud platform and the second public cloud platform form an active-active public cloud platform. Under normal circumstances, the first public cloud platform is responsible for the main user access traffic, while the second public cloud platform needs to bear a small amount of user access traffic to remain active. When an abnormality occurs in the first public cloud platform, the user access traffic corresponding to the abnormal part of the first public cloud platform can be switched to the second public cloud platform.

[0066] Optionally, in an embodiment of the present application, the first interface status code set includes multiple interface status codes, the second interface status code set includes multiple interface status codes, the interface status code (including the first interface status code set and the second interface status code set) is the response status of the public cloud (including the first public cloud platform and the second public cloud platform) to the request, and the interface status code includes a normal status code and an abnormal status code. The normal status code indicates that a request is sent to the public cloud and the public cloud returns a correct response, for example, the interface status code is 200; and the abnormal status code indicates that a request is sent to the public cloud but the public cloud does not return a response or returns an incorrect response, for example, the interface status code is 400, 404, 500, etc.

[0067] Optionally, in an embodiment of the present application, the first response time set includes multiple first response times, and the second response time set includes multiple second response times, the first response time is the total time spent from sending a request to the first public cloud to receiving a response returned by the first public cloud, and the second response time is the total time spent from sending a request to the second public cloud to receiving a response returned by the second public cloud.

[0068] 102. For any monitoring result, the traffic management server determines whether the preset area unit corresponding to the monitoring result is the area unit to be switched. If so, execute step 103;

[0069] Optionally, for any monitoring result, the traffic management server may determine whether the preset area unit corresponding to the monitoring result is the area unit to be switched through various situations. If it is determined to be yes, step 103 may be executed.

[0070] 103. The traffic management server switches the user access traffic of the first public cloud platform in the area unit to be switched to the second public cloud platform.

[0071] Optionally, if the traffic management server determines that the preset area unit corresponding to the monitoring result is the area unit to be switched, the traffic management server can switch the user access traffic of the first public cloud platform in the area unit to be switched to the second public cloud platform, and provide services to the user through the second public cloud platform.

[0072] It can be seen that in the embodiment of the present application, the traffic management server first obtains at least one monitoring result corresponding to at least one preset area unit, wherein one preset area unit corresponds to one monitoring result. For any monitoring result, the traffic management server determines whether the monitoring result is a to-be-switched area unit. If so, the user access traffic of the first public cloud platform in the to-be-switched area unit is switched to the second public cloud platform. In this way, the second public cloud platform and the first public cloud platform form an active-active public cloud platform. The second public cloud platform is usually active and has a certain amount of user access traffic. When the first public cloud platform fails, the traffic management server can quickly switch the user access traffic of the first public cloud platform to the second public cloud platform, which is conducive to shortening the traffic switching time, reducing the probability of failure during traffic switching, and facilitating the stability and work efficiency of the second public cloud.

[0073] See also Figure 2 , Figure 2 It is a flow chart of another method for traffic switching across a public cloud active-active structure provided in an embodiment of the present application, including:

[0074] 201. The traffic management server obtains at least one monitoring result corresponding to at least one preset area unit;

[0075] Optionally, the traffic manager obtains at least one monitoring result of at least one preset monitoring point, wherein the monitoring point is used to monitor the preset regional units of the active-active public cloud platform; in the specific implementation process, for any domain name (such as: www.zhenai.com), the active-active public cloud platform composed of the first public cloud platform and the second public cloud platform accesses the access traffic of the domain name www.zhenai.com and processes it, wherein the active-active public cloud platform includes at least two preset regional units, that is, the first public cloud platform and the second public cloud platform both include at least two preset regional units, and the preset regional units can be divided based on provinces and operators, for example: China Mobile in Guangdong Province, China Unicom in Guangdong Province, etc., and the division rules of the preset regional units are not limited here.

[0076] Optionally, the access layer of the active-active public cloud platform accesses access traffic, and the preset regional unit of the access traffic is determined based on the user province and operator corresponding to the access traffic. For example, if the access traffic of users of China Mobile in Guangdong Province accessing the domain name www.zhenai.com flows into the active-active public cloud platform, the preset regional unit of the access traffic is determined to be the Guangdong Province China Mobile regional unit, and traffic distribution is performed based on the preset configuration of the active-active public cloud platform. That is, when the active-active public cloud platform only enables the first public cloud platform, the access traffic of users of China Mobile in Guangdong Province flows into the first Guangdong Province China Mobile regional subunit of the first public cloud platform; when the active-active public cloud platform only enables the second public cloud platform, the access traffic of users of China Mobile in Guangdong Province flows into the second Guangdong Province China Mobile regional subunit of the second public cloud platform; when the active-active public cloud platform enables both the first public cloud platform and the second public cloud platform at the same time, the access traffic of users of China Mobile in Guangdong Province flows into the first Guangdong Province China Mobile regional subunit of the first public cloud platform and the second Guangdong Province China Mobile regional subunit of the second public cloud platform respectively according to the preset traffic distribution ratio (such as 9:1).

[0077] Furthermore, one or more monitoring points need to be deployed for each preset area unit of the active-active public cloud platform. The monitoring points are used to monitor and collect the response data of the corresponding preset area units (including the first preset area subunit in the first public cloud platform and the second preset area subunit in the second public cloud platform), that is, the monitoring points collect the response data of the first preset area subunit and the second preset area subunit at the same time. These monitoring points have established data connections with the traffic management server, and the traffic management server can obtain the monitoring results of the corresponding preset area units through these monitoring points. Each monitoring point monitors the first preset area subunit by domain name and monitors the second preset area subunit by host. The monitoring results include: the first interface status code set and the first response time set of the first preset area subunit, and the second interface status code set and the second response time set of the second preset area subunit. Optionally, the active-active public cloud platform accesses user access traffic through the first public cloud platform and the second public cloud platform at the same time under normal circumstances, and the user access traffic flows into the preset area unit, which includes the first preset area subunit of the first public cloud platform and the second preset area subunit of the second public cloud platform. The first public cloud platform is responsible for the user access traffic flowing into the first preset area subunit, and the second public cloud platform needs to bear a small amount of user access traffic flowing into the second preset area subunit to maintain activity. For the same preset area unit, when an abnormality occurs in the first public cloud platform, the user access traffic appearing in the first preset area subunit of the first public cloud platform can be switched to the second preset area subunit of the second public cloud platform. A data connection relationship is established between the monitoring point associated with the traffic management server and the traffic management server. The traffic management server can set the cycle for the monitoring point to obtain the monitoring results. When each cycle arrives, the monitoring point will obtain the monitoring results and report them to the traffic management server. The traffic management server can also issue instructions to the monitoring point to immediately obtain the monitoring results and report them.

[0078] 202. For any monitoring result, the traffic management server calculates a first abnormality rate and a second abnormality rate of the monitoring result;

[0079] Optionally, for any monitoring result, the traffic management server can calculate the first abnormality rate and the second abnormality rate of the monitoring result to determine whether traffic switching is required through the first abnormality rate and the second abnormality rate. The first abnormality rate is the proportion of abnormal status codes in the first interface status code set, for example, the first interface status code set includes 1000 interface status codes, and there are 230 abnormal status codes, then the first abnormality rate is 23%; the second abnormality rate is the proportion of abnormal status codes in the second interface status code set, for example, the second interface status code set includes 1000 interface status codes, and there are 46 abnormal status codes, then the second abnormality rate is 4.6%.

[0080] 203. The traffic management server determines whether the first abnormality rate is greater than the second abnormality rate, and / or whether the mean of the first response time set is greater than the mean of the second response time set; if the first abnormality rate is greater than the second abnormality rate, and / or the mean of the first response time set is greater than the mean of the second response time set, step 204 is executed;

[0081] Optionally, the traffic management server may determine whether it is necessary to perform traffic switching on the preset area unit corresponding to the monitoring result based on the first abnormality rate, the second abnormality rate, the mean of the first response time set, and the mean of the second response time set. When the first abnormality rate is greater than the second abnormality rate, and / or the mean of the first response time set is greater than the mean of the second response time set, the traffic management server may execute step 204.

[0082] 204. The traffic management server determines that the preset area unit corresponding to the monitoring result is the area unit to be switched;

[0083] If in the monitoring result, the first abnormality rate is greater than the second abnormality rate, and / or the mean of the first response time set is greater than the mean of the second response time set, then the traffic management server can determine that the preset area unit corresponding to the monitoring result is the area unit to be switched.

[0084] 205. The traffic management server calls the application program interface API provided by the domain name system DNS service provider according to the regional unit to be switched, and changes the DNS resolution corresponding to the regional unit to be switched to the entry Internet Protocol IP address of the second public cloud platform.

[0085] Optionally, when the traffic management server determines that the preset area unit corresponding to the monitoring result is the area unit to be switched, the API provided by the DNS service provider is called to change the DNS resolution corresponding to the area unit to be switched to the entry IP address of the second public cloud platform. For example, when a preset area unit is the area unit to be switched, if the entry IP address of the first public cloud platform is 1.1.1.1 and the entry IP address of the second public cloud platform is 2.2.2.2, then the traffic management server can call the API provided by the DNS service provider to change the DNS resolution of the preset area unit to 2.2.2.2. After the change, the user access traffic of the preset area unit accessing the active-active public cloud platform will flow entirely to the second public cloud platform.

[0086] It can be seen that in the embodiment of the present application, for any monitoring result, the traffic management server determines whether it is necessary to perform traffic switching on the preset area unit corresponding to the monitoring result through the first abnormality rate, the second abnormality rate, the average of the first response time set, and the average of the second response time set. This can reduce the access anomalies that occur when users access the active-active public cloud, and can reduce the delay in users accessing the active-active public cloud, thereby improving the user experience.

[0087] See also Figure 3 , Figure 3 It is a flow chart of another method for traffic switching across a public cloud active-active structure provided in an embodiment of the present application, including:

[0088] 301. The traffic management server obtains at least one monitoring result corresponding to at least one preset area unit through a monitoring point associated with the traffic management server;

[0089] In this embodiment, step 301 is similar to step 201 in the aforementioned embodiment and will not be described in detail here.

[0090] 302. For any monitoring result, the traffic management server calculates a first timeout rate and a second timeout rate of the monitoring result;

[0091] Optionally, for any monitoring result, the traffic management server can calculate the first timeout rate and the second timeout rate of the monitoring result, and determine whether traffic switching is required by the first timeout rate and the second timeout rate. The first timeout rate is the proportion of the timeout response time in the first response time set. For example, the first response time set includes 500 response times, of which 50 are timeout response times, then the first timeout rate is 10%; the second timeout rate is the proportion of the timeout response time in the second response time set. For example, the second response time set includes 500 response times, of which 25 are timeout response times, then the second timeout rate is 5%. The timeout response time is the response time that exceeds the response time threshold. When the monitoring point sends a request to the public cloud, but does not receive a response returned by the public cloud within the response time threshold, the response time of this request is timed out.

[0092] 303. The traffic management server determines whether the first timeout rate is greater than the second timeout rate. If so, execute step 304.

[0093] Optionally, after calculating the first timeout rate and the second timeout rate, the traffic management server may determine whether the first timeout rate is greater than the second timeout rate. If the first timeout rate is greater than the second timeout rate, the traffic management server may execute step 304.

[0094] 304. The traffic management server determines that the preset area unit corresponding to the monitoring result is the area unit to be switched;

[0095] Optionally, if in the monitoring result, the first timeout rate is greater than the second timeout rate, the traffic management server may determine that the preset area unit corresponding to the monitoring result is the area unit to be switched.

[0096] 305. The traffic management server calls the API provided by the DNS service provider according to the regional unit to be switched, and changes the DNS resolution corresponding to the regional unit to be switched to the entry Internet Protocol IP address of the second public cloud platform.

[0097] In the embodiment of the present application, step 305 is similar to step 205 in the aforementioned embodiment and will not be described again here.

[0098] It can be seen that in the embodiment of the present application, the traffic management server determines whether traffic switching is required through the first timeout rate and the second timeout rate, which can reduce the access timeout situation when the user accesses the active-active public cloud and improve the user experience.

[0099] See also Figure 4 , Figure 4 It is a flow chart of another method for traffic switching across a public cloud active-active structure provided in an embodiment of the present application, including:

[0100] 401. The traffic management server obtains at least one monitoring result corresponding to at least one preset area unit through a monitoring point associated therewith;

[0101] In the embodiment of the present application, step 401 is similar to step 201 in the aforementioned embodiment and will not be described again here.

[0102] 402. For any monitoring result, the traffic management server calculates a response ratio of the monitoring result;

[0103] Optionally, for any monitoring result, the traffic management server can calculate the response ratio of the monitoring result. The response ratio is the ratio of the mean of the first response time for accessing the same port number to the mean of the second response time. The same port number refers to the same port number in the first public cloud platform and the second public cloud platform, for example, the first port with port number 1 in the first public cloud platform and the second port with port number 1 in the second public cloud platform. The port numbers of the first port and the second port are both 1, and the port numbers of the first port and the second port belong to the same port number. In the active-active public cloud platform composed of the first public cloud platform and the second public cloud platform, the applications corresponding to the same port number are consistent, and the services provided by the same application are also consistent. For example, the monitoring result includes M port numbers, and the first mean (the mean of the response time for accessing the port number in the first response time) and the second mean (the mean of the response time for accessing the port number in the second response time) for accessing each port number are calculated, and then the first mean and the second mean for accessing the same port number are compared, and the number N of port numbers whose first mean is greater than the second mean is recorded. Then the response ratio is

[0104] 403. The traffic management server determines whether the response ratio is greater than a preset response ratio threshold. If so, execute step 404.

[0105] Optionally, after calculating the response ratio of the monitoring result, the traffic management server may determine whether the response ratio is greater than a preset response ratio threshold. If the response ratio is greater than the preset response ratio threshold, the traffic management server may execute step 404.

[0106] 404. The traffic management server determines that the preset area unit corresponding to the monitoring result is the area unit to be switched;

[0107] Optionally, if the response ratio in the monitoring result is greater than a preset response ratio threshold, the traffic management server may determine that the preset area unit corresponding to the monitoring result is the area unit to be switched.

[0108] 405. The traffic management server calls the API provided by the DNS service provider according to the regional unit to be switched, and changes the DNS resolution corresponding to the regional unit to be switched to the entry Internet Protocol IP address of the second public cloud platform.

[0109] In the embodiment of the present application, step 405 is similar to step 205 in the aforementioned embodiment and will not be described again here.

[0110] In the embodiment of the present application, the traffic management server determines whether traffic switching is required by the response ratio, which can reduce the delay of users accessing the active-active public cloud, thereby improving user experience.

[0111] The above describes the traffic switching method across the public cloud active-active structure in the embodiment of the present application. The following describes the traffic management server in the embodiment of the present application.

[0112] See also Figure 5 , Figure 5 : is a schematic diagram of the structure of a traffic management server provided in an embodiment of the present application, including:

[0113] An acquisition unit 501 is used to acquire at least one monitoring result corresponding to at least one preset regional unit, each monitoring result including a first interface status code set and a first response time set of a first public cloud platform and a second interface status code set and a second response time set of a second public cloud platform, the first public cloud platform and the second public cloud platform forming an active-active public cloud platform;

[0114] A judgment unit 502 is used to judge, for any monitoring result, whether the preset area unit corresponding to the monitoring result is the area unit to be switched;

[0115] The switching unit 503 is configured to switch the user access traffic of the first public cloud platform in the regional unit to be switched to the second public cloud platform when the judging unit 502 determines that the preset regional unit corresponding to the monitoring result is the regional unit to be switched.

[0116] In this embodiment, the functions of each unit are as described above. Figure 1 The steps in the illustrated embodiments correspond to each other and will not be described again here.

[0117] See also Figure 6 Another embodiment of the traffic management server in the embodiment of the present application includes:

[0118] An acquisition unit 601 is used to acquire at least one monitoring result corresponding to at least one preset regional unit, each monitoring result including a first interface status code set and a first response time set of a first public cloud platform and a second interface status code set and a second response time set of a second public cloud platform, the first public cloud platform and the second public cloud platform forming an active-active public cloud platform;

[0119] A judgment unit 602 is used to judge, for any monitoring result, whether the preset area unit corresponding to the monitoring result is the area unit to be switched;

[0120] The switching unit 603 is configured to switch the user access traffic of the first public cloud platform in the regional unit to be switched to the second public cloud platform when the judging unit 602 determines that the preset regional unit corresponding to the monitoring result is the regional unit to be switched.

[0121] Optionally, the judgment unit may include a first judgment module 6021, and the first judgment module 6021 is used to:

[0122] Calculate a first abnormality rate and a second abnormality rate of the monitoring result, the first abnormality rate being the proportion of abnormal status codes in the first interface status code set, and the second abnormality rate being the proportion of abnormal status codes in the second interface status code set;

[0123] Determine whether the first abnormality rate is greater than the second abnormality rate, and / or whether the mean of the first response time set is greater than the mean of the second response time set;

[0124] If the first abnormality rate is greater than the second abnormality rate, and / or the mean of the first response time set is greater than the mean of the second response time set, it is determined that the preset area unit corresponding to the monitoring result is the area unit to be switched.

[0125] Optionally, the judgment unit may include a second judgment module 6022, and the second judgment module 6022 is used to:

[0126] Calculate a first timeout rate and a second timeout rate of the monitoring results, the first timeout rate being the proportion of the timeout response time in the first response time concentration, and the second timeout rate being the proportion of the timeout response time in the second response time concentration;

[0127] Determining whether the first timeout rate is greater than the second timeout rate;

[0128] If so, it is determined that the preset area unit corresponding to the monitoring result is the area unit to be switched.

[0129] Optionally, the judgment unit may include a third judgment module 6023, and the third judgment module 6023 is used to:

[0130] Calculate the response ratio of the monitoring result, where the response ratio is the ratio of the average of the first response time to the same port number being greater than the average of the second response time;

[0131] Determine whether the response ratio is greater than a preset response ratio threshold;

[0132] If so, it is determined that the preset area unit corresponding to the monitoring result is the area unit to be switched.

[0133] Optionally, the switching unit 603 is specifically configured to:

[0134] According to the regional unit to be switched, an application programming interface API provided by a domain name system DNS service provider is called to change the DNS resolution corresponding to the regional unit to be switched to the entry Internet Protocol IP address of the second public cloud platform.

[0135] Optionally, the acquisition unit 601 is specifically used for:

[0136] At least one monitoring result corresponding to at least one preset area unit is obtained through a monitoring point associated with the traffic management server, wherein the monitoring point monitors the first public cloud platform through a domain name, and the monitoring point monitors the second public cloud platform through a host.

[0137] In this embodiment, the functions of each unit are as described above. Figures 2 to 4 The steps in the illustrated embodiments correspond to each other and will not be described again here.

[0138] See also Figure 7 Another embodiment of the traffic management server in the embodiment of the present application includes:

[0139] Processor 701, memory 702, input and output unit 703 and bus 704;

[0140] The processor 701 is connected to the memory 702, the input and output unit 703 and the bus 704;

[0141] The memory stores program instructions;

[0142] The processor executes program instructions to perform Figures 1 to 4 The method in the illustrated embodiment.

[0143] In this embodiment, the function of the processor 701 is the same as that of the aforementioned Figures 1 to 4 The steps in the illustrated embodiments correspond to each other and will not be described again here.

[0144] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0145] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0146] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0147] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0148] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk, etc. Various media that can store program codes.

Claims

1. A traffic switching method across a public cloud active-active structure, characterized in that: include: The traffic management server obtains at least one monitoring result corresponding to at least one preset area unit, each of the monitoring results includes a first interface status code set and a first response time set of the first public cloud platform, a second interface status code set and a second response time set of the second public cloud platform, and the first public cloud platform and the second public cloud platform constitute an active-active public cloud platform; wherein the first interface status code set includes a plurality of interface status codes, and the second interface status code set includes a plurality of interface status codes, the interface status code is the response status of the first public cloud platform and the second public cloud platform to the request, and the interface status code includes a normal status code and an abnormal status code, the normal status code indicates that the first public cloud platform or the second public cloud platform returns a correct response, and the abnormal status code indicates that the first public cloud platform or the second public cloud platform does not return a response or returns an incorrect response; For any of the monitoring results, the traffic management server determines whether the preset area unit corresponding to the monitoring result is the area unit to be switched; the preset area unit is divided based on provinces and operators; If so, the traffic management server switches the user access traffic of the first public cloud platform in the to-be-switched area unit to the second public cloud platform.

2. The method according to claim 1, characterized in that The traffic management server determines whether the preset area unit corresponding to the monitoring result is the area unit to be switched, including: The traffic management server calculates a first abnormality rate and a second abnormality rate of the monitoring result, wherein the first abnormality rate is a proportion of abnormal status codes in the first interface status code set, and the second abnormality rate is a proportion of abnormal status codes in the second interface status code set; The traffic management server determines whether the first abnormality rate is greater than the second abnormality rate, and / or whether the mean of the first response time set is greater than the mean of the second response time set; If the first abnormality rate is greater than the second abnormality rate, and / or the mean of the first response time set is greater than the mean of the second response time set, the traffic management server determines that the preset area unit corresponding to the monitoring result is the area unit to be switched.

3. The method according to claim 1, characterized in that The traffic management server determines whether the preset area unit corresponding to the monitoring result is the area unit to be switched, including: The traffic management server calculates a first timeout rate and a second timeout rate of the monitoring result, the first timeout rate being the proportion of the timeout response time in the first response time concentration, and the second timeout rate being the proportion of the timeout response time in the second response time concentration; The traffic management server determines whether the first timeout rate is greater than the second timeout rate; If so, the traffic management server determines that the preset area unit corresponding to the monitoring result is the area unit to be switched.

4. The method according to claim 1, characterized in that: The traffic management server determines whether the preset area unit corresponding to the monitoring result is the area unit to be switched, including: The traffic management server calculates a response ratio of the monitoring result, where the response ratio is a ratio of a mean of the first response time set for accessing the same port number to a mean of the second response time set; The traffic management server determines whether the response ratio is greater than a preset response ratio threshold; If so, the traffic management server determines that the preset area unit corresponding to the monitoring result is the area unit to be switched.

5. The method according to any one of claims 1 to 4, characterized in that The traffic management server switches the user access traffic of the first public cloud platform in the area unit to be switched to the second public cloud platform, including: The traffic management server calls the application programming interface API provided by the domain name system DNS service provider according to the area unit to be switched, and changes the DNS resolution corresponding to the area unit to be switched to the entry Internet Protocol IP address of the second public cloud platform.

6. The method according to any one of claims 1 to 4, characterized in that The traffic management server acquiring at least one monitoring result corresponding to at least one preset area unit includes: The traffic management server obtains at least one monitoring result corresponding to at least one preset area unit through a monitoring point associated therewith, wherein the monitoring point monitors the first public cloud platform through a domain name, and the monitoring point monitors the second public cloud platform through a host.

7. A traffic management server, characterized in that: include: An acquisition unit is used to acquire at least one monitoring result corresponding to at least one preset area unit, each of the monitoring results including a first interface status code set and a first response time set of a first public cloud platform and a second interface status code set and a second response time set of a second public cloud platform, wherein the first public cloud platform and the second public cloud platform constitute an active-active public cloud platform; wherein the first interface status code set includes a plurality of interface status codes, and the second interface status code set includes a plurality of interface status codes, the interface status code is a response status of the first public cloud platform and the second public cloud platform to a request, and the interface status code includes a normal status code and an abnormal status code, the normal status code indicates that the first public cloud platform or the second public cloud platform returns a correct response, and the abnormal status code indicates that the first public cloud platform or the second public cloud platform does not return a response or returns an incorrect response; A judgment unit, configured to judge, for any one of the monitoring results, whether a preset area unit corresponding to the monitoring result is an area unit to be switched; the preset area unit is divided based on provinces and operators; A switching unit is used to switch the user access traffic of the first public cloud platform in the regional unit to be switched to the second public cloud platform when the judgment unit determines that the preset regional unit corresponding to the monitoring result is the regional unit to be switched.

8. The traffic management server according to claim 7, characterized in that: The judging unit includes a first judging module, and the first judging module is used for: Calculate a first abnormality rate and a second abnormality rate of the monitoring result, wherein the first abnormality rate is a ratio of abnormal status codes in the first interface status code set, and the second abnormality rate is a ratio of abnormal status codes in the second interface status code set; Determine whether the first abnormality rate is greater than the second abnormality rate, and / or whether the mean of the first response time set is greater than the mean of the second response time set; If the first abnormality rate is greater than the second abnormality rate, and / or the mean of the first response time set is greater than the mean of the second response time set, it is determined that the preset area unit corresponding to the monitoring result is the area unit to be switched.

9. The traffic management server according to claim 7, characterized in that: The judging unit includes a second judging module, and the second judging module is used for: Calculate a first timeout rate and a second timeout rate of the monitoring result, wherein the first timeout rate is a proportion of the timeout response time in the first response time concentration, and the second timeout rate is a proportion of the timeout response time in the second response time concentration; Determining whether the first timeout rate is greater than the second timeout rate; If so, it is determined that the preset area unit corresponding to the monitoring result is the area unit to be switched.

10. A traffic management server, characterized in that: include: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; The memory stores program instructions; The processor executes the program instructions to perform the method according to any one of claims 1 to 6.