Multi-data center access method and system
The multi-data center access method and system dynamically routes user requests to active data centers, including disaster recovery centers, addressing idle backup centers and reducing service disruptions by ensuring continuous service availability and improved resource utilization.
Patent Information
- Application Number
- CN202011431204.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-07
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2040-12-07
AI Technical Summary
Backup data centers are idle most of the time due to infrequent disasters, leading to resource wastage and prolonged downtime during switches between primary and backup data centers, affecting service quality.
A multi-data center access method and system that utilizes a client, domain name resolution server, and data center cluster to dynamically route user requests to active data centers, including disaster recovery data centers, ensuring continuous service by parallel utilization of multiple data centers.
Improves resource utilization and reduces service disruption by ensuring that disaster recovery data centers are always active, enabling quick switches to maintain continuous service availability.
Smart Images

Figure CN112380072B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer applications, and in particular to a multi-data center access method and system. Background Art
[0002] With the rapid development of mobile Internet and cloud computing, the business activities of enterprises are increasingly dependent on data centers. The uninterrupted operation of data centers throughout the day has become one of the most basic requirements of core businesses. In order to ensure the stability of data center external services, multiple data centers are usually built, and the main and backup modes are adopted for external services, that is, one main data center will correspond to a backup data center. Under normal circumstances, the main data center provides external services. When a disaster occurs, the main data center goes down, and the backup data center takes over the main data center to provide external services, thereby reducing the losses caused by the disaster to users.
[0003] However, since disasters are rare, the backup data center only works when a disaster occurs, which results in the backup data center being idle for a long time, resulting in a waste of resources. In addition, since the backup data center does not provide external services under normal circumstances, it takes a long time to switch between the primary and backup data centers, affecting the quality of external services. Summary of the invention
[0004] The present application provides a multi-data center access method and system, the purpose of which is to solve the problem that the backup data center only works when a disaster occurs, which causes the backup data center to be idle for a long time, resulting in a waste of resources. In addition, since the backup data center does not provide external services under normal circumstances, it takes a long time to switch between the primary and backup data centers, affecting the quality of external services.
[0005] In order to achieve the above objectives, this application provides the following technical solutions:
[0006] A multi-data center access method is applied to a multi-data center access system, wherein the multi-data center access system includes a client, a domain name resolution server, and a data center cluster, wherein the data center cluster includes multiple data centers, and the method includes:
[0007] The client obtains the user information and the pre-stored domain name of the user in response to the user's access request, and sends a domain name resolution request carrying the domain name to the domain name resolution server;
[0008] After receiving the domain name resolution request, the domain name resolution server resolves the total domain name contained in the domain name resolution request, obtains a first address, and sends the first address to the client; wherein the first address is the address of any data center in the data center cluster except the faulty data center, and the faulty data center is the data center that is currently faulty;
[0009] After receiving the first address corresponding to the domain name resolution request fed back by the domain name resolution server, the client sends a message information carrying the user information to a first data center; the first data center is a data center corresponding to the first address;
[0010] The first data center receives the message information, and based on the user information carried in the message information, sends a target domain name acquisition request to the user management system; so that after receiving the target domain name acquisition request, the user management system determines the target data center corresponding to the user information contained in the target domain name acquisition request according to the domain name allocation policy, and in the event of a failure in the target data center, determines the disaster recovery data center corresponding to the target data center, determines the domain name of the disaster recovery data center as the target domain name, and feeds back the target domain name to the first data center; wherein the user management system is set in any one of the data centers in the data center cluster, and the disaster recovery data center corresponding to the target data center is any one of the data centers in the data center cluster except the target data center;
[0011] After receiving the target domain name fed back by the user management system, the first data center sends the target domain name to the client;
[0012] After receiving the target domain name fed back by the first data center, the client sends a domain name resolution request carrying the target domain name to the domain name resolution server, and upon receiving the target address corresponding to the target domain name fed back by the domain name resolution server, the client accesses the data center corresponding to the target address.
[0013] The above method may optionally further include:
[0014] In the case that the target data center does not fail, determining the domain name of the target data center as the target domain name;
[0015] Feedback the target domain name to the first data center.
[0016] In the above method, optionally, the user management system includes a preset user management system or a disaster recovery user management system, the data center to which the disaster recovery user management system belongs is a disaster recovery data center of the data center to which the preset user management system belongs, and the first data center sends a target domain name acquisition request to the user management system based on the user information carried in the message information, including:
[0017] The first data center determines whether a data center to which the preset user management system belongs fails;
[0018] If it is determined that the data center to which the preset user management system belongs has not failed, the first data center sends a target domain name acquisition request to the preset user management system based on the user information carried in the message information;
[0019] If it is determined that a failure occurs in the data center to which the preset user management system belongs, the first data center sends a target domain name acquisition request to the disaster recovery user management system based on the user information carried in the message information.
[0020] In the above method, optionally, the user management system determines the target data center corresponding to the user information according to the domain name allocation strategy, including:
[0021] Obtaining a user identifier contained in the user information;
[0022] Performing a modulo operation on the user identifier;
[0023] Based on a result of the modulo operation, determining a data center corresponding to the result;
[0024] A data center corresponding to the result is determined as a target data center.
[0025] In the above method, optionally, resolving the total domain name included in the domain name resolution request to obtain the first address includes:
[0026] The domain name resolution server determines whether there is a data center that is currently faulty;
[0027] If there is no data center that is currently faulty, the total domain name included in the domain name resolution request is resolved, and the total domain name is resolved to a second data center; the second data center is any data center in the data center cluster;
[0028] If there is a data center that is currently faulty, the data centers in the data cluster except the data center that is currently faulty are grouped into a first set, and the total domain name included in the domain name resolution request is resolved, and the total domain name is resolved to a third data center; the third data center is any data center in the first set;
[0029] The address of the second data center or the address of the third data center is used as the first address.
[0030] A multi-data center access system, comprising:
[0031] A client, a domain name resolution server and a data center cluster, wherein the data center cluster includes multiple data centers;
[0032] The client is connected to the domain name resolution server and the data center cluster respectively;
[0033] The client is used to respond to the user's access request, obtain the user information of the user and the pre-stored total domain name, and send a domain name resolution request carrying the total domain name to the domain name resolution server; after receiving the first address corresponding to the domain name resolution request fed back by the domain name resolution server, send the message information carrying the user information to the first data center; after receiving the target domain name fed back by the first data center, send the domain name resolution request carrying the target domain name to the domain name resolution server, and when receiving the target address corresponding to the target domain name fed back by the domain name resolution server, access the data center corresponding to the target address; the first data center is the data center corresponding to the first address;
[0034] The domain name resolution server is used to resolve the total domain name contained in the domain name resolution request after receiving the domain name resolution request, obtain a first address, and send the first address to the client; wherein the first address is the address of any data center in the data center cluster except the faulty data center, and the faulty data center is the data center that currently fails;
[0035] The first data center receives the message information, and based on the user information carried in the message information, sends a target domain name acquisition request to the user management system, and after receiving the target domain name fed back by the user management system, sends the target domain name to the client; so that after receiving the target domain name acquisition request, the user management system determines the target data center corresponding to the user information contained in the target domain name acquisition request according to the domain name allocation policy, and in the event of a failure in the target data center, determines the disaster recovery data center corresponding to the target data center, determines the domain name of the disaster recovery data center as the target domain name, and feeds back the target domain name to the first data center; wherein the user management system is set in any one of the data centers in the data center cluster, and the disaster recovery data center corresponding to the target data center is any one of the data centers in the data center cluster except the target data center.
[0036] In the above system, optionally, the user management server is further used for:
[0037] In the case that the target data center does not fail, determining the domain name of the target data center as the target domain name;
[0038] Feedback the target domain name to the first data center.
[0039] In the above system, optionally, the user management system includes a preset user management system or a disaster recovery user management system, the data center to which the disaster recovery user management system belongs is a disaster recovery data center of the data center to which the preset user management system belongs, and the first data center executes, based on the user information carried in the message information, sending a target domain name acquisition request to the user management system, for:
[0040] The first data center determines whether a data center to which the preset user management system belongs fails;
[0041] If it is determined that the data center to which the preset user management system belongs has not failed, the first data center sends a target domain name acquisition request to the preset user management system based on the user information carried in the message information;
[0042] If it is determined that a failure occurs in the data center to which the preset user management system belongs, the first data center sends a target domain name acquisition request to the disaster recovery user management system based on the user information carried in the message information.
[0043] In the above system, optionally, the user management system executes a domain name allocation strategy to determine a target data center corresponding to the user information, for:
[0044] Obtaining a user identifier contained in the user information;
[0045] Performing a modulo operation on the user identifier;
[0046] Based on a result of the modulo operation, determining a data center corresponding to the result;
[0047] A data center corresponding to the result is determined as a target data center.
[0048] In the above system, optionally, the domain name resolution server performs resolution on the total domain name included in the domain name resolution request to obtain the first address, which is used for:
[0049] The domain name resolution server determines whether there is a data center that is currently faulty;
[0050] If there is no data center that is currently faulty, the total domain name included in the domain name resolution request is resolved, and the total domain name is resolved to a second data center; the second data center is any data center in the data center cluster;
[0051] If there is a data center that is currently faulty, the data centers in the data cluster except the data center that is currently faulty are grouped into a first set, and the total domain name included in the domain name resolution request is resolved, and the total domain name is resolved to a third data center; the third data center is any data center in the first set;
[0052] The address of the second data center or the address of the third data center is used as the first address.
[0053] Compared with the prior art, this application has the following advantages:
[0054] The present application provides a multi-data center access method and system, the method comprising: the client sends a domain name resolution request carrying a total domain name to a domain name resolution server in response to a user's access request, and upon receiving a first address fed back by the domain name resolution server, sends a message information carrying user information to a first data center, the first data center being a data center corresponding to the first address; the first data center sends a target domain name acquisition request to a user management system based on the user information, so that the user management system acquires the target data center corresponding to the user information, and in the case of a failure in the target data center, determines the disaster recovery data center corresponding to the target data center as the target domain name and feeds back to the client through the first data center; wherein the disaster recovery data center corresponding to the target data center is any data center in the data center cluster except the target data center; the client sends a domain name resolution request carrying the target domain name to the domain name resolution, and upon receiving a target address corresponding to the target domain name fed back by the domain name resolution server, accesses the data center corresponding to the target address. In the present technical solution, each data center is a disaster recovery data center of any data center except itself, and multiple data centers provide services to users in parallel, thereby improving resource utilization, and since the disaster recovery data center itself is always in a state of providing services to the outside, in the case of a failure in the data center corresponding to the disaster recovery data center, it can quickly switch to the disaster recovery data center to provide servers to the outside. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] 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.
[0056] Figure 1 A method flow chart of a multi-data center access method provided by this application;
[0057] Figure 2 Another method flow chart of a multi-data center access method provided by the present application;
[0058] Figure 3 Another method flow chart of a multi-data center access method provided by the present application;
[0059] Figure 4 A flowchart of another method of a multi-data center access method provided by the present application;
[0060] Figure 5 An example diagram of a multi-data center access method provided in this application;
[0061] Figure 6 A schematic diagram of the structure of a multi-data center access system provided for this application;
[0062] Figure 7 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION
[0063] 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.
[0064] The present application can be used in many general or special computing device environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or equipment, etc.
[0065] The embodiment of the present application provides a multi-data center access method, which can be applied to a variety of system platforms, and its execution subject can be run on a computer terminal or an event parser of various mobile devices. The method flow chart of the multi-data center access method is as follows: Figure 1 As shown, specifically including:
[0066] S101. In response to an access request from a user, a client obtains user information and a pre-stored domain name, and sends a domain name resolution request carrying the domain name to a domain name resolution server.
[0067] In the method provided in the embodiment of the present application, when a user registers through a client, a total domain name is allocated to the client, and the client stores the total domain name.
[0068] When receiving the access request from the user, the client responds to the access request and obtains the user information and the pre-stored total domain name.
[0069] Based on the acquired total domain name, a domain name resolution request is sent to the domain name resolution server GTM. Specifically, the total domain name may be written into a preset resolution request message template, a domain name resolution request message is generated, and the domain name resolution request message is sent to the domain name resolution server GTM.
[0070] S102: After receiving the domain name resolution request, the domain name resolution server resolves the total domain name included in the domain name resolution request, obtains a first address, and sends the first address to the client.
[0071] The domain name resolution server receives the domain name resolution request sent by the client, resolves the total domain name contained in the domain name resolution request, and obtains the first address, that is, receives the domain name resolution request message sent by the client, resolves the domain name resolution request message, obtains the total domain name, performs domain name resolution on the total domain name, and resolves the total domain name to the first address. The first address is the address of any data center in the data center cluster except the faulty data center, and the faulty data center is the data center that currently fails.
[0072] See also Figure 2 , the process of resolving the total domain name contained in the domain name resolution request and obtaining the first address includes:
[0073] S201. The domain name resolution server determines whether there is a data center that is currently faulty.
[0074] The domain name resolution server determines whether there is a data center that is currently faulty. If there is no data center that is currently faulty, step S202 is executed; if there is a data center that is currently faulty, step S203 is executed.
[0075] S202: Resolve the total domain name included in the domain name resolution request, and resolve the total domain name to a second data center; the second data center is any data center in the data center cluster.
[0076] If there is no data center that is currently malfunctioning, the domain name resolution server resolves the total domain name contained in the domain name resolution request and resolves the total domain name to the second data center, which is any data center in the data center cluster; that is, if there is no data center that is currently malfunctioning, the domain name resolution server resolves the total domain name to any data center in the data center cluster.
[0077] S203. Group all data centers in the data cluster except the data center that is currently faulty into a first set, resolve the total domain name included in the domain name resolution request, and resolve the total domain name to a third data center; the third data center is any data center in the first set.
[0078] If there is a data center that is currently failing, the domain name resolution server groups the data centers in the data cluster except the data center that is currently failing into a first set, that is, the data centers included in the first set are not the data centers that are currently failing.
[0079] The total domain name included in the domain name resolution request is resolved, and the total domain name is resolved to a third data center, where the third data center is any data center in the first set; that is, if there is a data center that is currently faulty, the domain name resolution server will resolve the total domain name to any data center in the data center cluster except the data center that is currently faulty.
[0080] S204: Use the address of the second data center as the first address.
[0081] If there is no data center that is currently failing, the domain name resolution server will resolve the total domain name to the second data center and use the address of the second data center as the first address.
[0082] S205. Use the address of the third data center as the first address.
[0083] If there is a data center that is currently faulty, the domain name resolution server will resolve the total domain name to a third data center and use the address of the third data center as the first address.
[0084] It should be noted that in the method provided in the embodiment of the present application, the status information of each data contained in the data center set is obtained in real time. When the status of any data center changes, that is, when any data center fails, the domain name resolution server will not resolve the total domain name to the address of the failed data center. In other words, if all data centers are not currently faulty, the first address resolved by the domain name resolution server is the address of any data center in the data center cluster. If there is currently a data center that has failed, the first address resolved by the domain name resolution server is the address of any data center in the data center cluster except the data center that has failed.
[0085] After obtaining the first address through resolution, the domain name resolution server feeds the first address back to the client.
[0086] S103. The client sends a message carrying user information to a first data center; the first data center is a data center corresponding to the first address.
[0087] After receiving the first address fed back by the domain name resolution server, the client writes the user information into a preset message template to obtain message information, in which the user information is carried.
[0088] The client sends the message information to a first data center, where the first data center is a data center corresponding to the first address.
[0089] S104: The first data center receives the message information, and based on the user information carried in the message information, sends a target domain name acquisition request to the user management system.
[0090] The first data center, i.e., the data center corresponding to the first address, receives the message information, parses the message information, obtains the user information carried in the message information, and based on the user information, sends a target domain name acquisition request to the user management system, requesting to obtain the target domain name, wherein the target domain name is the domain name of the data center corresponding to the user information or the domain name of the disaster recovery data center corresponding to the data center corresponding to the user information, and the user management system is set in any data center in the data center cluster.
[0091] In the method provided in the embodiment of the present application, each data center is a disaster recovery data center of any data center except itself, that is, each data center has its corresponding disaster recovery data center.
[0092] In the method provided in the embodiment of the present application, the user management system mentioned above includes a preset user management system or a disaster recovery user management system, wherein the data center to which the disaster recovery user management system belongs is a disaster recovery data center of the data center to which the preset user management system belongs.
[0093] See also Figure 3 The process in which the first data center sends a target domain name acquisition request to the user management system based on the user information carried in the message information includes:
[0094] S301: The first data center determines whether a data center to which a preset user management system belongs fails.
[0095] The first data center determines whether the data center to which the preset user management system belongs fails. If it is determined that the data center to which the preset user management system belongs does not fail, step S302 is executed; if it is determined that the data center to which the preset user management system belongs fails, step S303 is executed.
[0096] S302: The first data center sends a target domain name acquisition request to a preset user management system based on the user information carried in the message information.
[0097] If it is determined that the data center to which the preset user management system belongs has not failed, the first data center sends a target domain name acquisition request to the preset user management based on the user information, that is, sends a domain name acquisition request to the data center to which the preset user management system belongs, requesting to obtain the target domain name.
[0098] S303: The first data center sends a target domain name acquisition request to the disaster recovery user management system based on the user information carried in the message information.
[0099] If it is determined that the data center to which the preset user management system belongs fails, a target domain name acquisition request is sent to the disaster recovery user management system based on the user information carried in the message information, that is, a target domain name acquisition request is sent to the disaster recovery data center corresponding to the data center to which the preset user management system belongs, requesting to obtain the target domain name.
[0100] In the method provided in the embodiment of the present application, when there is no failure in the data center to which the preset user management system belongs, the first data center sends a target domain name acquisition request to the preset user management system. When there is a failure in the data center to which the preset user management system belongs, the first data center sends a target domain name acquisition request to the disaster recovery user management system.
[0101] S105. After receiving the target domain name acquisition request, the user management system determines the target data center corresponding to the user information included in the target domain name acquisition request according to the domain name allocation policy.
[0102] After receiving the target domain name acquisition request, the user management system obtains the user information, determines the data center corresponding to the user information based on the domain name allocation policy, and determines the data center corresponding to the user information as the target data center. If the data center to which the preset user management system belongs does not fail, the preset user management system responds to the target domain name acquisition request; if the data center to which the preset user management system belongs fails, the disaster recovery data center responds to the target domain name acquisition request. That is, the preset user management system or the disaster recovery user management system determines the data center corresponding to the user information based on the domain name allocation policy, and determines the data center corresponding to the user information as the target data center.
[0103] See also Figure 4 The process of the user management system determining the target data center corresponding to the user information according to the domain name allocation strategy includes:
[0104] S401: Obtain a user identifier contained in user information.
[0105] The user management system obtains the user identification contained in the user information, wherein the user identification of each user is information issued to the user when the user registers and is used to uniquely identify the user.
[0106] S402: Perform a modulo operation on the user identifier.
[0107] A modulo operation is performed on the user identifier. Specifically, a modulo operation is performed on the user identifier according to the number of data centers included in the data center cluster. For example, if the data center cluster includes three data centers, the user identifier is modulo 3.
[0108] S403: Based on the result of the modulo operation, determine a data center corresponding to the result.
[0109] In the method provided in the embodiment of the present application, a different number is set in advance for each data center according to a preset rule. For example, if the data center cluster includes 3 data centers, one data center is numbered 0, one data center is numbered 1, and another data center is numbered 2.
[0110] Based on the result of the modulo operation and the number of each data center, a data center corresponding to the result of the modulo operation is determined.
[0111] S404: Determine the data center corresponding to the result as the target data center.
[0112] The data center corresponding to the result is determined as the target data center corresponding to the user information.
[0113] S106: The user management system determines whether a failure occurs in the target data center.
[0114] The user management system determines whether a fault occurs in the target data center. If it is determined that a fault occurs in the target data center, step S107 is executed. If it is not determined that a fault occurs in the target data center, step S108 is executed.
[0115] S107: Determine the disaster recovery data center corresponding to the target data center, and determine the domain name of the disaster recovery data center as the target domain name and feed it back to the first data center.
[0116] If it is determined that the target data center has a failure, the user management system determines the disaster recovery data center corresponding to the target data center, and determines the domain name of the disaster recovery data center as the target domain name, and feeds back the target domain name to the first data center, that is, feeds back the domain name of the disaster recovery data center of the target data center to the first data center.
[0117] S108: Determine the domain name of the target data center as the target domain name and feed it back to the first data center.
[0118] If it is determined that the target data center has not failed, the user management system uses the domain name of the target data center as the target domain name and feeds the target domain name back to the first data center, that is, feeds the domain name of the target data center back to the first data center.
[0119] S109: The first data center sends the target domain name to the client.
[0120] S110. After receiving the target domain name, the client sends a domain name resolution request carrying the target domain name to the domain name resolution server, and upon receiving the target address corresponding to the target domain name fed back by the domain name resolution server, accesses the data center corresponding to the target address.
[0121] The client receives the target domain name fed back by the first data center, and based on the target domain name, sends a domain name resolution request carrying the target domain name to the domain name resolution server. The domain name resolution server resolves the target domain name contained in the domain name resolution request, resolves the target domain name to the data center corresponding to it, and feeds back the address of the data center corresponding to the target domain name as the target address.
[0122] It should be noted that the domain name resolution server feeds back the first address and the target address to the client via a message, and the message feeding back the first address and the message feeding back the target address are different.
[0123] After receiving the target address fed back by the domain name resolution server, the client accesses the data center corresponding to the target address based on the target address, that is, accesses the data center corresponding to the target address.
[0124] The multi-data center access method provided in the embodiment of the present application is that each data center is a disaster recovery data center of any data center except itself, and multiple data centers provide services to users in parallel, thereby improving resource utilization. Moreover, since the disaster recovery data center itself is always in a state of providing services to the outside world, when a data center corresponding to the disaster recovery data center fails, it can quickly switch to the disaster recovery data center to provide servers to the outside world, thereby improving business service continuity and reducing business impact.
[0125] In the method provided in the embodiment of the present application, the specific implementation of the multi-data center access method is illustrated by example. Figure 5 As shown:
[0126] It includes client, domain name resolution server, data center A, data center B, data center C and data center D.
[0127] Among them, S1 is a domain name resolution request carrying a total domain name sent by the client to the domain name resolution server.
[0128] In response to the user's access request, the client obtains the user information and the pre-stored total domain name of the user, and based on the total domain name, sends a domain name resolution request carrying the total domain name to the domain name resolution server.
[0129] S2 is the domain name resolution server that feeds back the first address to the client.
[0130] The domain name resolution server receives the domain name resolution request sent by the client, and resolves the total domain name contained in the domain name resolution request, resolves the total domain name to any data center in the data center cluster except the data center that is currently faulty, and feeds back the address of the resolved data center as the first address to the client.
[0131] S3 is the client sending a message carrying user information to data center A.
[0132] After receiving the first address, the client sends the message information carrying the user information to the data center corresponding to the first address, that is, sends the message information carrying the user information to data center A.
[0133] S4 is data center A sending a request to obtain the target domain name to data center B.
[0134] Data center A parses the message information sent by the client, obtains the user information contained in the message information, and sends a target domain name acquisition request to the user management system based on the user information, wherein the user management system is set in data center B, that is, data center A sends a target domain name acquisition request to data center B.
[0135] S5 is data center B that feeds back the target domain name to data center A.
[0136] The user management system in data center B obtains user information and determines that the data center corresponding to the user information is data center D according to the domain name allocation policy. Since data center D fails and data center C is the disaster recovery data center of data center D, the domain name of data center C is fed back as the target domain name.
[0137] S6 is data center A sending the target domain name to the client.
[0138] S7 is the client sending a domain name resolution request carrying the target domain name to the domain name resolution server.
[0139] S8 is the domain name resolution server feeding back the target address to the client.
[0140] The domain name resolution server resolves the target domain name contained in the domain name resolution request, determines the data center corresponding to the target domain name, and feeds back the address of the data center to which the target should correspond as the target address.
[0141] S9 is the client accessing data center C.
[0142] Based on the target address fed back by the domain name resolution server, the client accesses data center C corresponding to the target address, that is, accesses data center C.
[0143] The multi-data center access method provided in the embodiment of the present application is that each data center is a disaster recovery data center for any data center except itself, and multiple data centers provide services to users in parallel, thereby improving resource utilization.
[0144] and Figure 1 Corresponding to the method described above, the embodiment of the present application also provides a multi-data center access system for Figure 1 The specific implementation of the method is shown in the following diagram: Figure 6 As shown, specifically including:
[0145] A client 601, a domain name resolution server 602, and a data center cluster 603, wherein the data center cluster includes multiple data centers;
[0146] The client 601 is connected to the domain name resolution server 602 and the data center cluster 603 respectively;
[0147] The client 601 is used to respond to the user's access request, obtain the user information of the user and the pre-stored total domain name, and send a domain name resolution request carrying the total domain name to the domain name resolution server 602; after receiving the first address corresponding to the domain name resolution request fed back by the domain name resolution server 602, send the message information carrying the user information to the first data center; after receiving the target domain name fed back by the first data center, send the domain name resolution request carrying the target domain name to the domain name resolution server 602, and when receiving the target address corresponding to the target domain name fed back by the domain name resolution server 602, access the data center corresponding to the target address; the first data center is the data center corresponding to the first address;
[0148] The domain name resolution server 602 is used to resolve the total domain name contained in the domain name resolution request after receiving the domain name resolution request, obtain a first address, and send the first address to the client 601; wherein the first address is the address of any data center in the data center cluster 603 except the faulty data center, and the faulty data center is the data center that currently fails;
[0149] The first data center receives the message information, and based on the user information carried in the message information, sends a target domain name acquisition request to the user management system, and after receiving the target domain name fed back by the user management system, sends the target domain name to the client; so that after receiving the target domain name acquisition request, the user management system determines the target data center corresponding to the user information contained in the target domain name acquisition request according to the domain name allocation policy, and in the event of a failure in the target data center, determines the disaster recovery data center corresponding to the target data center, determines the domain name of the disaster recovery data center as the target domain name, and feeds back the target domain name to the first data center; wherein the user management system is set in any one of the data centers in the data center cluster 603, and the disaster recovery data center corresponding to the target data center is any one of the data centers in the data center cluster except the target data center.
[0150] The multi-data center access system provided in the embodiment of the present application has each data center being a disaster recovery data center of any data center except itself, and multiple data centers provide services to users in parallel, thereby improving resource utilization. Moreover, since the disaster recovery data center itself is always in a state of providing services to the outside world, when a data center corresponding to the disaster recovery data center fails, it can quickly switch to the disaster recovery data center to provide servers to the outside world, thereby improving business service continuity and reducing business impact.
[0151] In one embodiment of the present application, based on the above solution, the user management server is further used to:
[0152] In the case that the target data center does not fail, determining the domain name of the target data center as the target domain name;
[0153] Feedback the target domain name to the first data center.
[0154] In one embodiment of the present application, based on the aforementioned solution, the user management system includes a preset user management system or a disaster recovery user management system, the data center to which the disaster recovery user management system belongs is a disaster recovery data center of the data center to which the preset user management system belongs, and the first data center executes the user information carried in the message information, and sends a target domain name acquisition request to the user management system, for:
[0155] The first data center determines whether a data center to which the preset user management system belongs fails;
[0156] If it is determined that the data center to which the preset user management system belongs has not failed, the first data center sends a target domain name acquisition request to the preset user management system based on the user information carried in the message information;
[0157] If it is determined that a failure occurs in the data center to which the preset user management system belongs, the first data center sends a target domain name acquisition request to the disaster recovery user management system based on the user information carried in the message information.
[0158] In one embodiment of the present application, based on the above solution, the user management system executes the domain name allocation strategy to determine the target data center corresponding to the user information, for:
[0159] Obtaining a user identifier contained in the user information;
[0160] Performing a modulo operation on the user identifier;
[0161] Based on a result of the modulo operation, determining a data center corresponding to the result;
[0162] A data center corresponding to the result is determined as a target data center.
[0163] In one embodiment of the present application, based on the above solution, the domain name resolution server 602 performs resolution on the total domain name included in the domain name resolution request to obtain a first address for:
[0164] The domain name resolution server determines whether there is a data center that is currently faulty;
[0165] If there is no data center that is currently faulty, the total domain name included in the domain name resolution request is resolved, and the total domain name is resolved to a second data center; the second data center is any data center in the data center cluster;
[0166] If there is a data center that is currently faulty, the data centers in the data cluster except the data center that is currently faulty are grouped into a first set, and the total domain name included in the domain name resolution request is resolved, and the total domain name is resolved to a third data center; the third data center is any data center in the first set;
[0167] The address of the second data center or the address of the third data center is used as the first address.
[0168] 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 multi-data center access method.
[0169] 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 perform the following operations:
[0170] The client obtains the user information and the pre-stored domain name of the user in response to the user's access request, and sends a domain name resolution request carrying the domain name to the domain name resolution server;
[0171] After receiving the domain name resolution request, the domain name resolution server resolves the total domain name contained in the domain name resolution request, obtains a first address, and sends the first address to the client; wherein the first address is the address of any data center in the data center cluster except the faulty data center, and the faulty data center is the data center that is currently faulty;
[0172] After receiving the first address corresponding to the domain name resolution request fed back by the domain name resolution server, the client sends a message information carrying the user information to a first data center; the first data center is a data center corresponding to the first address;
[0173] The first data center receives the message information, and based on the user information carried in the message information, sends a target domain name acquisition request to the user management system; so that after receiving the target domain name acquisition request, the user management system determines the target data center corresponding to the user information contained in the target domain name acquisition request according to the domain name allocation policy, and in the event of a failure in the target data center, determines the disaster recovery data center corresponding to the target data center, determines the domain name of the disaster recovery data center as the target domain name, and feeds back the target domain name to the first data center; wherein the user management system is set in any one of the data centers in the data center cluster, and the disaster recovery data center corresponding to the target data center is any one of the data centers in the data center cluster except the target data center;
[0174] After receiving the target domain name fed back by the user management system, the first data center sends the target domain name to the client;
[0175] After receiving the target domain name fed back by the first data center, the client sends a domain name resolution request carrying the target domain name to the domain name resolution server, and upon receiving the target address corresponding to the target domain name fed back by the domain name resolution server, the client accesses the data center corresponding to the target address.
[0176] 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 the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0177] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0178] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0179] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0180] The above is a detailed introduction to a multi-data center access method and system provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A multi-data center access method, characterized in that: Applied to a multi-data center access system, the multi-data center access system includes a client, a domain name resolution server and a data center cluster, the data center cluster includes multiple data centers, and the method includes: The client obtains the user information and the pre-stored domain name of the user in response to the user's access request, and sends a domain name resolution request carrying the domain name to the domain name resolution server; After receiving the domain name resolution request, the domain name resolution server resolves the total domain name contained in the domain name resolution request, obtains a first address, and sends the first address to the client; wherein the first address is the address of any data center in the data center cluster except the faulty data center, and the faulty data center is the data center that is currently faulty; After receiving the first address corresponding to the domain name resolution request fed back by the domain name resolution server, the client sends a message information carrying the user information to a first data center; the first data center is a data center corresponding to the first address; The first data center receives the message information, and based on the user information carried in the message information, sends a target domain name acquisition request to the user management system; so that after receiving the target domain name acquisition request, the user management system determines the target data center corresponding to the user information contained in the target domain name acquisition request according to the domain name allocation policy, and in the event of a failure in the target data center, determines the disaster recovery data center corresponding to the target data center, determines the domain name of the disaster recovery data center as the target domain name, and feeds back the target domain name to the first data center; wherein the user management system is set in any one of the data centers in the data center cluster, and the disaster recovery data center corresponding to the target data center is any one of the data centers in the data center cluster except the target data center; After receiving the target domain name fed back by the user management system, the first data center sends the target domain name to the client; After receiving the target domain name fed back by the first data center, the client sends a domain name resolution request carrying the target domain name to the domain name resolution server, and upon receiving the target address corresponding to the target domain name fed back by the domain name resolution server, the client accesses the data center corresponding to the target address.
2. The method according to claim 1, characterized in that Also includes: In the case that the target data center does not fail, determining the domain name of the target data center as the target domain name; Feedback the target domain name to the first data center.
3. The method according to claim 1 or 2, characterized in that: The user management system includes a preset user management system and a disaster recovery user management system, the data center to which the disaster recovery user management system belongs is a disaster recovery data center of the data center to which the preset user management system belongs, and the first data center sends a target domain name acquisition request to the user management system based on the user information carried in the message information, including: The first data center determines whether a data center to which the preset user management system belongs fails; If it is determined that the data center to which the preset user management system belongs has not failed, the first data center sends a target domain name acquisition request to the preset user management system based on the user information carried in the message information; If it is determined that a failure occurs in the data center to which the preset user management system belongs, the first data center sends a target domain name acquisition request to the disaster recovery user management system based on the user information carried in the message information.
4. The method according to claim 3, characterized in that The user management system determines the target data center corresponding to the user information according to the domain name allocation strategy, including: Obtaining a user identifier contained in the user information; Performing a modulo operation on the user identifier; Based on a result of the modulo operation, determining a data center corresponding to the result; A data center corresponding to the result is determined as a target data center.
5. The method according to claim 1, characterized in that The step of resolving the total domain name included in the domain name resolution request to obtain the first address includes: The domain name resolution server determines whether there is a data center that is currently faulty; If there is no data center that is currently faulty, the total domain name included in the domain name resolution request is resolved, and the total domain name is resolved to a second data center; the second data center is any data center in the data center cluster; If there is a data center that is currently faulty, the data centers in the data cluster except the data center that is currently faulty are grouped into a first set, and the total domain name included in the domain name resolution request is resolved, and the total domain name is resolved to a third data center; the third data center is any data center in the first set; The address of the second data center or the address of the third data center is used as the first address.
6. A multi-data center access system, characterized in that: include: A client, a domain name resolution server and a data center cluster, wherein the data center cluster includes multiple data centers; The client is connected to the domain name resolution server and the data center cluster respectively; The client is used to respond to the user's access request, obtain the user information of the user and the pre-stored domain name, and send a domain name resolution request carrying the domain name to the domain name resolution server; After receiving the first address corresponding to the domain name resolution request fed back by the domain name resolution server, sending message information carrying the user information to the first data center; After receiving the target domain name fed back by the first data center, sending a domain name resolution request carrying the target domain name to the domain name resolution server, and upon receiving the target address corresponding to the target domain name fed back by the domain name resolution server, accessing the data center corresponding to the target address; the first data center is the data center corresponding to the first address; The domain name resolution server is used to resolve the total domain name contained in the domain name resolution request after receiving the domain name resolution request, obtain a first address, and send the first address to the client; wherein the first address is the address of any data center in the data center cluster except the faulty data center, and the faulty data center is the data center that currently fails; The first data center receives the message information, and based on the user information carried in the message information, sends a target domain name acquisition request to the user management system, and after receiving the target domain name fed back by the user management system, sends the target domain name to the client; so that after receiving the target domain name acquisition request, the user management system determines the target data center corresponding to the user information contained in the target domain name acquisition request according to the domain name allocation policy, and in the event of a failure in the target data center, determines the disaster recovery data center corresponding to the target data center, determines the domain name of the disaster recovery data center as the target domain name, and feeds back the target domain name to the first data center; wherein the user management system is set in any one of the data centers in the data center cluster, and the disaster recovery data center corresponding to the target data center is any one of the data centers in the data center cluster except the target data center.
7. The system according to claim 6, characterized in that The user management server is also used for: In the case that the target data center does not fail, determining the domain name of the target data center as the target domain name; Feedback the target domain name to the first data center.
8. The system according to claim 6 or 7, characterized in that: The user management system includes a preset user management system and a disaster recovery user management system. The data center to which the disaster recovery user management system belongs is a disaster recovery data center of the data center to which the preset user management system belongs. The first data center executes, based on the user information carried in the message information, sending a target domain name acquisition request to the user management system, for: The first data center determines whether a data center to which the preset user management system belongs fails; If it is determined that the data center to which the preset user management system belongs has not failed, the first data center sends a target domain name acquisition request to the preset user management system based on the user information carried in the message information; If it is determined that a failure occurs in the data center to which the preset user management system belongs, the first data center sends a target domain name acquisition request to the disaster recovery user management system based on the user information carried in the message information.
9. The system according to claim 8, characterized in that The user management system executes the domain name allocation strategy to determine the target data center corresponding to the user information, for: Obtaining a user identifier contained in the user information; Performing a modulo operation on the user identifier; Based on a result of the modulo operation, determining a data center corresponding to the result; A data center corresponding to the result is determined as a target data center.
10. The system according to claim 6, characterized in that The domain name resolution server performs resolution of the total domain name included in the domain name resolution request to obtain a first address, which is used for: The domain name resolution server determines whether there is a data center that is currently faulty; If there is no data center that is currently faulty, the total domain name included in the domain name resolution request is resolved, and the total domain name is resolved to a second data center; the second data center is any data center in the data center cluster; If there is a data center that is currently faulty, the data centers in the data cluster except the data center that is currently faulty are grouped into a first set, and the total domain name included in the domain name resolution request is resolved, and the total domain name is resolved to a third data center; the third data center is any data center in the first set; The address of the second data center or the address of the third data center is used as the first address.
Citation Information
Patent Citations
Service processing method and data center system
CN106487486A
Global load balance method and system based on active-active architecture and scheduling server
CN107465721A
Disaster recovery method, device and apparatus
CN111464332A
Domain name resolution system, domain name resolution server, and domain name resolution method
US20190036870A1
