Domain name resolution method and device, computer equipment and storage medium
By configuring outbound terminal nodes for user VPCs in hybrid cloud environments, the intranet DNS forwards the domain name to be resolved to the outbound terminal node, and it requests resolution from the user DNS, solving the problem of poor domain name resolution in hybrid cloud, realizing the Efficient and stable domain name resolution and system scalability.
Patent Information
- Application Number
- CN202411375785.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-27
AI Technical Summary
In hybrid cloud scenarios, the domain name resolution of intranet DNS is poor, with slow effect, poor privacy, large resolution delays, and unsubscribed domain names that have not been published to the Internet, resulting in many challenges in domain name resolution of hybrid cloud architectures.
By configuring outbound terminal nodes for user VPCs, the intranet DNS forwards the domain name to be resolved to the outbound terminal node, and the outbound terminal node initiates request packets to the corresponding user DNS to realize domain name resolution, avoiding intranet DNS and The synchronization requirements between users' DNS simplify the resolution process and improve the stability and scalability of the system.
It realizes efficient parsing of user VPC domain names, avoids routing conflicts and other problems, simplifies downtime recovery and horizontal expansion operations of outbound terminal nodes, and improves overall stability and scalability.
Smart Images

Figure CN119211191A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of cloud service technology, and in particular to a domain name resolution method, apparatus, computer equipment and storage medium. Background Art
[0002] In the public cloud, the intranet DNS (Domain Name System) is a very important infrastructure that provides domain name access capabilities for other cloud products. Based on virtualization, each VPC (Virtual Private Cloud) seems to have an exclusive intranet DNS, and users can customize domain name resolution without conflicting with other users.
[0003] Modern enterprises usually combine the flexibility, scalability, and low cost of public clouds with the security and controllability of private clouds to build a set of integrated infrastructure architectures, also known as hybrid clouds. In a hybrid cloud scenario, as the unified entrance to DNS services, the intranet DNS needs to provide the ability to resolve both intranet authoritative domain names and external domain names.
[0004] In a hybrid cloud scenario, if a public cloud server (Elastic Compute Service, ECS) accesses a self-built IDC (Internet Data Center) or a service of a third-party cloud through a domain name, the intranet DNS needs to try to recursively query the Internet. However, Internet resolution has the disadvantages of slow effectiveness, poor privacy, and long resolution delay. If the domain name is not published to the Internet, it cannot be resolved. Summary of the invention
[0005] In view of this, the present disclosure provides a domain name resolution method, apparatus, computer equipment and storage medium to solve the problem of poor hybrid cloud domain name resolution effect.
[0006] In a first aspect, the present disclosure provides a domain name resolution method, which is applied to an outbound terminal node, comprising:
[0007] Obtain a forwarding message sent by the intranet domain name system; the forwarding message includes a domain name to be resolved and a user domain name system address; the domain name to be resolved is a domain name that needs to be resolved by a cloud server in a user virtual private cloud, and the user domain name system address is an address of a user domain name system corresponding to the user virtual private cloud;
[0008] Generate a request message for resolving the domain name to be resolved;
[0009] The request message is sent to the user domain name system corresponding to the user domain name system address, instructing the user domain name system to resolve the domain name to be resolved.
[0010] In a second aspect, the present disclosure provides a domain name resolution method, which is applied to an intranet domain name system, comprising:
[0011] Obtaining a domain name resolution request sent by a cloud server in a user's virtual private cloud; the domain name resolution request includes a domain name to be resolved;
[0012] Obtaining a forwarding rule pre-configured by a cloud server in the user's virtual private cloud; the forwarding rule includes a correspondence between a domain name, an outbound terminal node, and a user domain name system address;
[0013] Determine the target outbound terminal node and the target user domain name system address corresponding to the domain name to be resolved according to the forwarding rule;
[0014] A forwarding message is sent to the target outbound terminal node; the forwarding message includes the domain name to be resolved and the target user domain name system address; the forwarding message is used to instruct the target outbound terminal node to send a request message for resolving the domain name to be resolved to the target user domain name system address.
[0015] In a third aspect, the present disclosure provides a domain name resolution device, which is applied to an outbound terminal node, and the device includes:
[0016] A forwarding message acquisition module is used to acquire a forwarding message sent by an intranet domain name system; the forwarding message includes a domain name to be resolved and a user domain name system address; the domain name to be resolved is a domain name that needs to be resolved by a cloud server in a user virtual private cloud, and the user domain name system address is an address of a user domain name system corresponding to the user virtual private cloud;
[0017] A request message generation module, used to generate a request message for resolving the domain name to be resolved;
[0018] The sending module is used to send the request message to the user domain name system corresponding to the user domain name system address, and instruct the user domain name system to resolve the domain name to be resolved.
[0019] In a fourth aspect, the present disclosure provides a domain name resolution device, which is applied to an intranet domain name system, and the device includes:
[0020] A resolution request acquisition module, used to acquire a domain name resolution request sent by a cloud server in a user's virtual private cloud; the domain name resolution request includes a domain name to be resolved;
[0021] A rule acquisition module, used to acquire a forwarding rule pre-configured by a cloud server in the user's virtual private cloud; the forwarding rule includes a correspondence between a domain name, an outbound terminal node, and a user domain name system address;
[0022] A processing module, configured to determine a target outbound terminal node and a target user domain name system address corresponding to the domain name to be resolved according to the forwarding rule;
[0023] A message sending module is used to send a forwarding message to the target outbound terminal node; the forwarding message includes the domain name to be resolved and the target user domain name system address; the forwarding message is used to instruct the target outbound terminal node to send a request message for resolving the domain name to be resolved to the target user domain name system address.
[0024] In a fifth aspect, the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the domain name resolution method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0025] In a sixth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the domain name resolution method of the first aspect or any corresponding embodiment thereof.
[0026] The present disclosure configures the corresponding outbound terminal node for the user VPC. For the domain name to be forwarded, the intranet DNS determines the corresponding outbound terminal node and the user DNS address according to the forwarding rule, forwards the domain name to be resolved to the outbound terminal node, and the outbound terminal node requests the user DNS for domain name resolution. While implementing the domain name resolution of the user VPC, it can also avoid routing conflicts and other problems. In addition, when the intranet DNS sends a message to the outbound terminal node, it uses the user DNS address as the extended data in the message, so that the forwarding address can be directly notified to the outbound terminal node. The outbound terminal node does not need to save the configuration related to the domain name, which is conducive to the downtime recovery, horizontal expansion and other operations of the public cloud outbound terminal node, and the overall stability and scalability are high. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0028] Figure 1 is a schematic diagram of an architecture of hybrid cloud domain name resolution according to an embodiment of the present disclosure;
[0029] Figure 2 is a flowchart of a domain name resolution method according to an embodiment of the present disclosure;
[0030] Figure 3 is a flowchart of another domain name resolution method according to an embodiment of the present disclosure;
[0031] Figure 4 is another schematic diagram of the architecture of hybrid cloud domain name resolution according to an embodiment of the present disclosure;
[0032] Figure 5 is a detailed schematic diagram of an outbound terminal node implementing domain name resolution according to an embodiment of the present disclosure;
[0033] Figure 6 is a structural block diagram of a domain name resolution device according to an embodiment of the present disclosure;
[0034] Figure 7 is a structural block diagram of another domain name resolution device according to an embodiment of the present disclosure;
[0035] Figure 8 It is a schematic diagram of the hardware structure of the computer device of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0037] In a hybrid cloud scenario, customers' resources on the public cloud usually use VPN (Virtual Private Network) or dedicated lines to connect to other third-party clouds or self-built IDCs. However, the intranet DNS is independent of the user's VPC network, so additional methods are needed to achieve resolution and interoperability.
[0038] To achieve intranet resolution, you can synchronize the domain name of your own IDC or other third-party cloud to the intranet DNS. However, this solution requires consistency between the two sides, which results in high operation and maintenance costs.
[0039] The domain name resolution method provided by the present disclosure is configured with an outbound terminal node for the user VPC, and the intranet DNS forwards the domain name resolution request initiated by the user VPC to the outbound terminal node, and the outbound terminal node initiates a request message to the corresponding user DNS to implement domain name resolution. This method does not require synchronization of the intranet DNS and user DNS domain names, and the implementation method is simple.
[0040] Figure 1A schematic diagram of the architecture of hybrid cloud domain name resolution is shown. Figure 1 As shown, an ECS (cloud server) in the public cloud is used as an outbound ECS, and an outbound terminal node is configured based on the outbound ECS. Based on the public cloud, the user has a VPC (virtual private cloud) required by itself, that is, the user VPC, and the user VPC is configured with at least one ECS. When the ECS of the user VPC initiates a domain name resolution request to the intranet DNS, the intranet DNS sends the domain name to be resolved to the outbound terminal node, and uses the outbound terminal node to forward the domain name to be resolved to the user's self-built DNS, that is, the user DNS. The user DNS can specifically be the domain name system of a third-party cloud used by the user or the user's self-built IDC, so that the user DNS can resolve the domain name of the user VPC.
[0041] According to an embodiment of the present disclosure, a domain name resolution method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0042] In this embodiment, a domain name resolution method is provided, which can be used for the above-mentioned intranet domain name system, that is, the intranet DNS. Figure 2 is a flowchart of a domain name resolution method according to an embodiment of the present disclosure. Figure 2 As shown, the process includes the following steps S201 to S204.
[0043] Step S201, obtaining a domain name resolution request sent by a cloud server in a user's virtual private cloud; the domain name resolution request includes a domain name to be resolved.
[0044] In this embodiment, when the ECS in the user's VPC needs to access a domain name, the domain name is used as a domain name to be resolved, and a domain name resolution request for resolving the domain name to be resolved is initiated to the intranet DNS of the public cloud.
[0045] Step S202, obtaining a forwarding rule pre-configured by a cloud server in the user's virtual private cloud; the forwarding rule includes a correspondence between a domain name, an outbound terminal node, and a user domain name system address.
[0046] The intranet DNS architecture can be divided into two levels. The first level is the resolver, which is responsible for forwarding DNS requests to the designated upstream server for resolution. The second level is the authoritative DNS, which hosts the intranet domain names configured by users or cloud services. When the domain name to be resolved in the domain name resolution request is an intranet domain name, the intranet DNS can directly resolve it. If the domain name to be resolved is the domain name of the user's third-party cloud or self-built IDC, the intranet DNS forwards the domain name to be resolved based on the first-level resolver.
[0047] Specifically, the ECS of the user VPC can pre-configure the corresponding forwarding rules, which include the correspondence between the domain name, the outbound terminal node, and the user DNS address, which can specifically indicate which domain names need to be forwarded to the user DNS through the corresponding outbound terminal node. Among them, the user DNS address is the address of the user DNS corresponding to the user VPC; the outbound terminal node in the forwarding rule can be specifically represented by the identifier (for example, ID) of the corresponding outbound terminal node.
[0048] For example, for a user VPC, if its domain name example.com needs to be forwarded to the self-built user DNS for resolution, the address (that is, IP address) of the user DNS is 10.0.0.1; and the outbound endpoint corresponding to the user VPC is outbound endpoint A, then the ECS can be configured with the corresponding forwarding rule: example.com|outbound endpoint A|10.0.0.1.
[0049] Among them, the configured forwarding rules can be maintained on the control plane. When the intranet DNS needs to forward requests, the corresponding forwarding rules can be obtained through the control plane.
[0050] Step S203: determining the target outbound terminal node and the target user domain name system address corresponding to the domain name to be resolved according to the forwarding rule.
[0051] In this embodiment, after the intranet DNS obtains the forwarding rule corresponding to the domain name to be resolved, the outbound terminal node and user DNS address corresponding to the domain name to be resolved can be determined based on the forwarding rule. For the convenience of subsequent description, the outbound terminal node corresponding to the domain name to be resolved is called the target outbound terminal node, and the user DNS address corresponding to the domain name to be resolved is called the target user DNS address.
[0052] For example, if the domain name to be resolved is example.com, based on the forwarding rules illustrated in the above example, it can be determined that the target outbound terminal node is outbound terminal node A, and the target user DNS address is 10.0.0.1.
[0053] Step S204, sending a forwarding message to the target outbound terminal node; the forwarding message includes the domain name to be resolved and the target user domain name system address; the forwarding message is used to instruct the target outbound terminal node to send a request message for resolving the domain name to be resolved to the target user domain name system address.
[0054] In this embodiment, the intranet DNS generates a forwarding message including the domain name to be resolved and the target user DNS address, and sends the forwarding message to the target outbound terminal node, so that the target outbound terminal node can directly extract the target user DNS address from the forwarding message, and then send the request message for resolving the domain name to be resolved to the target user DNS corresponding to the target user DNS address, thereby realizing the resolution of the domain name to be resolved.
[0055] Since the intranet DNS is the default domain name resolution server for all ECSs in the public cloud, it provides resolution services for all tenants and achieves exclusive effects through virtualization. Therefore, if the route of the user's DNS address is directly configured on the intranet DNS, it is easy to cause conflicts and unexpected behaviors. In this embodiment, by configuring an outbound terminal node for the user's VPC, the outbound terminal node performs domain name resolution forwarding, which can effectively avoid routing conflicts and other problems.
[0056] Among them, after the intranet DNS obtains the request to be resolved, it can attach the target user DNS address to the request to be resolved based on the DNS extension protocol (Extension Mechanisms for DNS, EDNS), thereby generating a forwarding message, and then forwarding the domain name to be resolved and the target user DNS address to the target outbound terminal node. The target outbound terminal node does not need to save the configuration related to the domain name, that is, the target outbound terminal node is stateless, which simplifies the operations of outbound terminal node downtime recovery, horizontal expansion, etc., and improves the overall stability and scalability.
[0057] The domain name resolution method provided in this embodiment configures the corresponding outbound terminal node for the user VPC. For the domain name to be forwarded, the intranet DNS determines the corresponding target outbound terminal node and the target user DNS address according to the forwarding rule, and forwards the domain name to be resolved to the target outbound terminal node. The target outbound terminal node requests the target user DNS for domain name resolution, which can avoid routing conflicts and other problems while implementing the domain name resolution of the user VPC. In addition, when the intranet DNS sends a message to the target outbound terminal node, the target user DNS address is used as the extended data in the message, so that the forwarding address can be directly notified to the target outbound terminal node. The target outbound terminal node does not need to save the configuration related to the domain name, which is conducive to the downtime recovery, horizontal expansion and other operations of the public cloud outbound terminal node, and the overall stability and scalability are high.
[0058] In some optional implementations, the outbound terminal node sends the request message through an auxiliary network card; wherein the auxiliary network card is a network card allocated from the user VPC and attached to the corresponding outbound terminal node; different user VPCs correspond to different auxiliary network cards.
[0059] In addition, the outbound terminal node can be set with multiple auxiliary network cards. Different auxiliary network cards correspond to different user VPCs, so that multiple user VPCs can share the same outbound terminal node. Using one outbound ECS can achieve outbound access for multiple user VPCs.
[0060] Specifically, when configuring forwarding rules for a user VPC, it is also necessary to configure the physical address of the corresponding auxiliary network card, which may be a MAC address. That is, the forwarding rule specifically includes the corresponding relationship between the domain name, the outbound terminal node, the physical address of the auxiliary network card, and the user domain name system address.
[0061] For example, for a user VPC, if its domain name example.com needs to be forwarded to the self-built user DNS for resolution, the address (i.e. IP address) of the user DNS is 10.0.0.1. The outbound endpoint corresponding to the user VPC is outbound endpoint A, and the MAC address of the auxiliary network card attached to the outbound endpoint A is 11:11:11:11:11:11, then the ECS of the user VPC can be configured with the corresponding forwarding rule: example.com|outbound endpoint A|11:11:11:11:11:11|10.0.0.1.
[0062] Correspondingly, the method executed by the intranet DNS also includes: determining the physical address of the target auxiliary network card corresponding to the domain name to be resolved according to the forwarding rule; and the forwarding message also includes the physical address of the target auxiliary network card.
[0063] In this embodiment, after the intranet DNS obtains the domain name resolution request, based on the corresponding forwarding rules, in addition to determining the target outbound terminal node and target user domain name system address corresponding to the domain name to be resolved, it can also determine the physical address of the auxiliary network card corresponding to the domain name to be resolved, that is, the physical address of the target auxiliary network card.
[0064] When the intranet DNS generates a forwarding message, it also uses the physical address of the target auxiliary network card as extended data, that is, the extended data in the forwarding message includes the target user DNS address and the physical address of the target auxiliary network card. When the target outbound terminal node obtains the forwarding message, it can extract the target user DNS address and the physical address of the target auxiliary network card, locate the corresponding target auxiliary network card based on the physical address of the target auxiliary network card, and then forward it to the target user DNS through the user VPC network based on the target auxiliary network card, so that the target user DNS can resolve the domain name to be resolved.
[0065] The domain name resolution method provided in this embodiment attaches auxiliary network cards of multiple user VPCs to the outbound terminal node, so that multiple user VPCs can share the same outbound terminal node, which can realize the reuse of the outbound terminal node and improve resource utilization. In addition, the forwarding message sent by the intranet DNS also includes the physical address of the auxiliary network card, so that the outbound terminal node can realize accurate forwarding based on the MAC address of the auxiliary network card, ensuring the accuracy of domain name resolution.
[0066] In this embodiment, a domain name resolution method is provided, which can be used for the above-mentioned intranet domain name system, that is, the intranet DNS. Figure 3 is a flowchart of a domain name resolution method according to an embodiment of the present disclosure. Figure 3 As shown, the process includes the following steps S301 to S303.
[0067] Step S301, obtain the forwarding message sent by the intranet domain name system; the forwarding message includes the domain name to be resolved and the user domain name system address; the domain name to be resolved is the domain name that needs to be resolved by the cloud server in the user's virtual private cloud, and the user domain name system address is the address of the user domain name system corresponding to the user's virtual private cloud.
[0068] In this embodiment, after the intranet DNS (intranet domain name system) receives the domain name resolution request sent by the ECS (cloud server) of the user VPC (user private cloud), it can generate a corresponding forwarding message through the forwarding rule and send it to the corresponding outbound terminal node, such as Figure 2 The target outbound terminal node in the embodiment shown. The process of the intranet DNS generating and sending the forwarding message can be found in detail. Figure 2 The relevant contents of the illustrated embodiment will not be repeated here.
[0069] As described above, the forwarding message sent by the intranet DNS includes the domain name to be resolved and the user DNS address (user domain name system address). After receiving the forwarding message, the outbound terminal node can extract the domain name to be resolved and the user DNS address.
[0070] Step S302: Generate a request message for resolving the domain name to be resolved.
[0071] In this embodiment, the outbound terminal node generates a corresponding request message based on the forwarding message, and the request message includes the domain name to be resolved.
[0072] For example, the domain name resolution request initiated by the ECS in the user's VPC can be a DNS message. After the intranet DNS receives the DNS message, it adds an extension part to the DNS message based on the EDNS protocol, and adds the user's DNS address as extended data to the DNS message, thereby generating a forwarding message. After receiving the forwarding message, the outbound terminal node can delete the extension part and generate a request message to be sent to the user's DNS based on the DNS message.
[0073] Step S303: Send the request message to the user domain name system corresponding to the user domain name system address, and instruct the user domain name system to resolve the domain name to be resolved.
[0074] In this embodiment, the outbound terminal node sends a request message to the user DNS, and the user DNS can respond to the request message, resolve the domain name to be resolved, and generate a corresponding resolution result, that is, the IP address corresponding to the domain name to be resolved, and then generate a response message including the resolution result, and return it to the outbound terminal node. The outbound terminal node then sends the resolution result to the ECS of the user's VPC through the intranet DNS to implement domain name resolution.
[0075] In this embodiment, the outbound terminal node mainly performs forwarding work, and the destination address (i.e., the user DNS address) is provided by the intranet DNS, that is, the forwarding message sent by the intranet DNS includes the destination address, and the outbound terminal node is stateless. Specifically, the initialization process of the outbound terminal node includes: performing initialization operations according to the configured meta-information, and reporting its own status information; the meta-information includes the identifier of the outbound terminal node.
[0076] When the outbound terminal node is initialized, it mainly configures its own identification (such as ID), and does not need other configurations related to the domain name; and it maintains the reporting function, that is, reporting its own status information, such as its own capacity, load, etc., to facilitate the monitoring of the outbound terminal node. Therefore, as long as the forwarding agent of the outbound terminal node can be started, it can provide forwarding services normally without interacting with the control plane, making downtime recovery, horizontal expansion and other operations much simpler.
[0077] The domain name resolution method provided in this embodiment configures the corresponding outbound terminal node for the user VPC, and the outbound terminal node sends the message of the intranet DNS to the corresponding user DNS, which can achieve the resolution of the user VPC domain name while avoiding routing conflicts and other problems. In addition, the forwarding message sent by the intranet DNS contains the user DNS address, and the outbound terminal node does not need to save the configuration related to the domain name, and can directly extract the destination address from the forwarding message, which is conducive to the downtime recovery and horizontal expansion of the public cloud outbound terminal node, and the overall stability and scalability are high.
[0078] In some optional implementations, the outbound terminal node implements message forwarding through a corresponding auxiliary network card. Specifically, the method further includes the following steps A1.
[0079] Step A1, obtain a creation request initiated by a cloud server in the user's virtual private cloud for creating an outbound terminal node, and configure an auxiliary network card of the outbound terminal node for the cloud server in the user's virtual private cloud; the auxiliary network card is allocated from the user's virtual private cloud and attached to the network card of the outbound terminal node.
[0080] In this embodiment, if the ECS in the user's VPC needs to access a third-party cloud or self-built IDC service, a creation request can be initiated to create the outbound terminal node required by the user's VPC. Among them, a network card needs to be allocated from the user's VPC as an auxiliary network card, and the auxiliary network card needs to be attached to the outbound terminal node.
[0081] For example, the control plane maintains a scalable ECS resource pool in each AZ (Availability Zone). After receiving the user's request to create an outbound terminal node, an ECS is scheduled from the AZ to which the user-specified network card belongs, and the ECS is used as the outbound ECS; scheduling can be performed according to the capacity priority principle, for example, the ECS with the lowest load is selected as the outbound ECS. In addition, the network card specified by the user is used as the auxiliary network card and attached to the outbound ECS to form the corresponding outbound terminal node.
[0082] In addition, the above step S303 "sending the request message to the user domain name system corresponding to the user domain name system address" includes step B1.
[0083] Step B1, sending the request message to the user domain name system corresponding to the user domain name system address through the auxiliary network card.
[0084] In this embodiment, the auxiliary network card can be used to connect to the user VPC network. When the outbound terminal node sends a request message to the user DNS, it can pass through the auxiliary network card and the user VPC in sequence, and then send the request message to the user DNS. For example, the request message can be forwarded based on the gateway in the user VPC.
[0085] Optionally, the outbound terminal node can be set with multiple auxiliary network cards. Different auxiliary network cards correspond to different user VPCs, so that multiple user VPCs can share the same outbound terminal node. One outbound ECS can be used to achieve outbound access for multiple user VPCs.
[0086] Figure 4 Another architecture diagram of hybrid cloud domain name resolution is shown. Figure 4 As shown, there are multiple users' VPCs in the public cloud. Figure 4 Take the first user VPC and the second user VPC as an example. The first user VPC and the second user VPC are both equipped with their own data systems (third-party cloud / user IDC); among them, some domain names of the first ECS in the first user VPC need to be resolved by the self-built first user DNS, and some domain names of the second ECS in the second user VPC need to be resolved by the self-built second user DNS. At this time, corresponding auxiliary network cards can be configured for the first user VPC and the second user VPC respectively.
[0087] Specifically, the above step A1 "obtaining a creation request initiated by a cloud server in the user's virtual private cloud for creating an outbound terminal node, and configuring an auxiliary network card of the outbound terminal node for the cloud server in the user's virtual private cloud" may include the following steps A11 to A12.
[0088] Step A11, obtain a first creation request for creating an outbound terminal node initiated by the first cloud server in the first user's virtual private cloud, configure a first auxiliary network card of the outbound terminal node for the first cloud server, and return the first physical address of the first auxiliary network card to the first cloud server; the first auxiliary network card is allocated from the first user's virtual private cloud and attached to the network card of the outbound terminal node.
[0089] Step A12, obtain a second creation request for creating an outbound terminal node initiated by the second cloud server in the second user's virtual private cloud, configure a second auxiliary network card of the outbound terminal node for the second cloud server, and return the second physical address of the second auxiliary network card to the second cloud server; the second auxiliary network card is allocated from the second user's virtual private cloud and attached to the network card of the outbound terminal node.
[0090] In this embodiment, the first ECS in the first user VPC can initiate a creation request for creating an outbound terminal node, that is, a first creation request. Based on the first creation request, the first auxiliary network card in the first user VPC is attached to the outbound ECS to generate an outbound terminal node.
[0091] In addition, the outbound terminal node can also determine the physical address of the first auxiliary network card, that is, the first physical address, and return the first physical address to the first ECS, so that the first ECS can subsequently construct a corresponding forwarding rule based on the first physical address. For example, if the first physical address is 11:11:11:11:11:11, the first ECS can set a forwarding rule of the form example.com|outbound terminal node A|11:11:11:11:11:11|10.0.0.1.
[0092] Similarly, when the second ECS in the second user VPC initiates a second creation request, if the second creation request is used to create an outbound endpoint based on the same outbound ECS, the second auxiliary network card in the second VPC can be attached to the outbound ECS, thereby generating an outbound endpoint including the first auxiliary network card and the second auxiliary network card. Figure 4 As shown in the figure, the auxiliary network card attached to the left side of the outbound ECS is the first auxiliary network card, and the auxiliary network card attached to the right side of the outbound ECS is the second auxiliary network card. Each user VPC no longer has a monopoly on an outbound endpoint. The outbound endpoint obtains the ability to access different user VPC networks through different auxiliary network cards.
[0093] Optionally, if different auxiliary network cards are configured for different user VPCs, the forwarding message generated by the intranet DNS also includes the physical address of the auxiliary network card. In addition, the above step B1 "sends the request message to the user domain name system corresponding to the user domain name system address through the auxiliary network card" includes the following steps B11 and B12.
[0094] Step B11: When the physical address of the auxiliary network card in the forwarded message is the first physical address, the request message is sent to the user domain name system corresponding to the user domain name system address through the first auxiliary network card.
[0095] Step B12: When the physical address of the auxiliary network card in the forwarded message is the second physical address, the request message is sent to the user domain name system corresponding to the user domain name system address through the second auxiliary network card.
[0096] like Figure 4As shown, if the physical address of the auxiliary network card in the forwarding message is the first physical address, it means that the domain name to be resolved in the forwarding message is provided by the first user VPC. Accordingly, the user DNS address in the forwarding message is the address of the DNS in the third-party cloud or user IDC corresponding to the first user VPC, that is, the address of the first user DNS. Therefore, the outbound terminal node can send the corresponding request message to the first user DNS through the first auxiliary network card.
[0097] Similarly, if the physical address of the auxiliary network card in the forwarded message is the second physical address, the outbound terminal node sends the generated request message to the user DNS corresponding to the user DNS address in the forwarded message, that is, the second user DNS, through the second auxiliary network card. And the outbound terminal node returns the second physical address to the second ECS; for example, the second physical address is 22:22:22:22:22:22.
[0098] Figure 5 A detailed schematic diagram of implementing domain name resolution using an outbound terminal node is shown. Figure 5 In the example, the domain name resolution function provided to the first ECS is used. Figure 5 As shown, the route resolution process specifically includes the following steps S501 to S508.
[0099] Step S501: A first ECS initiates a first creation request to an outbound terminal node.
[0100] Step S502: The outbound terminal node configures a first auxiliary network card for the first ECS, and returns a first MAC address of the first auxiliary network card.
[0101] For example, the first MAC address is 11:11:11:11:11:11.
[0102] Step S503: The first ECS configures a forwarding rule.
[0103] For example, the address of the self-built DNS (i.e., the first user DNS) corresponding to the first ECS is 10.0.0.1. If the outbound terminal node in this embodiment is outbound terminal node A, one of the forwarding rules may be: example.com|outbound terminal node A|11:11:11:11:11:11|10.0.0.1. The forwarding rule may be stored in the control plane.
[0104] Step S504: The first ECS sends a domain name resolution request to the intranet DNS.
[0105] For example, the domain name to be resolved in the domain name resolution request is example.com.
[0106] Step S505, the intranet DNS obtains a forwarding rule, determines the corresponding outbound terminal node, the MAC address of the auxiliary network card, and the user DNS address, and then generates a forwarding message.
[0107] For example, the intranet DNS obtains the forwarding rule from the control plane, and determines the outbound terminal node, the MAC address of the auxiliary network card, and the user DNS address corresponding to the domain name example.com to be resolved based on the forwarding rule as follows: outbound terminal node A, 11:11:11:11:11:11, and 10.0.0.1. Accordingly, in the generated forwarding message, 11:11:11:11:11:11 (MAC address of the auxiliary network card) and 10.0.0.1 (user DNS address) are extended data.
[0108] Step S506: The intranet DNS sends the forwarding message to the outbound terminal node determined based on the forwarding rule.
[0109] Step S507: the outbound terminal node reads the extended data in the forwarding message and generates a request message.
[0110] Step S508: The outbound terminal node sends the request message to the corresponding user DNS using the corresponding auxiliary network card according to the MAC address of the auxiliary network card and the user DNS address in the extended data.
[0111] For example, the MAC address of the auxiliary network card is 11:11:11:11:11:11, that is, the auxiliary network card is the first auxiliary network card, and the user DNS address is 10.0.0.1, that is, the user DNS is the first user DNS. The outbound terminal node can use 10.0.0.1 as the destination address and send the request message to the first user DNS through the first auxiliary network card.
[0112] Afterwards, after the first user DNS generates a resolution result, it returns the resolution result, which will not be described in detail here.
[0113] The domain name resolution method provided in this embodiment is that the outbound terminal node sends the message of the intranet DNS to the corresponding user DNS, which can avoid routing conflicts and other problems while realizing the domain name resolution of the user VPC. In addition, the forwarding message sent by the intranet DNS contains extended data such as the user DNS address and the physical address of the auxiliary network card. The outbound terminal node does not need to save the configuration related to the domain name, and can directly extract the extended data from the forwarding message, which is conducive to the downtime recovery and horizontal expansion of the public cloud outbound terminal node. The overall stability and scalability are relatively high. The outbound terminal node is attached with auxiliary network cards of multiple user VPCs, so that multiple user VPCs can share the same outbound terminal node, which can realize the reuse of the outbound terminal node and improve resource utilization.
[0114] In this embodiment, a domain name resolution device is also provided, which is used to implement the above embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0115] This embodiment provides a domain name resolution device, which is applied to an outbound terminal node, such as Figure 6 As shown, including:
[0116] The forwarding message acquisition module 601 is used to acquire the forwarding message sent by the intranet domain name system; the forwarding message includes the domain name to be resolved and the user domain name system address; the domain name to be resolved is the domain name that the cloud server in the user virtual private cloud needs to resolve, and the user domain name system address is the address of the user domain name system corresponding to the user virtual private cloud;
[0117] A request message generation module 602, used to generate a request message for resolving the domain name to be resolved;
[0118] The sending module 603 is used to send the request message to the user domain name system corresponding to the user domain name system address, and instruct the user domain name system to resolve the domain name to be resolved.
[0119] Optionally, the device further comprises a configuration module, configured to:
[0120] Obtaining a creation request for creating the outbound terminal node initiated by the cloud server in the user virtual private cloud, and configuring an auxiliary network card of the outbound terminal node for the cloud server in the user virtual private cloud; the auxiliary network card is allocated from the user virtual private cloud and attached to the network card of the outbound terminal node;
[0121] The sending module 603 sends the request message to the user domain name system corresponding to the user domain name system address, including:
[0122] The request message is sent to the user domain name system corresponding to the user domain name system address through the auxiliary network card.
[0123] Optionally, the configuration module obtains a creation request initiated by a cloud server in the user virtual private cloud for creating the outbound terminal node, and configures an auxiliary network card of the outbound terminal node for the cloud server in the user virtual private cloud, including:
[0124] Obtaining a first creation request for creating the outbound terminal node initiated by a first cloud server in a first user virtual private cloud, configuring a first auxiliary network card of the outbound terminal node for the first cloud server, and returning a first physical address of the first auxiliary network card to the first cloud server; the first auxiliary network card is allocated from the first user virtual private cloud and attached to the network card of the outbound terminal node;
[0125] Obtain a second creation request for creating the outbound terminal node initiated by the second cloud server in the second user's virtual private cloud, configure a second auxiliary network card of the outbound terminal node for the second cloud server, and return the second physical address of the second auxiliary network card to the second cloud server; the second auxiliary network card is allocated from the second user's virtual private cloud and attached to the network card of the outbound terminal node.
[0126] Optionally, the forwarded message also includes the physical address of the auxiliary network card;
[0127] The sending module 603 sends the request message to the user domain name system corresponding to the user domain name system address through the auxiliary network card, including:
[0128] When the physical address of the auxiliary network card in the forwarded message is the first physical address, sending the request message to the user domain name system corresponding to the user domain name system address through the first auxiliary network card;
[0129] When the physical address of the auxiliary network card in the forwarding message is the second physical address, the request message is sent to the user domain name system corresponding to the user domain name system address through the second auxiliary network card.
[0130] Optionally, the device further includes an initialization module, which is used to: perform an initialization operation according to configured meta-information and report its own status information; the meta-information includes an identifier of the outbound terminal node.
[0131] This embodiment also provides another domain name resolution device, which is applied to the intranet domain name system, such as Figure 7 As shown, including:
[0132] The resolution request acquisition module 701 is used to acquire a domain name resolution request sent by a cloud server in a user's virtual private cloud; the domain name resolution request includes a domain name to be resolved;
[0133] A rule acquisition module 702 is used to acquire a forwarding rule pre-configured by a cloud server in the user virtual private cloud; the forwarding rule includes a correspondence between a domain name, an outbound terminal node, and a user domain name system address;
[0134] The processing module 703 is used to determine the target outbound terminal node and the target user domain name system address corresponding to the domain name to be resolved according to the forwarding rule;
[0135] The message sending module 704 is used to send a forwarding message to the target outbound terminal node; the forwarding message includes the domain name to be resolved and the target user domain name system address; the forwarding message is used to instruct the target outbound terminal node to send a request message for resolving the domain name to be resolved to the target user domain name system address.
[0136] Optionally, the forwarding rule specifically includes: a correspondence between a domain name, an outbound terminal node, a physical address of an auxiliary network card, and a user domain name system address; the auxiliary network card is a network card allocated from a user virtual private cloud and attached to a corresponding outbound terminal node; different user virtual private clouds correspond to different auxiliary network cards;
[0137] The processing module 703 is further configured to determine the physical address of the target auxiliary network card corresponding to the domain name to be resolved according to the forwarding rule; the forwarding message also includes the physical address of the target auxiliary network card.
[0138] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0139] The domain name resolution device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, including a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0140] The present disclosure also provides a computer device having the above Figure 6 or Figure 7 The domain name resolution device shown.
[0141] See also Figure 8 , Figure 8 is a schematic diagram of a computer device provided by an optional embodiment of the present disclosure, such as Figure 8As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.
[0142] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0143] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0144] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0145] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0146] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0147] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0148] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0149] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A domain name resolution method, characterized in that: Applied to an outbound terminal node, the method includes: Obtain a forwarding message sent by the intranet domain name system; the forwarding message includes a domain name to be resolved and a user domain name system address; the domain name to be resolved is a domain name that needs to be resolved by a cloud server in a user virtual private cloud, and the user domain name system address is an address of a user domain name system corresponding to the user virtual private cloud; Generate a request message for resolving the domain name to be resolved; The request message is sent to the user domain name system corresponding to the user domain name system address, instructing the user domain name system to resolve the domain name to be resolved.
2. The method according to claim 1, characterized in that: Also includes: Obtaining a creation request for creating the outbound terminal node initiated by the cloud server in the user virtual private cloud, and configuring an auxiliary network card of the outbound terminal node for the cloud server in the user virtual private cloud; the auxiliary network card is allocated from the user virtual private cloud and attached to the network card of the outbound terminal node; The step of sending the request message to a user domain name system corresponding to the user domain name system address includes: The request message is sent to the user domain name system corresponding to the user domain name system address through the auxiliary network card.
3. The method according to claim 2, characterized in that The obtaining a creation request initiated by the cloud server in the user virtual private cloud for creating the outbound terminal node, and configuring an auxiliary network card of the outbound terminal node for the cloud server in the user virtual private cloud, includes: Obtaining a first creation request for creating the outbound terminal node initiated by a first cloud server in a first user virtual private cloud, configuring a first auxiliary network card of the outbound terminal node for the first cloud server, and returning a first physical address of the first auxiliary network card to the first cloud server; the first auxiliary network card is allocated from the first user virtual private cloud and attached to the network card of the outbound terminal node; Obtain a second creation request for creating the outbound terminal node initiated by the second cloud server in the second user's virtual private cloud, configure a second auxiliary network card of the outbound terminal node for the second cloud server, and return the second physical address of the second auxiliary network card to the second cloud server; the second auxiliary network card is allocated from the second user's virtual private cloud and attached to the network card of the outbound terminal node.
4. The method according to claim 3, characterized in that The forwarded message also includes the physical address of the auxiliary network card; The step of sending the request message to the user domain name system corresponding to the user domain name system address through the auxiliary network card includes: When the physical address of the auxiliary network card in the forwarded message is the first physical address, sending the request message to the user domain name system corresponding to the user domain name system address through the first auxiliary network card; When the physical address of the auxiliary network card in the forwarding message is the second physical address, the request message is sent to the user domain name system corresponding to the user domain name system address through the second auxiliary network card.
5. The method according to claim 1, characterized in that Also includes: Perform initialization operations according to the configured meta information and report its own status information; the meta information includes the identifier of the outbound terminal node.
6. A domain name resolution method, characterized in that: Applied to an intranet domain name system, the method includes: Obtaining a domain name resolution request sent by a cloud server in a user's virtual private cloud; the domain name resolution request includes a domain name to be resolved; Obtaining a forwarding rule pre-configured by a cloud server in the user's virtual private cloud; the forwarding rule includes a correspondence between a domain name, an outbound terminal node, and a user domain name system address; Determine the target outbound terminal node and the target user domain name system address corresponding to the domain name to be resolved according to the forwarding rule; A forwarding message is sent to the target outbound terminal node; the forwarding message includes the domain name to be resolved and the target user domain name system address; the forwarding message is used to instruct the target outbound terminal node to send a request message for resolving the domain name to be resolved to the target user domain name system address.
7. The method according to claim 6, characterized in that The forwarding rules specifically include: the correspondence between the domain name, the outbound terminal node, the physical address of the auxiliary network card, and the user domain name system address; the auxiliary network card is a network card allocated from the user virtual private cloud and attached to the corresponding outbound terminal node; different user virtual private clouds correspond to different auxiliary network cards; The method further comprises: The physical address of the target auxiliary network card corresponding to the domain name to be resolved is determined according to the forwarding rule; the forwarding message also includes the physical address of the target auxiliary network card.
8. A domain name resolution device, characterized in that: Applied to an outbound terminal node, the device comprises: A forwarding message acquisition module is used to acquire a forwarding message sent by an intranet domain name system; the forwarding message includes a domain name to be resolved and a user domain name system address; the domain name to be resolved is a domain name that needs to be resolved by a cloud server in a user virtual private cloud, and the user domain name system address is an address of a user domain name system corresponding to the user virtual private cloud; A request message generation module, used to generate a request message for resolving the domain name to be resolved; The sending module is used to send the request message to the user domain name system corresponding to the user domain name system address, and instruct the user domain name system to resolve the domain name to be resolved.
9. A domain name resolution device, characterized in that: Applied to an intranet domain name system, the device comprises: A resolution request acquisition module, used to acquire a domain name resolution request sent by a cloud server in a user's virtual private cloud; the domain name resolution request includes a domain name to be resolved; A rule acquisition module, used to acquire a forwarding rule pre-configured by a cloud server in the user's virtual private cloud; the forwarding rule includes a correspondence between a domain name, an outbound terminal node, and a user domain name system address; A processing module, configured to determine a target outbound terminal node and a target user domain name system address corresponding to the domain name to be resolved according to the forwarding rule; A message sending module is used to send a forwarding message to the target outbound terminal node; the forwarding message includes the domain name to be resolved and the target user domain name system address; the forwarding message is used to instruct the target outbound terminal node to send a request message for resolving the domain name to be resolved to the target user domain name system address.
10. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the domain name resolution method according to any one of claims 1 to 7 by executing the computer instructions.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the domain name resolution method according to any one of claims 1 to 7.