Domain name resolution method and device, computer equipment and storage medium
By pre-deployment of anycast routing and domain name system cache services in public clouds in hybrid cloud scenarios, the problem that different public cloud DNS services cannot resolve private cloud domain names is solved, and domain name resolution and business between private cloud and public cloud is realized Interconnection.
Patent Information
- Application Number
- CN202411540895.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-11
AI Technical Summary
In the hybrid cloud scenario, the DNS services of different public cloud manufacturers cannot resolve the domain names of private cloud services, resulting in the inability to directly connect and implement complete domain name resolution services.
By setting up an authoritative server in the private cloud, the resolution request is sent to the public cloud, and the anycast routing and domain name system cache services are pre-sinked in the public cloud to realize the resolution of different domain name resolution requests.
It realizes the analysis of private cloud domain names and different public cloud domain names in hybrid cloud scenarios, ensuring that the private cloud can resolve public cloud domain names and access related business services deployed by the public cloud. Users can flexibly choose multi-cloud services.
Smart Images

Figure CN119420730A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of domain name resolution in a hybrid cloud scenario, and in particular to a domain name resolution method, apparatus, computer equipment, and storage medium. Background Art
[0002] In order to meet the needs of business development, achieve fast, efficient and flexible deployment, and further reduce the cost of basic resource expenditure, many enterprises cooperate with many mainstream cloud vendors at home and abroad to deploy some businesses to public clouds, while retaining some core private cloud infrastructure, forming a hybrid cloud model that combines self-built private clouds and public clouds. This hybrid cloud model requires the basic platform to provide the same underlying technical support as the private cloud in the public cloud environment. The Domain Name System (DNS) is an important basic service. In the hybrid cloud scenario, different public cloud vendors have independent DNS services and can only resolve domain names related to their own clouds, but cannot resolve domain names for private cloud services. In addition, due to the limitations of network interconnection and differences in address planning, user services cannot be directly interconnected. Therefore, how to provide a complete domain name resolution service for the business in the hybrid cloud scenario has become a thorny issue. Summary of the invention
[0003] In view of this, in order to solve the above technical problems or part of the technical problems, the embodiments of the present invention provide a domain name resolution method, apparatus, computer equipment and storage medium.
[0004] In a first aspect, an embodiment of the present invention provides a domain name resolution method, including:
[0005] When the private cloud host receives the first request to resolve the public cloud domain name, the private cloud host sends the first request to the first authoritative server corresponding to the private cloud;
[0006] Controlling the first authoritative server to send the first request to the public cloud, so as to resolve the first request through a second domain name system of the public cloud, pre-deploying the anycast routing corresponding to the private cloud in the public cloud, and pre-deploying the domain name system cache service through a virtual machine and a load balancer;
[0007] When the private cloud receives the second request sent by the public cloud to resolve the private cloud domain name, the first authoritative server is controlled to resolve the second request.
[0008] In a possible implementation manner, controlling the first authoritative server corresponding to the private cloud to send the first request to the public cloud includes:
[0009] When the public cloud uses a fixed domain name system address, control the first authoritative server to send the first request to a network address translation gateway of the public cloud, so as to send the first request to a server of a second domain name system of the public cloud through the network address translation gateway;
[0010] Or, when the public cloud uses a domain name system address generated by a network segment within a virtual private cloud of the public cloud, control the first authoritative server to send the first request to a server of a second domain name system of the public cloud through the domain name system address.
[0011] In a possible implementation manner, the anycast routing is deployed in the public cloud in the following manner:
[0012] Adding the address segment and subnet corresponding to the anycast route in the virtual private cloud in the public cloud;
[0013] The domain name system cache service is deployed in the public cloud in the following manner:
[0014] Apply for a virtual machine and a corresponding load balancer in the public cloud, so as to deploy the domain name system cache service to a cache server and / or an authoritative server through the virtual machine;
[0015] Bind the load balancer to the anycast route.
[0016] In a possible implementation, the step of deploying the domain name system cache service to a cache server and / or an authoritative server through the virtual machine includes:
[0017] Obtaining a target number of virtual machines;
[0018] When the target number is greater than a first threshold, the domain name system cache service is deployed to the cache server and the authoritative server;
[0019] When the target number is less than or equal to a first threshold, the domain name system cache service is deployed downstream to an authoritative server.
[0020] In a possible implementation, when the private cloud host receives the first request for resolving the public cloud domain name, sending the first request to the first authoritative server corresponding to the private cloud includes:
[0021] When the private cloud host receives the resolution request, determining whether the resolution request is for a target domain name corresponding to the private cloud;
[0022] When the judgment result is yes, the resolution request is resolved by the first authoritative server
[0023] When the judgment result is no, determining that the resolution request is the first request;
[0024] The first request is sent to a first cache server of the private cloud, so that the first request is sent to the first authoritative server through the first cache server.
[0025] In a possible implementation, the method further includes:
[0026] Publishing anycast routes from multiple Internet data centers corresponding to the private cloud through a dynamic routing protocol;
[0027] The first domain name system of the private cloud is deployed in the Internet data center through a physical machine.
[0028] In a possible implementation, the method further includes:
[0029] When there is a public cloud with an independently planned address segment, the first request is sent to a proxy server corresponding to the public cloud with the independently planned address segment, so that the first request is parsed by the proxy server.
[0030] In a second aspect, an embodiment of the present invention provides a domain name resolution device, including:
[0031] A sending module, configured to send a first request for resolving a public cloud domain name to a first authoritative server corresponding to the private cloud when the private cloud host receives the first request;
[0032] A control module, configured to control the first authoritative server to send the first request to the public cloud, so as to resolve the first request through a second domain name system of the public cloud, and to pre-deploy the anycast routing corresponding to the private cloud in the public cloud, and to pre-deploy the domain name system cache service through a virtual machine and a load balancer;
[0033] The control module is further configured to control the first authoritative server to resolve the second request when the private cloud receives the second request sent by the public cloud to resolve the private cloud domain name.
[0034] In a third aspect, an embodiment of the present invention provides a computer device, comprising: a processor and a memory, wherein the processor is used to execute a domain name resolution program stored in the memory to implement the domain name resolution method described in any one of the first aspects above.
[0035] In a fourth aspect, an embodiment of the present invention provides a storage medium, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the domain name resolution method described in any one of the first aspects above.
[0036] The domain name resolution scheme provided by the embodiment of the present invention is as follows: when the private cloud host receives a first request for resolving a public cloud domain name, the first request is sent to the first authoritative server corresponding to the private cloud; the first authoritative server is controlled to send the first request to the public cloud so as to resolve the first request through the second domain name system of the public cloud, and the anycast routing corresponding to the private cloud is pre-deployed in the public cloud, and the domain name system cache service is pre-deployed through a virtual machine and a load balancer; when the private cloud receives a second request for resolving the private cloud domain name sent by the public cloud, the first authoritative server is controlled to resolve the second request. Therefore, in a hybrid cloud scenario, anycast routing and domain name system cache services can be pre-deployed in the public cloud to provide domain name resolution services for different domain name resolution requests, so as to achieve resolution of the domain name of the public cloud in the private cloud, and access of the private cloud to related business services deployed in the public cloud, and users can flexibly choose multi-cloud services to meet their business needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A flowchart of a domain name resolution method provided by an embodiment of the present invention;
[0038] Figure 2 A flowchart of another domain name resolution method provided by an embodiment of the present invention;
[0039] Figure 3 A schematic diagram of the structure of a domain name resolution device provided by an embodiment of the present invention;
[0040] Figure 4 A schematic diagram of the structure of a computer device provided by an embodiment of the present invention;
[0041] Figure 5 A schematic diagram of anycast routing for public cloud deployment provided by an embodiment of the present invention;
[0042] Figure 6 A schematic diagram of a public cloud resolving a private cloud domain name provided by an embodiment of the present invention;
[0043] Figure 7 A schematic diagram of a domain name system cache service provided by an embodiment of the present invention being deployed down to a cache server and an authoritative server;
[0044] Figure 8 A schematic diagram of a private cloud resolving a public cloud domain name provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] To facilitate understanding of the embodiments of the present invention, specific embodiments will be further explained below in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.
[0047] Figure 1 A flowchart of a domain name resolution method provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method specifically includes:
[0048] S11. When the private cloud host receives a first request to resolve a public cloud domain name, the private cloud host sends the first request to a first authoritative server corresponding to the private cloud.
[0049] The domain name resolution method provided in the embodiment of the present invention is applied to computer devices, which may include but are not limited to servers, desktop computers, etc. Specifically, by pre-sinking and deploying anycast routing and domain name system cache services in the public cloud, it is possible to resolve private cloud domain names and domain names of different public clouds in a hybrid cloud scenario.
[0050] In this embodiment, Domain Name System Anycast (DNS Anycast) is selected as the technical foundation, and the DNS address unification problem is solved by DNS Anycast. After the address is unified, all requests are uniformly resolved by the private cloud DNS, and the resolution result is directly given for the domain name corresponding to the private cloud. For each public cloud domain name, it is forwarded to the corresponding public cloud DNS for resolution, so as to achieve standardized configuration and global service. At the same time, the public cloud DNS is incorporated into the original DNS management platform to achieve unified management. Specifically, the public cloud and private cloud DNS are standardized. The original private cloud is connected to multiple Internet Data Centers (IDC) through dedicated lines. After the public cloud joins, it is also connected to the core point of presence (pop) corresponding to the private cloud through dedicated lines. The public cloud node is similar to the business's own IDC, and multiple public cloud nodes can be expanded horizontally. The IDC under the cloud still uses physical machines and network equipment to implement DNS Anycast, and the cloud adopts the deployment method of virtual machines + LB.
[0051] Specifically, the private cloud is provided with a corresponding first authoritative server. When the private cloud host receives a first request for resolving a public cloud domain name, the first request is sent to the first authoritative server corresponding to the private cloud. When the private cloud receives a domain name resolution request, it first resolves and identifies whether the request is due to a resolvable domain name. If so, it is resolved locally in the private cloud. If not, it is sent to the first authoritative server of the private cloud. The first authoritative server is used to communicate with the public cloud server to forward the first request to the public cloud.
[0052] S12: Control the first authoritative server to send the first request to the public cloud, so as to resolve the first request through the second domain name system of the public cloud.
[0053] In this embodiment, first, the Anycast IP and Domain Name System cache service corresponding to the private cloud need to be deployed in the public cloud in advance. This can solve the problem of network address intercommunication between the DNS of the private cloud and the public cloud, ensuring smooth network connection between the two.
[0054] The anycast routing is deployed in the public cloud in the following manner:
[0055] Add the address segment and subnet corresponding to anycast routing in the virtual private cloud in the public cloud.
[0056] Specifically, in a private cloud environment, Anycast IP is published from multiple IDCs through a dynamic routing protocol. To implement Anycast address publication in a public cloud environment, the address segment must first exist in the public cloud's virtual private cloud (VPC). However, the network address segment is determined when the VPC is created. Therefore, a new address segment needs to be added to the existing VPC. The new address segment is the network segment where the anycast IP is located. For example, Figure 5 A schematic diagram of anycast routing for public cloud deployment provided by an embodiment of the present invention, in which 1 is a newly added address segment, and a subnet dedicated to the Anycast address is created. Figure 5 Mark 2, you can implement the deployment of Anycast IP in the public cloud. Figure 5 LB stands for load balancer (Load Balancing, LB), and VSW stands for virtual switch.
[0057] The DNS cache service is deployed in the public cloud in the following ways:
[0058] Apply for a virtual machine and a corresponding load balancer in the public cloud to deploy the domain name system cache service to the cache server and / or authoritative server through the virtual machine; bind the load balancer to the anycast route.
[0059] Specifically, in a private cloud environment, DNS is deployed inside the IDC through a physical machine, and is linked to the switch inside the IDC to implement DNS Anycast through a routing protocol. In a public cloud environment, the physical network is not visible to the cloud. To achieve DNS service sinking and deploy it as Anycast, you need to apply for a virtual machine and LB, deploy the DNS cache service through the virtual machine, sink the DNS service, bind the LB to the Anycast IP, and implement the Anycast of the DNS service. When sinking, you can choose to sink the cache server and the authoritative server according to your needs.
[0060] In this embodiment, the first authoritative server is controlled to send the first request to the public cloud based on anycast routing, so that the first request is resolved through the domain name system cache service of the second domain name system in the public cloud.
[0061] S13. When the private cloud receives the second request sent by the public cloud to resolve the private cloud domain name, the private cloud controls the first authoritative server to resolve the second request.
[0062] In this embodiment, if Figure 6 The figure shows a schematic diagram of a public cloud resolving a private cloud domain name provided by an embodiment of the present invention. When a public cloud service resolves a private cloud domain name, since public cloud vendors can currently provide a variety of public cloud services, some services are public services of the public cloud, and the related underlying layer directly relies on the basic services of the public cloud, and the public cloud DNS is used by default. If these services need to communicate with the services deployed by the private cloud, the public cloud DNS cannot resolve the private cloud domain name. Therefore, in this scenario, by configuring DNS forwarding on the public cloud, the corresponding private cloud domain name and the second request for resolving the private cloud domain name are forwarded to the first authoritative server of the private cloud DNS, so that the private cloud domain name is resolved by the first authoritative server according to the second request. If the first authoritative server is deployed under the cloud, it is necessary to ensure that the public cloud DNS and the first authoritative server under the cloud are interoperable.
[0063] In a possible implementation, when there is a public cloud with an independently planned address segment, the first request is sent to a proxy server corresponding to the public cloud with the independently planned address segment, so that the first request is parsed by the proxy server.
[0064] Specifically, in a hybrid cloud environment, public cloud services may need to communicate with private cloud services, but public cloud public services usually use the public cloud's DNS by default, which may result in the inability to resolve the private cloud's domain name. In order for these services to correctly resolve the private cloud's domain name, you can pre-set the communication between the public cloud and the first authoritative server under the cloud. To achieve interoperability between public and private cloud services, there are two factors to consider: one is the normal resolution of DNS domain names, and the other is the interoperability of on-cloud and off-cloud business network addresses. At present, the addresses within the public cloud VPC have achieved interoperability with the private cloud, and most services can use the addresses planned by the VPC to ensure interoperability with the off-cloud network. However, some cloud vendors still independently plan address segments for some public services, such as using 100.xxx segment addresses, which prevents users under the cloud from using the corresponding resources on the cloud. There are three main solutions to this problem, which need to be selected based on the actual situation of the public cloud.
[0065] Solution 1: Directly publish the address segment used by the public cloud to the cloud. The DNS on the cloud can perform address resolution normally, and the servers off the cloud can also access the resources on the cloud.
[0066] Solution 2: Deploy the corresponding proxy server in front of the public cloud service, connect the public cloud and private cloud through the proxy server on the cloud, and adjust the DNS resolution to the proxy server. The DNS resolution request of the private cloud will be forwarded to the proxy server, and then forwarded to the public cloud by the proxy server to resolve the domain name.
[0067] Solution 3: Deploy LB in front of the public cloud service, mount the public cloud service behind LB, and adjust DNS resolution to LB. Forward all traffic through LB. LB can distribute traffic to multiple backend public cloud services to achieve load balancing and high availability.
[0068] In this embodiment, Solution 2 can be used to solve the problem of intercommunication between private clouds and public clouds. At the same time, public cloud vendors can be continuously encouraged to cooperate with standardized services to ensure that all services can use the address segment within the VPC.
[0069] The domain name resolution method provided in the embodiment of the present invention is as follows: when the private cloud host receives a first request for resolving a public cloud domain name, the first request is sent to the first authoritative server corresponding to the private cloud; the first authoritative server is controlled to send the first request to the public cloud to resolve the first request through the second domain name system of the public cloud, and the public cloud pre-deploys the anycast routing corresponding to the private cloud, and pre-deploys the domain name system cache service through the virtual machine and the load balancer; when the private cloud receives the second request for resolving the private cloud domain name sent by the public cloud, the first authoritative server is controlled to resolve the second request. Therefore, in a hybrid cloud scenario, anycast routing and domain name system cache services can be pre-deployed in the public cloud to provide domain name resolution services for different domain name resolution requests, so as to achieve resolution of the domain name of the public cloud in the private cloud, and the private cloud accesses the relevant business services deployed in the public cloud, and users can flexibly choose multi-cloud services to meet their business needs.
[0070] Figure 2 A flowchart of another domain name resolution method provided by an embodiment of the present invention is shown as follows: Figure 2 As shown, the method specifically includes:
[0071] S21. Publish anycast routes from multiple Internet data centers corresponding to the private cloud through a dynamic routing protocol; and deploy the first domain name system of the private cloud in the Internet data center through a physical machine.
[0072] In this embodiment, the anycast route is first published in the private cloud and the first domain name system corresponding to the private cloud is deployed. In the private cloud environment, the anycast route is published from multiple IDCs through a dynamic routing protocol. The DNS on the private cloud is deployed inside the IDC through a physical machine and linked with the switch in the IDC to implement DNS Anycast through a routing protocol.
[0073] S22. Deploy the anycast routing corresponding to the private cloud in the public cloud in advance, and deploy the domain name system cache service in the public cloud through virtual machines and load balancers in advance.
[0074] In this embodiment, the Anycast IP is first deployed downward. In the process of implementing Anycast IP release in the public cloud environment, the address segment of the existing VPC must be expanded first, which can be done by adding a new CIDR block in the VPC. Further, a dedicated subnet for Anycast address is created: using the newly added address segment, a subnet dedicated to Anycast IP is created in the VPC. This subnet will serve as the bearer area for Anycast addresses.
[0075] Further, configure the dynamic routing protocol: By configuring the dynamic routing protocol (for example, BGP) in each IDC, publish the Anycast IP to the network environment of the public cloud. This step ensures that the Anycast IP can be published in multiple locations at the same time, and that the traffic can dynamically select the best path based on the network conditions. Then configure the network devices: Configure the network devices in the public cloud (for example, NAT gateways or routers) to support Anycast IP. Ensure that these devices correctly handle Anycast traffic from multiple locations. Finally, test and verify: After completing the configuration, conduct comprehensive testing to ensure that the Anycast IP can be correctly published from multiple IDCs through the public cloud, and verify its high availability and fast failover capabilities. The key to this process is to ensure that there is enough address space within the VPC and that the dynamic routing protocol is configured correctly to support multi-point publication of Anycast IP so that the same IP address can be accessed from multiple locations at the same time.
[0076] Deploy the domain name system cache service in the public cloud, including: applying for a virtual machine and a corresponding load balancer in the public cloud, so as to deploy the domain name system cache service to the cache server and / or the authoritative server through the virtual machine; and binding the load balancer to the anycast route.
[0077] Specifically, in a traditional private cloud environment, the DNS server is deployed on a physical machine, and the DNS Anycast service is implemented through cooperation with the switch. This means that no matter where the user requests DNS resolution, it will automatically connect to the nearest DNS server, thereby speeding up access. When these services are in the public cloud environment, the physical network devices become invisible, so the switch or router cannot be directly controlled, and the domain name system cache service needs to be sunk. First, according to the DNS resolution request volume of regional users, the CPU, memory and other specifications of the device to be applied for, a preset number of virtual machines are applied in the public cloud to deploy the DNS cache service. These cache services will store some commonly used domain name resolution records, and then in order to implement the DNS Anycast service, a load balancer (LB) is set up to evenly distribute user requests to multiple DNS servers. And this distributor will bind the Anycast IP. The user's server will configure this Anycast IP as its DNS address. When it makes a request, it will forward the request to the backend DNS cache service through the LB. If there is a record of this domain name in the cache (for example, the domain name resolution of "ABC"), the result is returned directly. If there is no record of this domain name in the cache, such as a domain name on the cloud, the cache service will forward the request to the authoritative server in the public cloud to obtain the accurate resolution result.
[0078] The method of deploying the domain name system cache service to the cache server and / or the authoritative server through a virtual machine includes:
[0079] Obtain a target number of virtual machines; when the target number is greater than a first threshold, deploy the domain name system cache service to the cache server and the authoritative server; when the target number is less than or equal to the first threshold, deploy the domain name system cache service to the authoritative server.
[0080] Specifically, in the DNS service sinking solution, we can choose to sink only the cache server or sink the cache server and the authoritative server according to business needs and the scale of the public cloud. We can obtain the number of virtual machines as the target number based on the node construction scale. When the target number is greater than the preset first threshold, it is deployed to the cache server and the authoritative server, otherwise it is deployed to the authoritative server. For example, if the service node has less than or equal to 1,000 virtual machines, the authoritative server is sunk, and if it is greater than 1,000, the cache server and the authoritative server are sunk. The cache server can relieve the request pressure of the authoritative server. In this way, the sinking and Anycast of DNS services are successfully realized in the public cloud environment, ensuring that users can get fast and stable DNS resolution services no matter where they visit.
[0081] As an example, Figure 7 The diagram shows a schematic diagram of a domain name system cache service provided by an embodiment of the present invention being deployed down to a cache server and an authoritative server. Figure 7 includes the selected down cache server (DNS cache) and authoritative server (DNS authority). The business server DNS is configured with an Ancyast IP, which is forwarded to the cache DNS at the back end through the LB. The cache DNS is forwarded to the authoritative DNS for resolution. If it is a domain name in a private cloud, the resolution result is given directly. If it is a domain name on the cloud, it is forwarded to the public cloud DNS for resolution.
[0082] S23. When the private cloud host receives the resolution request, it determines whether the resolution request is for the target domain name corresponding to the private cloud.
[0083] S24. When the judgment result is yes, the resolution request is resolved through the first authoritative server; when the judgment result is no, the resolution request is determined to be the first request; the first request is sent to the first cache server of the private cloud, so that the first request is sent to the first authoritative server through the first cache server.
[0084] In this embodiment, the essence of the private cloud server resolving the public cloud domain name is that the first authoritative server under the private cloud can normally forward it to the public cloud DNS server for public cloud domain name resolution. Usually, in a hybrid cloud scenario, all hosts are required to be configured with a unified DNS address. When the private cloud host needs to resolve the public cloud domain name, it forwards the request to the first authoritative server under the cloud, which is then forwarded to the corresponding public cloud DNS by the first authoritative server.
[0085] Specifically, when the private cloud host receives a resolution request, it first determines whether the resolution request is used to resolve the domain name corresponding to the private cloud. If so, it directly resolves it through the first authoritative server and gives the resolution result. If the resolution request is used to resolve the domain name corresponding to the public cloud, the resolution request is determined to be the first request. If the cache server and the authoritative server are pre-deployed, the first request is sent to the first cache server of the private cloud, and the first cache server is controlled to send the first request to the first authoritative server. If only the authoritative server is deployed, the first request is directly sent to the first authoritative server of the private cloud.
[0086] S25. When the public cloud uses a fixed domain name system address, control the first authoritative server to send the first request to the network address translation gateway of the public cloud, so as to send the first request to the server of the second domain name system of the public cloud through the network address translation gateway; so as to resolve the first request through the second domain name system of the public cloud.
[0087] In this embodiment, if Figure 8 The figure shows a schematic diagram of a private cloud resolving a public cloud domain name provided by an embodiment of the present invention. Currently, there are two main situations for DNS service addresses on public clouds. Mainstream public cloud vendors support automatic generation of DNS addresses within the VPC network segment. For example, when a new switch is created, the first and second network segments associated are DNS addresses. Some public cloud vendors use custom fixed DNS addresses, such as using the 100.xxx segment as a DNS address. The former uses the address within the VPC to ensure intercommunication with the private cloud's DNS authoritative server under the cloud. The latter cannot directly interoperate with the cloud because it uses an independent address. When resolving domain names on the cloud, the authoritative DNS cannot forward requests to the cloud. Therefore, it is necessary to solve the problem of intercommunication between the DNS address on the cloud and the cloud under the cloud to ensure that the private cloud server can correctly resolve the public cloud domain name. The key lies in handling the forwarding and resolution of DNS requests. There are three solutions for this situation.
[0088] Solution 1: Directly publish the DNS address segment on the cloud to the cloud. This solution is simple and direct, allowing the private cloud server to directly access the DNS address of the public cloud.
[0089] Solution 2: Configure a network address translation gateway (NAT gateway) on the cloud to achieve intercommunication between the DNS authoritative server under the cloud and the DNS server on the cloud through NAT conversion. This solution requires an additional NAT server. This solution can solve the address conflict problem and convert the address through the NAT gateway, so that the DNS server of the private cloud can communicate with the DNS server of the public cloud.
[0090] Solution 3: Deploy an agent on the public cloud to connect the DNS services on and off the cloud.
[0091] This embodiment mainly uses solution 2. When the public cloud uses a fixed domain name system address, the first authoritative server is controlled to send the first request to the network address translation gateway pre-set by the public cloud, so as to send the first request to the server of the second domain name system of the public cloud through the network address translation gateway; and then the first request is resolved through the second domain name system of the public cloud. And continue to promote all public cloud vendors to support VPC intranet segments as DNS service addresses.
[0092] In one possible implementation, when the public cloud uses a domain name system address generated by a network segment within the public cloud's virtual private cloud, the first authoritative server is controlled to send the first request to the server of the second domain name system of the public cloud through the domain name system address. That is, when the public cloud uses a pre-deployed domain name system address (AnycastIP), there is no need to set up a network address translation gateway, and the first authoritative server can be directly controlled to send the first request to the server of the second domain name system of the public cloud through the domain name system address, and then the first request is resolved through the second domain name system of the public cloud.
[0093] Figure 3 A schematic diagram of the structure of a domain name resolution device provided by an embodiment of the present invention, such as Figure 3 As shown, the device specifically includes
[0094] A sending module 31 is used to send the first request to the first authoritative server corresponding to the private cloud when the private cloud host receives the first request to resolve the public cloud domain name;
[0095] A control module 32 is used to control the first authoritative server to send the first request to the public cloud, so as to resolve the first request through the second domain name system of the public cloud, and the public cloud pre-deploys the anycast routing corresponding to the private cloud, and pre-deploys the domain name system cache service through a virtual machine and a load balancer;
[0096] The control module is further configured to control the first authoritative server to resolve the second request when the private cloud receives the second request sent by the public cloud to resolve the private cloud domain name.
[0097] In a possible implementation, the control module is specifically configured to, when the public cloud uses a fixed domain name system address, control the first authoritative server to send the first request to a network address translation gateway of the public cloud, so as to send the first request to a server of a second domain name system of the public cloud through the network address translation gateway;
[0098] Or, when the public cloud uses a domain name system address generated by a network segment within a virtual private cloud of the public cloud, control the first authoritative server to send the first request to a server of a second domain name system of the public cloud through the domain name system address.
[0099] In a possible implementation, the processing module 33 is configured to add the address segment and subnet corresponding to the anycast route in the virtual private cloud in the public cloud;
[0100] The domain name system cache service is deployed in the public cloud in the following manner:
[0101] Apply for a virtual machine and a corresponding load balancer in the public cloud, so as to deploy the domain name system cache service to a cache server and / or an authoritative server through the virtual machine;
[0102] Bind the load balancer to the anycast route.
[0103] In a possible implementation manner, the processing module is further configured to obtain a target number of virtual machines;
[0104] When the target number is greater than a first threshold, the domain name system cache service is deployed to the cache server and the authoritative server;
[0105] When the target number is less than or equal to a first threshold, the domain name system cache service is deployed downstream to an authoritative server.
[0106] In a possible implementation, the sending module is specifically configured to determine, when the private cloud host receives the resolution request, whether the resolution request is for a target domain name corresponding to the private cloud;
[0107] When the judgment result is yes, the resolution request is resolved by the first authoritative server
[0108] When the judgment result is no, determining that the resolution request is the first request;
[0109] The first request is sent to a first cache server of the private cloud, so that the first request is sent to the first authoritative server through the first cache server.
[0110] In a possible implementation, the processing module is further configured to publish anycast routes from multiple Internet data centers corresponding to the private cloud through a dynamic routing protocol;
[0111] The first domain name system of the private cloud is deployed in the Internet data center through a physical machine.
[0112] In a possible implementation, the sending module is further used to send the first request to a proxy server corresponding to the public cloud with an independently planned address segment when there is a public cloud with an independently planned address segment, so as to parse the first request through the proxy server.
[0113] The domain name resolution device provided in this embodiment may be as follows Figure 3 The device shown in FIG. 1 may perform the following steps: Figure 1-2 All steps of the domain name resolution method in the Figure 1-2 For details on the technical effects of the domain name resolution method shown, please refer to Figure 1-2 For the sake of brevity, the relevant description is not repeated here.
[0114] Figure 4 A schematic diagram of the structure of a computer device provided by an embodiment of the present invention, Figure 4 The computer device 400 shown includes: at least one processor 401, a memory 402, at least one network interface 404 and other user interfaces 403. The various components in the computer device 400 are coupled together via a bus system 405. It is understood that the bus system 405 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 405 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 405 is not shown in FIG. Figure 4 Various buses are labeled as bus system 405 .
[0115] The user interface 403 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).
[0116] It can be understood that the memory 402 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 402 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0117] In some implementations, the memory 402 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 4021 and application programs 4022 .
[0118] The operating system 4021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 4022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present invention can be included in the application 4022.
[0119] In the embodiment of the present invention, by calling the program or instruction stored in the memory 402, specifically, the program or instruction stored in the application 4022, the processor 401 is used to execute the method steps provided by each method embodiment, for example, including:
[0120] When the private cloud host receives the first request to resolve the public cloud domain name, the private cloud host sends the first request to the first authoritative server corresponding to the private cloud;
[0121] Controlling the first authoritative server to send the first request to the public cloud, so as to resolve the first request through a second domain name system of the public cloud, pre-deploying the anycast routing corresponding to the private cloud in the public cloud, and pre-deploying the domain name system cache service through a virtual machine and a load balancer;
[0122] When the private cloud receives the second request sent by the public cloud to resolve the private cloud domain name, the first authoritative server is controlled to resolve the second request.
[0123] In a possible implementation, when the public cloud uses a fixed domain name system address, controlling the first authoritative server to send the first request to a network address translation gateway of the public cloud, so as to send the first request to a server of a second domain name system of the public cloud through the network address translation gateway;
[0124] Or, when the public cloud uses a domain name system address generated by a network segment within a virtual private cloud of the public cloud, control the first authoritative server to send the first request to a server of a second domain name system of the public cloud through the domain name system address.
[0125] In a possible implementation, an address segment and a subnet corresponding to the anycast route are added in a virtual private cloud in the public cloud;
[0126] The domain name system cache service is deployed in the public cloud in the following manner:
[0127] Apply for a virtual machine and a corresponding load balancer in the public cloud, so as to deploy the domain name system cache service to a cache server and / or an authoritative server through the virtual machine;
[0128] Bind the load balancer to the anycast route.
[0129] In a possible implementation, obtaining a target number of the virtual machines;
[0130] When the target number is greater than a first threshold, the domain name system cache service is deployed to the cache server and the authoritative server;
[0131] When the target number is less than or equal to a first threshold, the domain name system cache service is deployed downstream to an authoritative server.
[0132] In a possible implementation, when the private cloud host receives the resolution request, it determines whether the resolution request is for a target domain name corresponding to the private cloud;
[0133] When the judgment result is yes, the resolution request is resolved by the first authoritative server
[0134] When the judgment result is no, determining that the resolution request is the first request;
[0135] The first request is sent to a first cache server of the private cloud, so that the first request is sent to the first authoritative server through the first cache server.
[0136] In one possible implementation, anycast routes are published from multiple Internet data centers corresponding to the private cloud through a dynamic routing protocol;
[0137] The first domain name system of the private cloud is deployed in the Internet data center through a physical machine.
[0138] In a possible implementation, when there is a public cloud with an independently planned address segment, the first request is sent to a proxy server corresponding to the public cloud with the independently planned address segment, so that the first request is parsed by the proxy server.
[0139] The method disclosed in the above embodiment of the present invention can be applied to the processor 401, or implemented by the processor 401. The processor 401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 401 or the instruction in the form of software. The above processor 401 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 402, and the processor 401 reads the information in the memory 402 and completes the steps of the above method in combination with its hardware.
[0140] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.
[0141] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0142] The computer device provided in this embodiment may be Figure 4 The computer device shown in , can execute Figure 1-2 All steps of the domain name resolution method in the Figure 1-2 For details on the technical effects of the domain name resolution method shown, please refer to Figure 1-2 For the sake of brevity, the relevant description is not repeated here.
[0143] The embodiment of the present invention also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.
[0144] When one or more programs in the storage medium can be executed by one or more processors, the domain name resolution method executed on the device side can be implemented.
[0145] The processor is used to execute the domain name resolution program stored in the memory to implement the following steps of the domain name resolution method executed on the device side:
[0146] When the private cloud host receives the first request to resolve the public cloud domain name, the private cloud host sends the first request to the first authoritative server corresponding to the private cloud;
[0147] Controlling the first authoritative server to send the first request to the public cloud, so as to resolve the first request through a second domain name system of the public cloud, pre-deploying the anycast routing corresponding to the private cloud in the public cloud, and pre-deploying the domain name system cache service through a virtual machine and a load balancer;
[0148] When the private cloud receives the second request sent by the public cloud to resolve the private cloud domain name, the first authoritative server is controlled to resolve the second request.
[0149] In a possible implementation, when the public cloud uses a fixed domain name system address, controlling the first authoritative server to send the first request to a network address translation gateway of the public cloud, so as to send the first request to a server of a second domain name system of the public cloud through the network address translation gateway;
[0150] Or, when the public cloud uses a domain name system address generated by a network segment within a virtual private cloud of the public cloud, control the first authoritative server to send the first request to a server of a second domain name system of the public cloud through the domain name system address.
[0151] In a possible implementation, an address segment and a subnet corresponding to the anycast route are added in a virtual private cloud in the public cloud;
[0152] The domain name system cache service is deployed in the public cloud in the following manner:
[0153] Apply for a virtual machine and a corresponding load balancer in the public cloud, so as to deploy the domain name system cache service to a cache server and / or an authoritative server through the virtual machine;
[0154] Bind the load balancer to the anycast route.
[0155] In a possible implementation, obtaining a target number of the virtual machines;
[0156] When the target number is greater than a first threshold, the domain name system cache service is deployed to the cache server and the authoritative server;
[0157] When the target number is less than or equal to a first threshold, the domain name system cache service is deployed downstream to an authoritative server.
[0158] In a possible implementation, when the private cloud host receives the resolution request, it determines whether the resolution request is for a target domain name corresponding to the private cloud;
[0159] When the judgment result is yes, the resolution request is resolved by the first authoritative server
[0160] When the judgment result is no, determining that the resolution request is the first request;
[0161] The first request is sent to a first cache server of the private cloud, so that the first request is sent to the first authoritative server through the first cache server.
[0162] In one possible implementation, anycast routes are published from multiple Internet data centers corresponding to the private cloud through a dynamic routing protocol;
[0163] The first domain name system of the private cloud is deployed in the Internet data center through a physical machine.
[0164] In a possible implementation, when there is a public cloud with an independently planned address segment, the first request is sent to a proxy server corresponding to the public cloud with the independently planned address segment, so that the first request is parsed by the proxy server.
[0165] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0166] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0167] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A domain name resolution method, characterized in that: include: When the private cloud host receives the first request to resolve the public cloud domain name, the private cloud host sends the first request to the first authoritative server corresponding to the private cloud; Controlling the first authoritative server to send the first request to the public cloud, so as to resolve the first request through a second domain name system of the public cloud, pre-deploying the anycast routing corresponding to the private cloud in the public cloud, and pre-deploying the domain name system cache service through a virtual machine and a load balancer; When the private cloud receives the second request sent by the public cloud to resolve the private cloud domain name, the first authoritative server is controlled to resolve the second request.
2. The method according to claim 1, characterized in that The controlling the first authoritative server corresponding to the private cloud to send the first request to the public cloud includes: When the public cloud uses a fixed domain name system address, control the first authoritative server to send the first request to a network address translation gateway of the public cloud, so as to send the first request to a server of a second domain name system of the public cloud through the network address translation gateway; Or, when the public cloud uses a domain name system address generated by a network segment within a virtual private cloud of the public cloud, control the first authoritative server to send the first request to a server of a second domain name system of the public cloud through the domain name system address.
3. The method according to claim 1, characterized in that The anycast routing is deployed in the public cloud in the following manner: Adding the address segment and subnet corresponding to the anycast route in the virtual private cloud in the public cloud; The domain name system cache service is deployed in the public cloud in the following manner: Applying for a virtual machine and a corresponding load balancer in the public cloud, so as to deploy the domain name system cache service to a cache server and / or an authoritative server through the virtual machine; Bind the load balancer to the anycast route.
4. The method according to claim 3, characterized in that: The method of sinking and deploying the domain name system cache service to a cache server and / or an authoritative server through the virtual machine includes: Obtaining a target number of virtual machines; When the target number is greater than a first threshold, the domain name system cache service is deployed to the cache server and the authoritative server; When the target number is less than or equal to a first threshold, the domain name system cache service is deployed downstream to an authoritative server.
5. The method according to claim 1, characterized in that When the private cloud host receives the first request for resolving the public cloud domain name, sending the first request to the first authoritative server corresponding to the private cloud includes: When the private cloud host receives the resolution request, determining whether the resolution request is for a target domain name corresponding to the private cloud; When the judgment result is yes, the resolution request is resolved by the first authoritative server When the judgment result is no, determining that the resolution request is the first request; The first request is sent to a first cache server of the private cloud, so that the first request is sent to the first authoritative server through the first cache server.
6. The method according to claim 1, characterized in that The method further comprises: Publishing anycast routes from multiple Internet data centers corresponding to the private cloud through a dynamic routing protocol; The first domain name system of the private cloud is deployed in the Internet data center through a physical machine.
7. The method according to claim 1, characterized in that The method further comprises: When there is a public cloud with an independently planned address segment, the first request is sent to a proxy server corresponding to the public cloud with the independently planned address segment, so that the first request is parsed by the proxy server.
8. A domain name resolution device, characterized in that: include: A sending module, configured to send a first request for resolving a public cloud domain name to a first authoritative server corresponding to the private cloud when the private cloud host receives the first request; A control module, configured to control the first authoritative server to send the first request to the public cloud, so as to resolve the first request through a second domain name system of the public cloud, and to pre-deploy the anycast routing corresponding to the private cloud in the public cloud, and to pre-deploy the domain name system cache service through a virtual machine and a load balancer; The control module is further configured to control the first authoritative server to resolve the second request when the private cloud receives the second request sent by the public cloud to resolve the private cloud domain name.
9. A computer device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a domain name resolution program stored in the memory to implement the domain name resolution method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the domain name resolution method according to any one of claims 1 to 7.