Main-standby switching method of domain name server and domain name server system
By establishing a backup proxy network in the backup cluster, using the main IP address and proxy information of the main domain name server, efficient master-backup switching of the domain name server is achieved, solving the problem of low efficiency in the existing technology, and ensuring high domain name resolution services Availability.
Patent Information
- Application Number
- CN202310708329.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2024-12-17
AI Technical Summary
In the prior art, the master-subsidiary handover efficiency of the domain name server is low, and the calculation node needs to record multiple IP addresses, resulting in low efficiency when the main domain name server fails.
When the main cluster fails, the main IP address and proxy information of the main domain name server are used to establish a backup proxy network in the backup cluster to realize the main and backup handover. The computing node only needs to record one IP address to access the domain name resolution service.
It improves the high availability of domain name resolution services, reduces the switching time when the main cluster fails, avoids incorrect switching, and ensures service continuity.
Smart Images

Figure CN119155163A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method for switching between a primary and a secondary domain name server and a domain name server system. Background Art
[0002] Users of storage systems may deploy clusters for different business scenarios. In this scenario, if a computing node needs to access storage nodes in different storage clusters, it needs to send a domain name resolution request to the DNS (Domain Name System) server to which the storage node belongs to obtain the accurate IP (Internet Protocol) address of the storage node.
[0003] In the prior art, a DNS server can be used as a proxy for the domain name resolution service of other DNS servers. However, in order to ensure high availability of the service, it is also necessary to set up multiple backup servers for the DNS server, and the computing nodes need to record the IP addresses of the primary domain name server and each backup server at the same time, so that domain name resolution can be achieved by accessing the backup server when the primary domain name server is inaccessible. This means that if the IP address of any server changes, the addresses recorded in all computing nodes need to be modified, which is inefficient. Summary of the invention
[0004] Based on this, it is necessary to provide a primary-backup switching method of a domain name server and a domain name server system to address the above technical issues.
[0005] In a first aspect, the present application provides a method for switching between a primary and a secondary cluster of a domain name server. The domain name server system includes a primary cluster and a proxy cluster where at least one proxy network is located, the proxy cluster includes a first secondary cluster, and the method is applied to the first secondary cluster, including:
[0006] When the primary cluster is in a fault state, based on the primary IP address of the primary domain name server in the primary cluster and the proxy information of the primary domain name server, a backup proxy network is established in the first backup cluster;
[0007] A second standby cluster is determined from each of the proxied clusters, the proxy information and the primary IP address are synchronized to the second standby cluster, and a master-slave connection is established with the second standby cluster.
[0008] The method for switching between the primary and backup domain name servers provided in the embodiment of the present application enables the first backup cluster to use the primary IP address and proxy information of the primary domain name server in the primary cluster to create a backup proxy network in the first backup cluster when the primary cluster is in a faulty state. This allows the first backup cluster to take over the domain name proxy service of the primary cluster, while the computing node can still send a domain name resolution request to the primary IP address based on its own recorded primary IP address. Therefore, it is possible to ensure the high availability of the domain name resolution service when only one IP address of a domain name server is recorded in the computing node.
[0009] In one embodiment, the method further comprises:
[0010] If no heartbeat signal sent by the primary cluster is received within the first preset time period, it is determined that the primary cluster is in a fault state.
[0011] The master-slave switching method of the domain name server provided in the present application maintains the connection between the master cluster and the first standby cluster through the heartbeat signal, so that when the first standby cluster fails to detect the heartbeat signal within the first preset time period, it can determine that the master cluster is in a faulty state and start the master-slave switching, thereby improving the timeliness of the master-slave switching.
[0012] In one embodiment, the establishing of a backup proxy network in the first backup cluster based on the primary IP address of the primary domain name server in the primary cluster and the proxy information of the primary domain name server includes:
[0013] Based on the primary IP address, sending a response request to the primary domain name server;
[0014] If the first response information sent by the primary domain name server in response to the response request is not received within the second preset time period, a backup proxy network is established in the first backup cluster based on the primary IP address of the primary domain name server in the primary cluster and the proxy information of the primary domain name server.
[0015] The master-slave switching method of the domain name server provided in the embodiment of the present application enables the first backup domain name server to verify whether the primary cluster has failed by sending a response request to the primary domain name server when the primary-slave connection is disconnected, thereby avoiding erroneous master-slave switching caused by a failure in the primary cluster but a failure in the primary-slave connection.
[0016] In one embodiment, the method further comprises:
[0017] When receiving the master-slave switching request sent by the master cluster, sending a stop connection request to the second standby cluster;
[0018] Upon receiving a second response message sent by the second standby cluster in response to the stop connection request, disconnect the active-standby connection, delete the standby proxy network and the proxy information, and send the IP address of the second standby cluster to the active cluster, so that the active cluster can establish an active-standby connection with the second standby cluster according to the IP address of the second standby cluster.
[0019] The master-slave switching method for a domain name server provided in an embodiment of the present application enables the first standby cluster to send a stop connection request to the second standby cluster and return the IP address of the second standby cluster to the master cluster when the master cluster recovers from a failure. This can support the master cluster to become the master cluster again after the failure is recovered, and at the same time enable the second standby cluster to become the standby cluster of the master cluster, thereby continuing to maintain high availability of the domain name proxy service.
[0020] In one of the embodiments, before deleting the backup proxy network, the method further includes:
[0021] The current proxy information of the standby proxy network is acquired, and the current proxy information is synchronized to the main cluster, so that the main cluster can update the proxy information of the main cluster according to the current proxy information.
[0022] The master-slave switching method for a domain name server provided in an embodiment of the present application enables the first standby cluster to synchronize current proxy information with the second standby cluster when the primary cluster recovers from a failure, and can retain modifications made to the proxy information during the period when the first standby cluster becomes the de facto primary cluster.
[0023] In one embodiment, determining the second standby cluster includes:
[0024] Obtaining the network card bandwidth of each proxied cluster, and sorting the proxied clusters from large to small according to the network card bandwidth to obtain a first candidate cluster queue;
[0025] Obtaining the target network card bandwidth corresponding to the proxied cluster ranked first in the first candidate cluster queue, and determining at least one first candidate cluster from the first candidate cluster queue according to the target network card bandwidth and a preset bandwidth difference range;
[0026] Obtaining the CPU load of each of the first candidate clusters, and sorting the first candidate clusters from small to large according to the CPU load to obtain a second candidate cluster queue;
[0027] The first candidate cluster arranged at the first position in the second candidate cluster queue is used as the second standby cluster.
[0028] The master-slave switching method of the domain name server provided in the embodiment of the present application first sorts each proxied cluster according to the network card bandwidth and secondly sorts according to the CPU load of the storage node to obtain the second backup cluster. Therefore, the proxied cluster with a larger network card bandwidth and a smaller CPU load can be selected as the second backup cluster, which can minimize the impact of the domain name proxy business on the normal business of the cluster.
[0029] In a second aspect, the present application further provides a domain name server system, the system comprising a main cluster and a proxy cluster where at least one proxy network is located, the proxy cluster comprising a first backup cluster, the main cluster comprising a primary domain name server, wherein:
[0030] The primary domain name server is used to forward the domain name resolution request sent by the computing node to the target domain name server based on the proxy information, and forward the target IP address fed back by the target domain name server to the computing node;
[0031] The first standby cluster is used to establish a standby proxy network in the first standby cluster based on the primary IP address of the primary domain name server and the proxy information of the primary domain name server when the primary cluster is in a faulty state;
[0032] The first standby cluster is further configured to determine a second standby cluster from the proxy clusters, synchronize the proxy information and the primary IP address to the second standby cluster, and establish a master-standby connection with the second standby cluster.
[0033] In one of the embodiments, the main cluster is further used to periodically perform system fault detection to obtain a fault detection result, and when the fault detection result indicates that the main cluster system is in a normal state, send a master-slave switching request to the first standby cluster based on the main IP address;
[0034] The first standby cluster is further configured to, upon receiving the active-standby switching request, send a stop connection request to the second standby cluster, and upon receiving a response message sent by the second standby cluster in response to the stop connection request, disconnect the active-standby connection, delete the standby proxy network and the proxy information, and send the IP address of the second standby cluster to the active cluster;
[0035] The active cluster is further configured to establish an active-standby connection with the second standby cluster according to the IP address of the second standby cluster.
[0036] In a third aspect, the present application also provides a primary-backup switching device for a domain name server. The device comprises:
[0037] A first establishing module, configured to establish a backup proxy network in the first backup cluster based on a primary IP address of a primary domain name server in the primary cluster and proxy information of the primary domain name server when the primary cluster is in a fault state;
[0038] The first determining module determines a second standby cluster from each of the proxied clusters, synchronizes the proxy information and the primary IP address to the second standby cluster, and establishes a master-slave connection with the second standby cluster.
[0039] In one embodiment, the device further comprises:
[0040] The second determining module is configured to determine that the primary cluster is in a fault state if no heartbeat signal sent by the primary cluster is received within a first preset time period.
[0041] In one embodiment, the first establishing module is further used to:
[0042] Based on the primary IP address, sending a response request to the primary domain name server;
[0043] If the first response information sent by the primary domain name server in response to the response request is not received within the second preset time period, a backup proxy network is established in the first backup cluster based on the primary IP address of the primary domain name server in the primary cluster and the proxy information of the primary domain name server.
[0044] In one embodiment, the device further comprises:
[0045] A first sending module is used to send a stop connection request to the second standby cluster when receiving the master-standby switching request sent by the master cluster;
[0046] The second sending module is used to disconnect the master-slave connection, delete the standby proxy network and the proxy information, and send the IP address of the second standby cluster to the master cluster when receiving the second reply information sent by the second standby cluster in response to the stop connection request, so that the master cluster can send a heartbeat signal connection request to the second standby cluster according to the IP address of the second standby cluster, and establish a master-slave connection with the second standby cluster after the second standby cluster replies.
[0047] In one embodiment, the device further comprises:
[0048] The acquisition module is used to acquire the current proxy information of the backup proxy network and synchronize the current proxy information to the main cluster, so that the main cluster can update the proxy information of the main cluster according to the current proxy information.
[0049] In one embodiment, the first determining module is further used to:
[0050] Obtaining the network card bandwidth of each proxied cluster, and sorting the proxied clusters from large to small according to the network card bandwidth to obtain a first candidate cluster queue;
[0051] Obtaining the target network card bandwidth corresponding to the proxied cluster ranked first in the first candidate cluster queue, and determining at least one first candidate cluster from the first candidate cluster queue according to the target network card bandwidth and a preset bandwidth difference range;
[0052] Obtaining the CPU load of each of the first candidate clusters, and sorting the first candidate clusters from small to large according to the CPU load to obtain a second candidate cluster queue;
[0053] The first candidate cluster arranged at the first position in the second candidate cluster queue is used as the second standby cluster.
[0054] In a fourth aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, any one of the above methods is implemented.
[0055] In a fifth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, any of the above methods is implemented.
[0056] In a sixth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, any of the above methods is implemented.
[0057] The above-mentioned method for switching between the primary and backup domain name servers and the domain name server system, when the primary cluster is in a faulty state, enables the first backup cluster to use the primary IP address and proxy information of the primary domain name server in the primary cluster to create a backup proxy network in the first backup cluster. This allows the first backup cluster to take over the domain name proxy service of the primary cluster, while the computing node can still send a domain name resolution request to the primary IP address based on its own recorded primary IP address. Therefore, it is possible to ensure the high availability of the domain name resolution service when only one domain name server IP address is recorded in the computing node. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 is a schematic diagram of a domain name server system in one embodiment;
[0059] Figure 2 A schematic diagram of a process flow of a method for switching between a primary and a secondary domain name server in one embodiment;
[0060] Figure 3 A schematic diagram of a connection between a primary cluster and a first standby cluster in one embodiment;
[0061] Figure 4 is a flow chart of step 202 of an embodiment;
[0062] Figure 5 A schematic diagram of active / standby switching in one embodiment;
[0063] Figure 6 A schematic diagram of a process flow of a method for switching between a primary and a secondary domain name server in one embodiment;
[0064] Figure 7 A schematic diagram of active / standby switching in one embodiment;
[0065] Figure 8 is a flow chart of step 204 of an embodiment;
[0066] Fig. 9 A structural block diagram of a master-slave switching device for a domain name server in one embodiment;
[0067] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0069] The method for switching the primary and backup domain name servers provided in the embodiments of the present application can be applied but not limited to the following: Figure 1 In the domain name server system shown in FIG. 1 , the domain name server system includes a main cluster 10 and a proxy cluster 11 where at least one proxy network is located. The main cluster 10 includes a domain name server of the main proxy network, that is, a main domain name server 101, and the proxy cluster 11 includes a domain name server 111 of the proxy network. The main domain name server 101 records the correspondence between the domain names of all the proxy networks and the IP addresses of the domain name servers 111 of the networks.
[0070] Only the primary IP address is recorded in the computing node, and all domain name resolution requests of the computing node will be sent to the primary domain name server 101 according to the primary IP address. When the computing node needs to access a certain domain name, the computing node sends a domain name resolution request to the primary domain name server 101. The primary domain name server 101 determines the IP address of the domain name server 111 corresponding to the domain name, and forwards the domain name resolution request to the corresponding domain name server 111 based on the IP address. The domain name server 111 resolves the IP address corresponding to the domain name, and then returns the IP address to the primary domain name server 101, which then returns the IP address to the computing node, and the computing node then accesses the corresponding storage node according to the IP address.
[0071] The first standby cluster is a cluster in the proxied clusters 11. When the domain proxy function is enabled in the primary domain name server 101, the primary cluster 10 selects a cluster from each proxied cluster 11 as the first standby cluster. The first standby cluster continuously monitors whether the primary cluster 10 is in a fault state.
[0072] The primary domain name server 101 and the domain name server 111 can be implemented by using independent servers or a server cluster composed of multiple servers.
[0073] In one embodiment, Figure 2 As shown, a method for switching between a primary and a secondary cluster of a domain name server is provided. This embodiment takes the method applied to a first secondary cluster as an example for description, and includes the following steps:
[0074] Step 202: When the primary cluster is in a fault state, a backup proxy network is established in the first backup cluster based on the primary IP address of the primary domain name server in the primary cluster and the proxy information of the primary domain name server.
[0075] In the embodiment of the present application, the first standby cluster continuously monitors whether the main cluster is in a faulty state. For example, the first standby cluster can determine the state of the main cluster by monitoring the operation of certain key services in the main cluster. If the service does not run for a long time, it determines that the main cluster is in a faulty state and starts the main-standby switching process; or a heartbeat connection can be established between the first standby cluster and the main cluster. If the first standby cluster does not receive a heartbeat signal sent regularly by the main cluster, it determines that the main cluster is in a faulty state and starts the main-standby switching process. The embodiment of the present application does not specifically limit this.
[0076] It should be noted that the active cluster may also monitor whether the first standby cluster is in a faulty state in the above manner. When the active cluster determines that the first standby cluster is faulty, the active cluster may reselect a cluster from the proxy clusters as the first standby cluster.
[0077] When the primary cluster is selected (or at any time thereafter), the primary cluster can send the IP address (primary IP address) of the primary domain name server and the proxy information to the first backup cluster, and the first backup cluster stores the above information in the database. The proxy information refers to the correspondence between the domain name and the domain name server of each proxy network, including the domain name of each proxy network and the IP address of the domain name server of each proxy network. In the event of a failure in the primary cluster, the first backup cluster can read the primary IP address and proxy information from the database, and create a subnet (backup proxy network) in the first backup cluster based on the primary IP address. The backup proxy network should include at least the primary IP address, so that the primary IP address is equivalent to migrating to a server in the first backup cluster. The first backup cluster can then add the proxy information to the server. Since the IP address of the server is currently the primary IP address, subsequent domain name resolution requests will be sent to the server, and the server will take over the domain name proxy service of the primary domain name server, that is, the first backup cluster completes the switch from the backup cluster to the primary cluster.
[0078] It should be noted that if Figure 3 As shown, the main cluster can also send the information of the primary proxy network where the primary domain name server is located to the first standby cluster. When the first standby cluster creates the standby proxy network, it can make the created standby proxy network and the main proxy network have the same domain name and contain the same IP address. In this way, when the main cluster fails and the main proxy network is no longer accessible, the computing node can access each IP address in the main proxy network through the standby proxy network.
[0079] Step 204 , determine a second standby cluster from each proxied cluster, synchronize the proxy information and the primary IP address to the second standby cluster, and establish a master-standby connection with the second standby cluster.
[0080] In the embodiment of the present application, after the subnet under the first backup cluster takes over the domain name proxy service, the first backup cluster becomes the de facto main cluster. To ensure the high availability of the domain name proxy service, in the case where there are other proxied clusters, the first backup cluster needs to find a backup cluster for itself from the proxied cluster, that is, the second backup cluster (if there are no other proxied clusters, there is no need to select the second backup cluster). The second backup cluster can be randomly selected from each proxied cluster, or the second backup cluster can be selected based on preset rules. For example, the preset rules can be set to select the proxied cluster with the largest remaining network card bandwidth as the second backup cluster, so that the domain name proxy service will not interfere with the normal business of the second backup cluster. The embodiment of the present application does not make specific limitations on this.
[0081] After determining the second standby cluster, the first standby cluster can send the primary IP address and proxy information to the second standby cluster based on the IP address of the second standby cluster, and establish a primary-backup connection with the second standby cluster. Establishing a primary-backup connection refers to establishing a mechanism that enables the second standby cluster to monitor whether the first standby cluster is in a faulty state. The primary-backup connection here can be the same as the way the first standby cluster monitors whether the primary cluster is in a faulty state, or it can be different. This embodiment of the present application does not specifically limit this.
[0082] After the master-slave connection is established, when the second standby cluster detects that the first standby cluster is in a faulty state, the second standby cluster can replace the first standby cluster as the de facto master cluster by creating a subnet based on the master IP address. The way the second standby cluster replaces the first standby cluster can refer to the way the first standby cluster replaces the master cluster, and the embodiments of the present application will not be repeated here.
[0083] The method for switching between the primary and backup domain name servers provided in the embodiment of the present application enables the first backup cluster to use the primary IP address and proxy information of the primary domain name server in the primary cluster to create a backup proxy network in the first backup cluster when the primary cluster is in a faulty state. This allows the first backup cluster to take over the domain name proxy service of the primary cluster, while the computing node can still send a domain name resolution request to the primary IP address based on its own recorded primary IP address. Therefore, it is possible to ensure the high availability of the domain name resolution service when only one IP address of a domain name server is recorded in the computing node.
[0084] In one embodiment, the method further includes:
[0085] When no heartbeat signal sent by the primary cluster is received within the first preset time period, it is determined that the primary cluster is in a fault state.
[0086] In the present application, refer to Figure 3 As shown, a heartbeat signal connection can be established between the main cluster and the first standby cluster, so that the first standby cluster and the main cluster can monitor each other for failure. The main cluster sends a heartbeat signal to the first standby cluster at regular intervals, and the first standby cluster determines whether the main cluster is normal based on whether it receives the heartbeat signal sent by the main cluster; after receiving the heartbeat signal sent by the main cluster, the first standby cluster returns a response signal to the main cluster, and the main cluster determines whether the first standby cluster is normal based on whether it receives the response signal sent by the first standby cluster. When the first standby cluster does not receive the heartbeat signal of the main cluster within a first preset time (the length of the first preset time can be set by a technician in this field according to needs), it can be determined that the main cluster has a failure, and the first standby cluster can then start the main-standby switching process.
[0087] Similarly, if the main cluster does not receive the heartbeat signal of the first standby cluster within a preset duration (the preset duration may be the same as or different from the first preset duration), it can be determined that the first standby cluster has failed, and the main cluster can then reselect a cluster from the proxy clusters as the first standby cluster.
[0088] The master-slave switching method of the domain name server provided in the present application maintains the connection between the master cluster and the first standby cluster through the heartbeat signal, so that when the first standby cluster fails to detect the heartbeat signal within the first preset time period, it can determine that the master cluster is in a faulty state and start the master-slave switching, thereby improving the timeliness of the master-slave switching.
[0089] In one embodiment, Figure 4 As shown, in step 202, based on the primary IP address of the primary domain name server in the primary cluster and the proxy information of the primary domain name server, a backup proxy network is established in the first backup cluster, including:
[0090] Step 402: Send a response request to the primary domain name server based on the primary IP address.
[0091] Step 404, if the first response information sent by the primary domain name server in response to the response request is not received within the second preset time period, a backup proxy network is established in the first backup cluster based on the primary IP address of the primary domain name server in the primary cluster and the proxy information of the primary domain name server.
[0092] In the present application embodiment, Figure 5 As shown, before starting the master-slave switching process, the first standby cluster should first verify whether the master cluster has indeed failed, otherwise the IP address of the subnet established by the first standby cluster will conflict with the IP address of the primary domain name server. The first standby cluster can verify whether the master cluster has failed by sending a response request to the primary domain name server (or it can also be the primary cluster, the embodiment of the present application does not specifically limit this): if the primary domain name server returns the first response information to the first standby cluster within the second preset time, it means that the master cluster has not failed, and the first standby cluster can then try to rebuild the master-slave connection with the master cluster; if the primary domain name server does not return the first response information to the first standby cluster within the second preset time, it means that the master cluster has failed, and the first standby cluster can then start to establish a standby proxy network and find the master-slave switching process of the second standby cluster.
[0093] The master-slave switching method of the domain name server provided in the embodiment of the present application enables the first backup domain name server to verify whether the primary cluster has failed by sending a response request to the primary domain name server when the primary-slave connection is disconnected, thereby avoiding erroneous master-slave switching caused by a failure in the primary cluster but a failure in the primary-slave connection.
[0094] In one embodiment, Figure 6 As shown, the above method also includes:
[0095] Step 602: upon receiving a master-slave switch request sent by the master cluster, a connection stop request is sent to the second standby cluster.
[0096] Step 604, upon receiving the second response information sent by the second standby cluster in response to the stop connection request, disconnect the master-slave connection, delete the standby proxy network and proxy information, and send the IP address of the second standby cluster to the master cluster, so that the master cluster can send a master-slave connection request to the second standby cluster according to the IP address of the second standby cluster, and establish a master-slave connection with the second standby cluster after the second standby cluster responds.
[0097] In the embodiment of the present application, after the failure is recovered, the main cluster can query the proxied cluster where the current main IP address is located based on the main IP address. For example, the main cluster can send a query message to the main IP address so that the domain name server that currently owns the main IP address returns the proxied cluster where the server is located to the main cluster; or the main cluster can also query the physical network card where the main IP address is currently located to obtain the proxied cluster where the main IP address is located. The embodiment of the present application does not specifically limit this. Figure 7 As shown in FIG. 1 , when the proxied cluster where the primary IP address is located is the second standby cluster, the second standby cluster makes its own standby cluster (the third standby cluster) become the standby cluster of the primary cluster. Figure 7 The current domain name proxy cluster in is the proxied cluster where the current primary IP address is located.
[0098] The following description assumes that the proxied cluster where the primary IP address is located is the first standby cluster. After the primary cluster determines that the first standby cluster is the cluster where the current primary IP address is located, it sends a master-standby switching request to the first standby cluster. Since the current standby cluster is the second standby cluster, the first standby cluster can either restore itself to be the standby cluster of the primary cluster or make the second standby cluster the standby cluster of the primary cluster.
[0099] Taking the example of making the second standby cluster become the standby cluster of the main cluster, the first standby cluster can send a stop connection request to the second standby cluster to notify the second standby cluster and the first standby cluster to disconnect the master-standby connection. Upon receiving the second response information sent by the second standby cluster, the first standby cluster sends the IP address of the second standby cluster to the main cluster, and the main cluster sends a master-standby connection request to the second standby cluster according to the IP address of the second standby cluster to establish a master-standby connection with the second standby cluster, so that the second standby cluster becomes the standby cluster of the main cluster. In the case where the second standby cluster becomes the standby cluster of the main cluster, the first standby cluster needs to delete the standby proxy network established in the cluster and the proxy information in the standby proxy network to avoid conflicts between the IP address of the standby proxy network and the main IP address.
[0100] It should be noted that the first standby cluster can also be restored to be a standby cluster of the main cluster. In this case, the first standby cluster can also send a stop connection request to the second standby cluster, and upon receiving the second response information sent by the second standby cluster, delete the standby proxy network and proxy information, and send a response message to the main cluster to notify the main cluster that the first standby cluster has completed preparation. The main cluster can then send a master-slave connection request to the first standby cluster, and after the first standby cluster responds, establish a master-slave connection with the first standby cluster.
[0101] It should be noted that if Figure 7 As shown, the first standby cluster also fails, and the primary IP address has been migrated to the second standby cluster. When the first standby cluster recovers from the failure, since the first standby cluster is not the original primary cluster, the first standby cluster will not start the above primary-standby switching process.
[0102] The master-slave switching method for a domain name server provided in an embodiment of the present application enables the first standby cluster to send a stop connection request to the second standby cluster and return the IP address of the second standby cluster to the master cluster when the master cluster recovers from a failure. This can support the master cluster to become the master cluster again after the failure is recovered, and at the same time enable the second standby cluster to become the standby cluster of the master cluster, thereby continuing to maintain high availability of the domain name proxy service.
[0103] In one embodiment, before deleting the backup proxy network, the method further includes:
[0104] The current proxy information of the backup proxy network is obtained, and the current proxy information is synchronized to the primary domain name server, so that the primary cluster can update the proxy information of the primary cluster according to the current proxy information.
[0105] In the embodiment of the present application, during the period when the first standby cluster becomes the de facto main cluster, the proxy information may change. For example, when adding other networks that need to perform domain name proxy, the correspondence between the DNS server IP address of the network and the domain name of the network will be added to the proxy information; when canceling the domain name proxy for a certain proxy network, the correspondence between the DNS server IP address of the proxy network and the domain name of the network needs to be deleted from the proxy information. Therefore, when the main cluster recovers from a failure, the first standby cluster needs to synchronize the current proxy information to the main cluster so that the main cluster can update the proxy information stored before the failure of the main cluster based on the current proxy information.
[0106] The main cluster can use the current proxy information to replace the original proxy information. Alternatively, the first standby cluster can also synchronize only the information in the proxy information that has changed after the first standby cluster switches to the de facto main cluster to the main cluster, so that the main cluster can make corresponding adjustments to the proxy information stored in the main cluster according to the changed information. This embodiment of the present application does not specifically limit this.
[0107] The master-slave switching method for a domain name server provided in an embodiment of the present application enables the first standby cluster to synchronize current proxy information with the second standby cluster when the primary cluster recovers from a failure, and can retain modifications made to the proxy information during the period when the first standby cluster becomes the de facto primary cluster.
[0108] In one embodiment, Figure 8 As shown, in step 204, determining the second standby cluster includes:
[0109] Step 802 : Obtain the network card bandwidth of each proxied cluster, and sort the proxied clusters from large to small according to the network card bandwidth to obtain a first candidate cluster queue.
[0110] Step 804 , obtaining the target network card bandwidth corresponding to the proxied cluster ranked first in the first candidate cluster queue, and determining at least one first candidate cluster from the first candidate cluster queue according to the target network card bandwidth and a preset bandwidth difference range.
[0111] Step 806 , obtaining the CPU load of each first candidate cluster, and sorting the first candidate clusters from small to large according to the CPU load, to obtain a second candidate cluster queue.
[0112] Step 808: Use the first candidate cluster ranked at the first position in the second candidate cluster queue as the second standby cluster.
[0113] In an embodiment of the present application, each proxy cluster can be sorted first according to the network card bandwidth and secondly according to the CPU load to select the second backup cluster. The network card bandwidth of each proxy cluster can be first obtained (it can be the total network card bandwidth or the remaining network card bandwidth), and each proxy cluster can be sorted from large to small according to the network card bandwidth to obtain a first candidate cluster queue. The proxy cluster ranked first in the first candidate cluster queue can be first used as the first candidate cluster, and the target network card bandwidth corresponding to the proxy cluster can be determined, and then the first candidate cluster queue can be traversed in order starting from the proxy cluster ranked second. If the difference between the network card bandwidth of the currently traversed proxy cluster and the target network card bandwidth is within the bandwidth difference range (the bandwidth difference range is a numerical interval, and its value can be set by a technician in this field according to demand), the currently traversed proxy cluster is also used as the first candidate cluster; and so on, after the first candidate cluster queue is traversed, at least one first candidate cluster can be obtained.
[0114] The second candidate cluster queue can be obtained by sorting each first candidate cluster from small to large according to the sum of the CPU (Central Processing Unit) loads of all storage nodes in the cluster. The first candidate cluster ranked first in the second candidate cluster queue can be directly used as the second backup cluster; or, at least one second candidate cluster can be obtained from the second candidate cluster queue in accordance with the method of selecting the first candidate cluster; if the number of second candidate clusters is greater than 1, the second candidate clusters can be sorted according to other criteria (such as the number of nodes corresponding to the proxy network in the cluster, the reliability of the cluster, etc.), and then the second backup cluster can be selected from the queue obtained after sorting; or, a cluster can be selected from the second candidate cluster as the second backup cluster according to a fixed rule (for example, the cluster with the smallest cluster unique identification number is selected as the second backup cluster), and the embodiments of the present application do not make specific limitations on this.
[0115] It should be noted that the method in which the primary cluster selects the first standby cluster may also be performed according to the above process, which will not be described in detail in the embodiment of the present application.
[0116] The master-slave switching method of the domain name server provided in the embodiment of the present application first sorts each proxied cluster according to the network card bandwidth and secondly sorts according to the CPU load of the storage node to obtain the second backup cluster. Therefore, the proxied cluster with a larger network card bandwidth and a smaller CPU load can be selected as the second backup cluster, which can minimize the impact of the domain name proxy business on the normal business of the cluster.
[0117] In one embodiment, a domain name server system is provided, the system includes a main cluster and a proxy cluster where at least one proxy network is located, the proxy cluster includes a first backup cluster, and the main cluster includes a primary domain name server, wherein:
[0118] The primary domain name server is used to forward the domain name resolution request sent by the computing node to the target domain name server based on the proxy information, and forward the target IP address fed back by the target domain name server to the computing node;
[0119] The first standby cluster is used to establish a standby proxy network in the first standby cluster based on the primary IP address of the primary domain name server and the proxy information of the primary domain name server when the primary cluster is in a faulty state;
[0120] The first standby cluster is further used to determine the second standby cluster from the proxy clusters, synchronize the proxy information and the primary IP address to the second standby cluster, and establish a master-standby connection with the second standby cluster.
[0121] In the embodiment of the present application, the domain name server system includes a main cluster and at least one proxied cluster, the main cluster is the cluster where the main domain name server is located, and the proxied cluster is the cluster where the proxied network is located. The main domain name server records the proxy information, that is, the correspondence between the domain name of each proxied network and the IP address of the domain name server of the proxied network. Referring to the following Table 1, an example of the IP address of the main domain name server, the IP address of the proxied network, and the IP address of the domain name server of the proxied network is shown:
[0122] Table 1
[0123]
[0124]
[0125] The above example is used to illustrate the process of the primary domain name server acting as a domain name agent. Assuming that the domain name server of the As network in the table is the primary domain name server, the primary domain name server will record the corresponding relationship between the IP address of the domain name server of the Bs network and the domain name of the Bs network, as well as the corresponding relationship between the IP address of the domain name server of the Cs network and the domain name of the Cs network, that is, 76.22.132.201 corresponds to www.bs1.com, and 86.22.132.201 corresponds to www.cs1.com.
[0126] The computing node only records the IP address (primary IP address) of the domain name server of the As network, which is 66.22.132.201. All domain name resolution requests of the computing node will be sent to the primary IP address. When the primary domain name server receives a domain name resolution request that does not belong to its own network, it will forward the domain name resolution request to the corresponding target domain name server according to the proxy information. For example, if the computing node sends a domain name resolution request for www.bs1.com to the primary domain name server, since the primary domain name server is only responsible for resolving the domain name www.as1.com, the resolution of www.bs1.com cannot be completed in the primary domain name server. The primary domain name server can query the IP address of the domain name server corresponding to www.bs1.com in the proxy information, which is 76.22.132.201, and forward the domain name resolution request to this IP address. After receiving the domain name resolution request, the domain name server of the Bs network determines the IP address corresponding to www.bs1.com in the IP pool of 76.22.132.202-205 (to ensure load balancing of each storage node, a domain name may correspond to the IP addresses of multiple storage nodes, so the domain name server needs to dynamically allocate IP addresses for the domain name according to the current load of each storage node), and returns the determined IP address (for example, 76.22.132.202) to the primary domain name server. The primary domain name server then returns the IP address to the computing node, and the computing node then accesses the corresponding storage node based on the received IP address.
[0127] To ensure high availability of the domain name proxy service, when the primary cluster where the primary domain name server is located detects that a domain name proxy service has been added to the primary domain name server, it can determine the proxied clusters where each proxied network is located based on the IP addresses of the domain name servers of each proxied network recorded in the proxy information. The primary cluster selects a cluster from the proxied clusters as the first standby cluster (it can be selected randomly or in the manner of selecting the second standby cluster in the aforementioned embodiment), and sends the proxy information to the first standby cluster, thereby establishing a master-standby connection with the first standby cluster.
[0128] The first standby cluster starts the master-slave switching process when it detects that the main cluster is in a faulty state (the judgment of the faulty state can refer to the relevant description of the aforementioned embodiment, and the embodiments of the present application will not be repeated here). The first standby cluster can use the primary IP address of the primary domain name server to create a subnet in the first standby cluster, that is, a standby proxy network. The network should include at least the primary IP address, so that the subsequent domain name resolution requests of the computing node will be sent to the server corresponding to the primary IP address currently in the first standby cluster, and the server will take over the domain name proxy service of the primary domain name server.
[0129] It should be noted that the primary cluster can also send information about the network where the primary domain name server is located to the first backup cluster. That is, in addition to the primary IP address 66.22.132.201, the primary cluster can also send the correspondence between www.as1.com and 66.22.132.202-205 to the first backup cluster. When the first backup cluster establishes the backup proxy network, it can set the domain name of the backup proxy network to www.as1.com and the corresponding IP pool to 66.22.132.202-205. In this way, in the event of a failure of the primary cluster, the first backup cluster can also take over the network where the primary domain name server is located, so that the computing nodes can still access the storage nodes normally through the domain name of www.as1.com.
[0130] After completing the master-slave switch, the first standby cluster becomes the de facto master cluster. In the case where there are other proxy clusters, the first standby cluster needs to find a new standby cluster for itself, that is, the second standby cluster. The process of establishing a connection between the first standby cluster and the second standby cluster can refer to the process of establishing a connection between the master cluster and the first standby cluster, and the embodiments of the present application will not be repeated here.
[0131] The domain name server system provided by the embodiment of the present application enables the first standby cluster to use the primary IP address and proxy information of the primary domain name server in the main cluster to create a standby proxy network in the first standby cluster when the main cluster is in a faulty state. This allows the first standby cluster to take over the domain name proxy service of the main cluster, while the computing node can still send a domain name resolution request to the primary IP address based on its own recorded primary IP address. Therefore, it is possible to ensure the high availability of the domain name resolution service when only one domain name server IP address is recorded in the computing node.
[0132] In one embodiment, the active cluster is further used to periodically perform system fault detection to obtain a fault detection result, and when the fault detection result indicates that the system status of the active cluster is normal, send an active-standby switching request to the first standby cluster based on the primary IP address;
[0133] The first standby cluster is further configured to, upon receiving the active-standby switching request, send a stop connection request to the second standby cluster, and upon receiving a response message sent by the second standby cluster in response to the stop connection request, disconnect the active-standby connection, delete the standby proxy network and proxy information, and send the IP address of the second standby cluster to the active cluster;
[0134] The active cluster is further used to establish an active-standby connection with the second standby cluster according to the IP address of the second standby cluster.
[0135] In the embodiment of the present application, when the main cluster determines that it has recovered from the fault according to the fault detection result, the main cluster needs to send a master-slave switching request to the cluster where the primary IP address is currently located, so that the main cluster can take over the domain name proxy service again. The method of determining the cluster where the primary IP address is currently located based on the primary IP address can refer to the above embodiment, and the embodiment of the present application will not be repeated here.
[0136] Assuming that the cluster where the primary IP address is currently located is the first standby cluster, the first standby cluster can establish a connection between the second standby cluster and the main cluster when receiving the master-slave switching request, so that the second standby cluster becomes the standby cluster of the main cluster. Since the main cluster cannot know the current second standby cluster of the first standby cluster, the first standby cluster needs to send the IP address of the second standby cluster to the main cluster, and notify the second standby cluster through a stop connection request that the master-standby connection needs to be disconnected. After receiving the stop connection request, the second standby cluster sends a response message to the first standby cluster. After receiving the response message, the first standby cluster sends the IP address of the second standby cluster to the main cluster, and deletes the standby proxy network and proxy information. The main cluster can then establish a master-standby connection between the second standby cluster and the second standby cluster based on the IP address of the second standby cluster, completing the process of the main cluster taking over the domain name proxy service and the second standby cluster becoming a standby cluster of the main cluster.
[0137] The domain name server system provided in the embodiment of the present application enables the first standby cluster to send a stop connection request to the second standby cluster and return the IP address of the second standby cluster to the main cluster when the main cluster recovers from a failure. This can support the main cluster to become the main cluster again after the failure is recovered, and at the same time enable the second standby cluster to become the standby cluster of the main cluster, thereby continuing to maintain the high availability of the domain name proxy service.
[0138] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0139] Based on the same inventive concept, the embodiment of the present application also provides a master-slave switching device for a domain name server for implementing the master-slave switching method of the domain name server involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the master-slave switching device for one or more domain name servers provided below can refer to the limitations of the master-slave switching method of the domain name server above, and will not be repeated here.
[0140] In one embodiment, Fig. 9 As shown, a primary / standby switching device 900 of a domain name server is provided, comprising: a first establishing module 902, a determining module 904, and a second establishing module 906, wherein:
[0141] A first establishing module 902 is configured to establish a backup proxy network in the first backup cluster based on a primary IP address of a primary domain name server in the primary cluster and proxy information of the primary domain name server when the primary cluster is in a fault state;
[0142] The first determination module 904 is configured to determine a second standby cluster from the proxied clusters, synchronize the proxy information and the primary IP address to the second standby cluster, and establish a master-slave connection with the second standby cluster.
[0143] The master-slave switching device of the domain name server provided in the embodiment of the present application enables the first standby cluster to use the master IP address and proxy information of the master domain name server in the master cluster to create a standby proxy network in the first standby cluster when the master cluster is in a faulty state. This allows the first standby cluster to take over the domain name proxy service of the master cluster, while the computing node can still send a domain name resolution request to the master IP address based on its own recorded master IP address. Therefore, it is possible to ensure the high availability of the domain name resolution service when only one domain name server IP address is recorded in the computing node.
[0144] In one embodiment, the device further comprises:
[0145] The second determining module is configured to determine that the primary cluster is in a fault state if no heartbeat signal sent by the primary cluster is received within a first preset time period.
[0146] In one embodiment, the first establishing module 902 is further used to:
[0147] Based on the primary IP address, sending a response request to the primary domain name server;
[0148] If the first response information sent by the primary domain name server in response to the response request is not received within the second preset time period, a backup proxy network is established in the first backup cluster based on the primary IP address of the primary domain name server in the primary cluster and the proxy information of the primary domain name server.
[0149] In one embodiment, the device further comprises:
[0150] A first sending module is used to send a stop connection request to the second standby cluster when receiving the master-standby switching request sent by the master cluster;
[0151] A second sending module is used to disconnect the master-slave connection, delete the standby proxy network and the proxy information, and send the IP address of the second standby cluster to the master cluster upon receiving a second response message sent by the second standby cluster in response to the stop connection request, so that the master cluster can establish a master-slave connection with the second standby cluster according to the IP address of the second standby cluster.
[0152] In one embodiment, the device further comprises:
[0153] The acquisition module is used to acquire the current proxy information of the backup proxy network and synchronize the current proxy information to the main cluster, so that the main cluster can update the proxy information of the main cluster according to the current proxy information.
[0154] In one embodiment, the first determining module 904 is further configured to:
[0155] Obtaining the network card bandwidth of each proxied cluster, and sorting the proxied clusters from large to small according to the network card bandwidth to obtain a first candidate cluster queue;
[0156] Obtaining the target network card bandwidth corresponding to the proxied cluster ranked first in the first candidate cluster queue, and determining at least one first candidate cluster from the first candidate cluster queue according to the target network card bandwidth and a preset bandwidth difference range;
[0157] Obtaining the CPU load of each of the first candidate clusters, and sorting the first candidate clusters from small to large according to the CPU load to obtain a second candidate cluster queue;
[0158] The first candidate cluster arranged at the first position in the second candidate cluster queue is used as the second standby cluster.
[0159] Each module in the active / standby switching device of the domain name server can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0160] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a master-slave switching method of a domain name server is implemented.
[0161] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0162] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0163] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0164] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0165] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0166] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0167] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0168] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for switching between a primary and a backup domain name server, characterized in that: The domain name server system includes a main cluster and a proxy cluster where at least one proxy network is located, the proxy cluster includes a first backup cluster, and the method is applied to the first backup cluster, including: When the primary cluster is in a fault state, based on the primary IP address of the primary domain name server in the primary cluster and the proxy information of the primary domain name server, a backup proxy network is established in the first backup cluster; A second standby cluster is determined from each of the proxied clusters, the proxy information and the primary IP address are synchronized to the second standby cluster, and a master-slave connection is established with the second standby cluster.
2. The method according to claim 1, characterized in that The step of establishing a backup proxy network in the first backup cluster based on the primary IP address of the primary domain name server in the primary cluster and the proxy information of the primary domain name server includes: Based on the primary IP address, sending a response request to the primary domain name server; If the first response information sent by the primary domain name server in response to the response request is not received within the second preset time period, a backup proxy network is established in the first backup cluster based on the primary IP address of the primary domain name server in the primary cluster and the proxy information of the primary domain name server.
3. The method according to claim 1, characterized in that The method further comprises: When receiving the master-slave switching request sent by the master cluster, sending a stop connection request to the second standby cluster; Upon receiving a second response message sent by the second standby cluster in response to the stop connection request, disconnect the active-standby connection, delete the standby proxy network and the proxy information, and send the IP address of the second standby cluster to the active cluster, so that the active cluster can establish an active-standby connection with the second standby cluster according to the IP address of the second standby cluster.
4. The method according to claim 3, characterized in that Before deleting the backup proxy network, the method further includes: The current proxy information of the standby proxy network is acquired, and the current proxy information is synchronized to the main cluster, so that the main cluster can update the proxy information of the main cluster according to the current proxy information.
5. The method according to claim 1, characterized in that The determining the second standby cluster includes: Obtaining the network card bandwidth of each proxied cluster, and sorting the proxied clusters from large to small according to the network card bandwidth to obtain a first candidate cluster queue; Obtaining the target network card bandwidth corresponding to the proxied cluster ranked first in the first candidate cluster queue, and determining at least one first candidate cluster from the first candidate cluster queue according to the target network card bandwidth and a preset bandwidth difference range; Obtaining the CPU load of each of the first candidate clusters, and sorting the first candidate clusters from small to large according to the CPU load to obtain a second candidate cluster queue; The first candidate cluster arranged at the first position in the second candidate cluster queue is used as the second standby cluster.
6. A domain name server system, characterized in that: The system includes a main cluster and a proxy cluster where at least one proxy network is located, the proxy cluster includes a first standby cluster, and the main cluster includes a primary domain name server, wherein: The primary domain name server is used to forward the domain name resolution request sent by the computing node to the target domain name server based on the proxy information, and forward the target IP address fed back by the target domain name server to the computing node; The first standby cluster is used to establish a standby proxy network in the first standby cluster based on the primary IP address of the primary domain name server and the proxy information of the primary domain name server when the primary cluster is in a faulty state; The first standby cluster is further configured to determine a second standby cluster from the proxy clusters, synchronize the proxy information and the primary IP address to the second standby cluster, and establish a master-standby connection with the second standby cluster.
7. The system according to claim 6, characterized in that The main cluster is further configured to periodically perform system fault detection to obtain a fault detection result, and send a master-slave switching request to the first standby cluster based on the main IP address when the fault detection result indicates that the system state of the main cluster is normal; The first standby cluster is further configured to, upon receiving the active-standby switching request, send a stop connection request to the second standby cluster, and upon receiving a response message sent by the second standby cluster in response to the stop connection request, disconnect the active-standby connection, delete the standby proxy network and the proxy information, and send the IP address of the second standby cluster to the active cluster; The active cluster is further configured to establish an active-standby connection with the second standby cluster according to the IP address of the second standby cluster.
8. A master-slave switching device for a domain name server, characterized in that: The device comprises: A first establishing module, configured to establish a backup proxy network in the first backup cluster based on a primary IP address of a primary domain name server in the primary cluster and proxy information of the primary domain name server when the primary cluster is in a fault state; The first determination module is used to determine a second standby cluster from each of the proxied clusters, synchronize the proxy information and the primary IP address to the second standby cluster, and establish a master-slave connection with the second standby cluster.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Cited By
Domain name resolution method and device based on container orchestration engine, equipment and medium
CN120825388A
Domain name resolution methods, devices, equipment, and media based on container orchestration engines
CN120825388B
Validation of connection requests for a firewall
US20240340265A1
