Extranet access method, data center intranet, equipment and medium
By introducing a decision module into the data center intranet, determining the target operator of the Pod, and using the same operator in the first domain name system server and router for external network access, the problem of high latency and poor stability of the Pod access to the external network is solved, and the external network access with lower latency and higher stability is achieved.
Patent Information
- Application Number
- CN202411879512.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-11
AI Technical Summary
Pod has a high latency and poor stability when accessing the external network, mainly because the operator used when DNS obtains the external network IP address is inconsistent with the export operator when the Pod accesses the external network.
The decision module is introduced into the data center intranet, and the decision module is queried through the first domain name system server and the router, and the target operator corresponding to the pod is determined, so that the first domain name system server and the router can use the same operator for external network access.
By ensuring that the operators used when the Pod accesses the external network are consistent, latency is reduced and access stability is improved.
Smart Images

Figure CN119814660A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communications, and in particular to an external network access method, a data center intranet, equipment, and a medium. Background Art
[0002] Pod is the smallest basic unit of deployment and management in the container cluster management system (Kubernetes, K8S for short). Pod is a collection of one or more containerized applications, an abstract collection of one or a group of services (processes).
[0003] When a Pod accesses the Internet, it needs to resolve the domain name through the Domain Name System (DNS) in the data center's intranet and obtain the Internet Protocol (IP) address of the Internet. However, the operator used by DNS to obtain the Internet IP address and the export operator used by the Pod to access the Internet based on the Internet IP address may be different, resulting in higher latency and poor stability when the Pod accesses the Internet. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides an external network access method, a data center intranet, a device and a medium, which reduce the delay when the Pod accesses the external network and improve the stability of the Pod accessing the external network.
[0005] In a first aspect, an embodiment of the present disclosure provides an external network access method, the method is applied to a data center intranet, the data center intranet includes a container cluster management system, a first domain name system server, a decision module, and a router, the container cluster management system includes a basic unit, and the method includes:
[0006] The basic unit sends a domain name resolution request to the first domain name system server, wherein the domain name resolution request includes a target domain name to be resolved;
[0007] The first domain name system server queries the target operator information corresponding to the target domain name from the decision module, obtains the target Internet Protocol address corresponding to the target domain name through the second domain name system server provided by the target operator, and stores the target Internet Protocol address in the decision module, wherein the decision module stores the correspondence between the target domain name and the target Internet Protocol address;
[0008] The basic unit receives the target Internet Protocol address from the first domain name system server and sends an access request to the router, wherein the access request includes the target Internet Protocol address;
[0009] The router queries the target operator information corresponding to the target Internet Protocol address from the decision module, and forwards the access request to a first egress server provided by the target operator, wherein the first egress server is used to forward the access request to a public network server provided by the target operator.
[0010] In a second aspect, an embodiment of the present disclosure provides a data center intranet, the data center intranet includes a container cluster management system, a first domain name system server, a decision module, and a router, the container cluster management system includes a basic unit;
[0011] The basic unit is used to send a domain name resolution request to the first domain name system server, wherein the domain name resolution request includes a target domain name to be resolved;
[0012] The first domain name system server is used to query the target operator information corresponding to the target domain name from the decision module, and obtain the target Internet Protocol address corresponding to the target domain name through the second domain name system server provided by the target operator and store the target Internet Protocol address in the decision module, and the decision module is used to store the corresponding relationship between the target domain name and the target Internet Protocol address;
[0013] The basic unit is used to receive the target Internet Protocol address from the first domain name system server and send an access request to the router, wherein the access request includes the target Internet Protocol address;
[0014] The router is used to query the target operator information corresponding to the target Internet Protocol address from the decision module, and forward the access request to a first egress server provided by the target operator, and the first egress server is used to forward the access request to a public network server provided by the target operator.
[0015] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
[0016] Memory;
[0017] Processor; and
[0018] Computer programs;
[0019] The computer program is stored in the memory and is configured to be executed by the processor to implement the method as described in the first aspect.
[0020] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method described in the first aspect.
[0021] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, wherein the computer program implements the method described in the first aspect when executed by a processor.
[0022] The external network access method, data center intranet, device and medium provided by the embodiments of the present disclosure respectively query the decision module through the first domain name system server and the router in the data center intranet to determine the target operator corresponding to the Pod, so that when the first domain name system server receives the domain name resolution request of the Pod, it obtains the target IP address corresponding to the target domain name through the second domain name system server provided by the target operator. When the router receives the access request of the Pod for the target IP address, it sends an access request to the first export server provided by the target operator, so that the operator used by the first domain name system server to obtain the external network IP address, that is, the target IP address, and the export operator used by the Pod when accessing the external network according to the external network IP address are the same. This reduces the delay when the Pod accesses the external network and improves the stability of the Pod's access to the external network. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0025] Figure 1 A flow chart of an external network access method provided by an embodiment of the present disclosure;
[0026] Figure 2 A flow chart of an external network access method provided by an embodiment of the present disclosure;
[0027] Figure 3 A flow chart of an external network access method provided by an embodiment of the present disclosure;
[0028] Figure 4 A flow chart of an external network access method provided by an embodiment of the present disclosure;
[0029] Figure 5 A flow chart of an external network access method provided by an embodiment of the present disclosure;
[0030] Figure 6 A flow chart of an external network access method provided by an embodiment of the present disclosure;
[0031] Figure 7 A flow chart of an external network access method provided by an embodiment of the present disclosure;
[0032] Figure 8 A schematic diagram of the structure of an external network access device provided in an embodiment of the present disclosure;
[0033] Fig. 9 A schematic diagram of the structure of an external network access device provided in an embodiment of the present disclosure;
[0034] Fig.10 A schematic diagram of the structure of an external network access device provided in an embodiment of the present disclosure;
[0035] Fig.11 A schematic diagram of the structure of an external network access device provided in an embodiment of the present disclosure;
[0036] Fig.12 A schematic diagram of the structure of an electronic device embodiment provided by the present disclosure. DETAILED DESCRIPTION
[0037] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0038] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0039] Kubernetes (K8S for short) is a lightweight and scalable open source management platform for managing containerized applications and services. K8S can realize the automatic deployment and control of user applications or Pod tasks, and users can realize service discovery and load balancing based on K8S's own functions. Pod is the smallest scheduling unit in K8S. One or more containers can be defined in Pod. If there are multiple containers in a Pod, these multiple containers can share network and storage resources to complete a Pod task together. For example, Pod is equivalent to a logical host. When deploying the target service in the traditional way, it is usually deployed on a physical server or cloud server. In K8S, a Pod resource can be defined, and the target container can be defined on this Pod resource to realize the logical host task of Pod.
[0040] When a Pod accesses the external network, it needs to resolve the domain name through the Domain Name System (DNS) in the data center's intranet and obtain the Internet Protocol (IP) address of the external network. However, the operator used by DNS to obtain the external network IP address and the export operator used by the Pod to access the external network based on the external network IP address may be different, resulting in higher latency and poor stability when the Pod accesses the external network. To address this problem, an embodiment of the present disclosure provides an external network access method, which is described below in conjunction with a specific embodiment.
[0041] Figure 1 Flowchart of the external network access method provided by the embodiment of the present disclosure. The method is applied to the intranet of a data center, the intranet of the data center includes a container cluster management system, a first domain name system server, a decision module, and a router, and the container cluster management system includes a basic unit, namely, the Pod as described above. Figure 2 As shown, the data center intranet includes Pod, decision module, first domain name system server, router, first export server of operator A, first export server of operator B, first export server of operator C, first export server of other operators, second export server of operator A, second export server of operator B, second export server of operator C, and second export servers of other operators. Among them, Pod is a collection of one or more containerized applications. Containerized applications run on hosts, and the hosts here can also be called servers, computing nodes, etc. One or more containerized applications can run on a host, each host is a K8S node, and multiple hosts constitute a K8S cluster. The domain name system server in the data center intranet is recorded as the first domain name system server. The first export server of each operator can be one server or multiple servers. Similarly, the second export server of each operator can be one server or multiple servers. The first export server and the second export server of the same operator can be the same server or different servers. In addition, the first export server and the second export server of each operator are devices between the data center intranet and the public network, that is, one end of each export server communicates with the device in the data center intranet, and the other end communicates with the device in the public network. In addition, as Figure 2 As shown, the public network includes the public DNS server of operator A, the public DNS server of operator B, the public DNS server of operator C, the public DNS servers of other operators, and the public server. Among them, the public DNS server of each operator is recorded as the second domain name system server. In addition, the second egress server of the same operator communicates with the public DNS server, for example, the second egress server of operator A communicates with the public DNS server of operator A.
[0042] The following is an introduction to the external network access method provided by the embodiment of the present disclosure with reference to the illustrations. Figure 1 As shown, the specific steps of this method are as follows:
[0043] S101. The basic unit sends a domain name resolution request to the first domain name system server, where the domain name resolution request includes a target domain name to be resolved.
[0044] like Figure 2 As shown, when the Pod needs to access the external network, i.e., the public network, it first sends a domain name resolution request to the domain name system server in the data center intranet, i.e., the first domain name system server. The domain name resolution request includes the target domain name to be resolved and the Internet Protocol (IP) address of the Pod. Specifically, the IP address of the Pod can be used as the source IP address of the domain name resolution request.
[0045] S102: The first domain name system server queries the target operator information corresponding to the target domain name from the decision module, obtains the target Internet Protocol address corresponding to the target domain name through a second domain name system server provided by the target operator, and stores the target Internet Protocol address in the decision module. The decision module stores the correspondence between the target domain name and the target Internet Protocol address.
[0046] When the first domain name system server receives the domain name resolution request, the target operator information corresponding to the target domain name is queried from the decision module. Specifically, the first domain name system server can send a first query request to the decision module, and the first query request includes the target domain name. When the decision module receives the first query request, it queries whether the corresponding relationship between the target domain name and the target operator information is stored locally. If so, the target operator information is sent to the first domain name system server. Assuming that the target operator information is the information of operator C, such as the name or logo of operator C, the first domain name system server obtains the target IP address corresponding to the target domain name through the second domain name system server provided by operator C, that is, the public network DNS server of operator C. For example, the first domain name system server sends the target domain name to the public network DNS server of operator C through the second export server of operator C. When the public network DNS server of operator C receives the target domain name, it converts the target domain name into the corresponding target IP address, and returns the target IP address to the first domain name system server through the second export server of operator C. That is, in the embodiment of the present disclosure, the resolution of the target domain name is a recursive resolution process. When the first domain name system server receives the target IP address returned by the public DNS server of operator C, it stores the target IP address in the decision module, so that the decision module can store the correspondence between the target domain name, target operator information, and the target IP address.
[0047] S103: The basic unit receives the target Internet Protocol address from the first domain name system server, and sends an access request to the router, where the access request includes the target Internet Protocol address.
[0048] For example, after the first domain name system server receives the target IP address returned by the public DNS server of operator C, it also needs to return the target IP address to the Pod, that is, the Pod receives the target IP address from the first domain name system server.
[0049] For example, after the Pod receives the target IP address from the first domain name system server, it initiates an access request according to the target IP address. Specifically, the Pod sends the access request to a router in the data center intranet. The access request includes the target IP address and the IP address of the Pod, wherein the target IP address is the destination IP address of the access request and the IP address of the Pod is the source IP address of the access request.
[0050] S104. The router queries the target operator information corresponding to the target Internet Protocol address from the decision module, and forwards the access request to a first egress server provided by the target operator, where the first egress server is used to forward the access request to a public network server provided by the target operator.
[0051] When the router receives the access request, it determines the target operator corresponding to the target IP address according to the destination IP address of the access request, that is, the target IP address. Specifically, the router can send a second query request to the decision module, and the second query request includes the target IP address. Since the decision module stores the correspondence between the target domain name, the target operator information, and the target IP address, when the decision module receives the second query request, it can determine the target operator information corresponding to the target IP address from the correspondence, and return the target operator information to the router, so that the target operators queried by the first domain name system server and the router are the same, for example, both are operator C. Further, the router sends the access request to the first exit server provided by operator C, that is, Figure 2 The first egress server of operator C shown in FIG. 1 further forwards the access request to the public network server provided by operator C. Thus, the Pod can access the public network server, that is, the external network.
[0052] The disclosed embodiment queries the decision module through the first domain name system server and the router in the data center intranet respectively, determines the target operator corresponding to the Pod, so that when the first domain name system server receives the domain name resolution request of the Pod, it obtains the target IP address corresponding to the target domain name through the second domain name system server provided by the target operator. When the router receives the access request of the Pod for the target IP address, it sends an access request to the first export server provided by the target operator, so that the operator used by the first domain name system server to obtain the external network IP address, that is, the target IP address, and the export operator used by the Pod when accessing the external network according to the external network IP address are the same. This reduces the delay when the Pod accesses the external network and improves the stability of the Pod's access to the external network.
[0053] Optionally, the Internet Protocol address of the basic unit is a source Internet Protocol address of the access request, and the first egress server is used to convert the source Internet Protocol address into the Internet Protocol address of the first egress server.
[0054] For example, the access request generated by the Pod includes a target IP address and the IP address of the Pod, wherein the target IP address is the destination IP address of the access request, and the IP address of the Pod is the source IP address of the access request. When the first egress server of operator C receives the access request, the source IP address of the access request can be modified so that the source IP address of the access request is changed to the IP address of the first egress server of operator C, that is, the first egress server of operator C can implement the Source Network Address Translation (SNAT) service. Similarly, the second egress server of each operator can also implement the SNAT service, and the specific process will not be repeated here.
[0055] Figure 3 This is a flow chart of an external network access method provided by another embodiment of the present disclosure. The method is applied to a first domain name system server in a data center intranet. The specific steps of the method are as follows:
[0056] S301. Receive a domain name resolution request sent by any basic unit in a container cluster management system, where the domain name resolution request includes a target domain name to be resolved, and the container cluster management system is located in an intranet of the data center.
[0057] like Figure 2 The Pod shown is any one of the multiple Pods. When the Pod needs to access the external network, i.e., the public network, it first sends a domain name resolution request to the domain name system server in the data center intranet, i.e., the first domain name system server. In other words, the first domain name system server may receive a domain name resolution request sent by any Pod. The domain name resolution request includes the target domain name to be resolved and the Internet Protocol (IP) address of the Pod. Specifically, the IP address of the Pod can be used as the source IP address of the domain name resolution request.
[0058] S302: Query the target operator information corresponding to the target domain name from the decision module in the data center intranet.
[0059] When the first domain name system server receives the domain name resolution request, the target operator information corresponding to the target domain name is queried from the decision module. Specifically, the first domain name system server can send a first query request to the decision module, and the first query request includes the target domain name. When the decision module receives the first query request, it queries whether the corresponding relationship between the target domain name and the target operator information is stored locally, and if so, the target operator information is sent to the first domain name system server.
[0060] S303: Acquire a target Internet Protocol address corresponding to the target domain name through a second domain name system server provided by the target operator.
[0061] Assuming that the target operator information is information of operator C, such as the name or logo of operator C, the first domain name system server obtains the target IP address corresponding to the target domain name through the second domain name system server provided by operator C, that is, the public network DNS server of operator C. For example, the first domain name system server sends the target domain name to the public network DNS server of operator C through the second egress server of operator C. When the public network DNS server of operator C receives the target domain name, it converts the target domain name into the corresponding target IP address, and returns the target IP address to the first domain name system server through the second egress server of operator C. That is, in the embodiment of the present disclosure, the resolution of the target domain name is a recursive resolution process.
[0062] S304: Send the target Internet Protocol address to any one of the basic units.
[0063] For example, after the first domain name system server receives the target IP address returned by the public DNS server of operator C, it also needs to return the target IP address to the Pod, that is, the Pod receives the target IP address from the first domain name system server.
[0064] The disclosed embodiment queries the decision module through the first domain name system server and the router in the data center intranet respectively, determines the target operator corresponding to the Pod, so that when the first domain name system server receives the domain name resolution request of the Pod, it obtains the target IP address corresponding to the target domain name through the second domain name system server provided by the target operator. When the router receives the access request of the Pod for the target IP address, it sends an access request to the first export server provided by the target operator, so that the operator used by the first domain name system server to obtain the external network IP address, that is, the target IP address, and the export operator used by the Pod when accessing the external network according to the external network IP address are the same. This reduces the delay when the Pod accesses the external network and improves the stability of the Pod's access to the external network.
[0065] Optionally, after obtaining the target Internet Protocol address corresponding to the target domain name through the second domain name system server provided by the target operator, the method further includes: sending the target Internet Protocol address corresponding to the target domain name to the decision module, and the decision module is used to store the correspondence between the target domain name and the target Internet Protocol address.
[0066] For example, when the first domain name system server receives the target IP address returned by the public DNS server of operator C, it sends the target IP address to the decision module so that the decision module can store the correspondence between the target domain name, target operator information, and the target IP address.
[0067] In the disclosed embodiment, the decision module may pre-store multiple domain names and operator information corresponding to each domain name. When establishing the correspondence between each domain name and operator information, the first domain name system server may detect each domain name through the second egress server provided by each operator, make a decision based on the detection result, give priority to operators with low latency and low packet loss rate, and store the domain name and the selected operator information in the decision module. This is described below in conjunction with a specific embodiment.
[0068] Optionally, the method further comprises: Figure 4 The following steps are shown:
[0069] S401. For a preset domain name, the first domain name system server sends detection information to second export servers provided by multiple operators respectively, each second export server is used to send the detection information to the second domain name system server provided by its corresponding operator, and the second domain name system server provided by the same operator is used to send feedback information to the second export server provided by the same operator.
[0070] For example, when the correspondence between each domain name and operator information is established in advance, since each domain name is known, each domain name can be recorded as a preset domain name. For any preset domain name, the first domain name system server can send detection information to the second exit server of operator A, the second exit server of operator B, the second exit server of operator C, and the second exit servers of other operators respectively. Further, the second exit server of the same operator sends the detection information to the second domain name system server provided by the same operator, for example, the second exit server of operator A sends the detection information to the public DNS server of operator A. The public DNS server of the same operator sends feedback information to the second exit server of the same operator, for example, the public DNS server of operator A sends feedback information to the second exit server of operator A.
[0071] S402: The first domain name system server receives the feedback information from second export servers respectively provided by the multiple operators.
[0072] For example, the first domain name system server receives feedback information from the second egress server of operator A, the second egress server of operator B, the second egress server of operator C, and the second egress servers of other operators respectively.
[0073] S403: For each operator, the first domain name system server determines a delay and / or a packet loss rate from sending the detection information to receiving the feedback information.
[0074] Since the delay and packet loss rate of signal transmission between communication devices provided by different operators are different, the first domain name system server can determine the delay and / or packet loss rate from sending the detection information to receiving the feedback information for each operator.
[0075] S404: The first domain name system server determines the operator with the lowest delay and / or the lowest packet loss rate as the operator corresponding to the preset domain name.
[0076] Since the delay and / or packet loss rate from sending the detection information to receiving the feedback information is different for different operators, this embodiment determines the operator with the lowest delay and / or the lowest packet loss rate as the operator corresponding to the preset domain name.
[0077] S405. The first domain name system server stores the preset domain name and the operator information corresponding to the preset domain name in the decision module, wherein the target operator information is the operator information corresponding to the preset domain name matching the target domain name.
[0078] For example, after the first domain name system server determines the operator corresponding to the preset domain name, the preset domain name and the operator information corresponding to the preset domain name can be stored in the decision module.
[0079] When the first domain name system server receives the domain name resolution request sent by the Pod, the target domain name to be resolved is obtained from the domain name resolution request. Further, the first domain name system server sends a first query request to the decision module, and the first query request includes the target domain name. When the decision module receives the first query request, it queries whether there is a preset domain name matching the target domain name locally. If so, the operator information corresponding to the preset domain name is used as the target operator information corresponding to the target domain name, and the target operator information is sent to the first domain name system server. If the decision module does not have a preset domain name matching the target domain name locally, the decision module sends the default operator information to the first domain name system server.
[0080] Optionally, the preset domain name is a domain name whose access times or access frequency is greater than or equal to a preset threshold.
[0081] For example, the same Pod may send domain name resolution requests to the first domain name system server multiple times, and the target domain name carried in each domain name resolution request sent is different. In addition, the first domain name system server can also receive domain name resolution requests sent by different Pods. Therefore, the first domain name system server can count the number of visits or the frequency of visits to the same domain name. When the number of visits or the frequency of visits to any domain name is greater than or equal to a preset threshold, the first domain name system server can use the any domain name as a preset domain name and detect the operator corresponding to the preset domain name. The specific detection process is as described above and will not be repeated here.
[0082] In other embodiments, since the same Pod can send domain name resolution requests to the first domain name system server multiple times, the first domain name system server can also receive domain name resolution requests sent by different Pods, and each time the first domain name system server receives a domain name resolution request, the first domain name system server will query the decision module for the operator information corresponding to the domain name carried in the domain name resolution request, so the decision module can count the number of visits or the frequency of visits to the same domain name. When the number of visits or the frequency of visits to any domain name is greater than or equal to a preset threshold, the decision module can send the any domain name to the first domain name system server, so that the first domain name system server uses the any domain name as a preset domain name and detects the operator corresponding to the preset domain name. The specific detection process is as described above and will not be repeated here.
[0083] In the embodiment of the present disclosure, when the number of visits or the access frequency of a preset domain name is greater than or equal to a preset threshold, each operator is tested separately, and an optimal operator is selected for the preset domain name from multiple operators, so that when the preset domain name is subsequently visited in large numbers, the optimal operator provides a fast response, thereby improving access efficiency.
[0084] Optionally, the detection information includes the preset domain name, and the feedback information includes a public Internet Protocol address corresponding to the preset domain name.
[0085] For example, the detection information described above may include the preset domain name, and the feedback information may include the public IP address corresponding to the preset domain name.
[0086] Correspondingly, the first domain name system server stores the preset domain name and the operator information corresponding to the preset domain name in the decision module, including: the first domain name system server stores the preset domain name, the operator information corresponding to the preset domain name, and the public Internet Protocol address corresponding to the preset domain name in the decision module.
[0087] Because before the first domain name system server determines the operator corresponding to the preset domain name from multiple operators, it has received feedback information from the second export server of each operator, each feedback information includes the public IP address corresponding to the preset domain name, but the public IP addresses provided by different operators may be different. Therefore, after the first domain name system server determines the operator corresponding to the preset domain name from multiple operators, the public IP address provided by the operator is used as the final public IP address corresponding to the preset domain name. Further, the first domain name system server can store the preset domain name, the operator information corresponding to the preset domain name, and the final public IP address corresponding to the preset domain name in the decision module.
[0088] Figure 5 This is a flow chart of an external network access method provided by another embodiment of the present disclosure. The method is applied to a router in a data center intranet. The specific steps of the method are as follows:
[0089] S501. Receive an access request sent by any basic unit in a container cluster management system, where the access request includes a target Internet Protocol address, and the container cluster management system is located in an intranet of the data center.
[0090] For example, the Pod sends a domain name resolution request to the first domain name system server. The first domain name system server performs recursive resolution as described above for the target domain name carried in the domain name resolution request. After obtaining the target IP address corresponding to the target domain name, an access request can be initiated according to the target IP address. Specifically, the Pod sends the access request to a router in the intranet of the data center. The access request includes the target IP address and the IP address of the Pod, wherein the target IP address is the destination IP address of the access request, and the IP address of the Pod is the source IP address of the access request.
[0091] S502: Query the target operator information corresponding to the target Internet Protocol address from the decision module in the data center intranet.
[0092] When the router receives the access request, the target operator corresponding to the target IP address is determined according to the destination IP address of the access request, i.e., the target IP address. Specifically, the router may send a second query request to the decision module, and the second query request includes the target IP address. Since the decision module stores the corresponding relationship between the target domain name, the target operator information, and the target IP address, when the decision module receives the second query request, the target operator information corresponding to the target IP address may be determined from the corresponding relationship, and the target operator information may be returned to the router. For example, the target operator corresponding to the target IP address is operator C.
[0093] S503: Forward the access request to a first egress server provided by the target operator, where the first egress server is used to forward the access request to a public network server provided by the target operator.
[0094] For example, the router sends the access request to the first egress server provided by operator C, that is, Figure 2 The first egress server of operator C shown in FIG. 1 further forwards the access request to the public network server provided by operator C. Thus, the Pod can access the public network server, that is, the external network.
[0095] The disclosed embodiment queries the decision module through the first domain name system server and the router in the data center intranet respectively, determines the target operator corresponding to the Pod, so that when the first domain name system server receives the domain name resolution request of the Pod, it obtains the target IP address corresponding to the target domain name through the second domain name system server provided by the target operator. When the router receives the access request of the Pod for the target IP address, it sends an access request to the first export server provided by the target operator, so that the operator used by the first domain name system server to obtain the external network IP address, that is, the target IP address, and the export operator used by the Pod when accessing the external network according to the external network IP address are the same. This reduces the delay when the Pod accesses the external network and improves the stability of the Pod's access to the external network.
[0096] Figure 6A flow chart of an external network access method provided for another embodiment of the present disclosure. The method is applied to a decision module in a data center intranet. In this embodiment, the decision module may pre-store multiple domain names and operator information corresponding to each domain name. When determining an operator for each domain name, some decision basis is required, and these decision basis include the following situations: 1) For special domain names, such as domain names for special purposes or overseas domain names, the administrator of the data center intranet can configure a specific operator (also called an export operator) for the special domain name. Specifically, the administrator of the data center intranet sends configuration information to the decision module through the terminal device used by the administrator, and the configuration information includes the special domain name and the specific operator information. 2) The first domain name system server detects each preset domain name through the second export server provided by each operator, makes a decision based on the detection result, and gives priority to operators with low latency and low packet loss rate, and stores the preset domain name and the selected operator information in the decision module. 3) The administrator of the data center intranet configures a common default operator for the data center based on the physical location and / or network location of the data center, wherein the physical location can be the province, city, etc. where the data center is located. The network location can be the distance relationship between the egress server and the backbone network of the operator, and the distance relationship refers to the network delay. For example, if the data center is located in city D, and the network coverage area of city D by operator A is the largest, then the default operator configured by the intranet administrator of the data center for the data center is operator A, that is, when each Pod in the data center accesses any domain name, the first domain name system server resolves the domain name through the public network DNS server of operator A to obtain the target IP address corresponding to the domain name. The router forwards the access request carrying the target IP address to the public network server provided by operator A. For another example, if among the various operators, the first egress server or the second egress server of operator A is closest to the backbone network of operator A, then the default operator configured by the intranet administrator of the data center for the data center is operator A. In addition, the priorities of the above three decision bases are successively reduced. That is to say, when the decision module receives the first query request sent by the first domain name system server, it first determines whether the target domain name included in the first query request is a special domain name. If so, the specific operator corresponding to the special domain name is used as the target operator corresponding to the target domain name. If not, it is determined whether the target domain name is a preset domain name that has been detected. If so, the detected operator is used as the target operator corresponding to the target domain name. If the target domain name is not a preset domain name that has been detected, the default operator is used as the target operator corresponding to the target domain name.In addition, for any domain name, if the domain name is neither a special domain name nor a preset domain name that has been detected, in principle, the domain name corresponds to the default operator. However, if the number of times or frequency of access to the domain name is greater than or equal to the preset threshold, the domain name is detected, and the detected operator information and the domain name are stored in the prediction module. In addition, the correspondence between the special domain name and the specific operator information determined according to the above decision basis 1) can be stored in the decision module, and the preset domain name determined according to the above decision basis 2) and the detected operator information can be stored in the decision module.
[0097] like Figure 6 As shown, the specific steps of this method are as follows:
[0098] S601. Receive a first query request sent by a first domain name system server in the data center intranet, where the first query request includes a target domain name.
[0099] For example, when a Pod needs to access an external network, i.e., a public network, it first sends a domain name resolution request to a domain name system server, i.e., a first domain name system server, in the intranet of a data center. The domain name resolution request includes a target domain name to be resolved. The first domain name system server queries the target operator information corresponding to the target domain name from the decision module. Specifically, the first domain name system server may send a first query request to the decision module, and the first query request includes the target domain name.
[0100] S602: If the correspondence between the target domain name and the target operator information is stored locally, the target operator information is returned to the first domain name system server, and the first domain name system server is used to obtain the target Internet Protocol address corresponding to the target domain name through a second domain name system server provided by the target operator.
[0101] When the decision module receives the first query request, it queries whether the corresponding relationship between the target domain name and the target operator information is stored locally. If so, the target operator information is sent to the first domain name system server. Assuming that the target operator information is the information of operator C, such as the name or logo of operator C, the first domain name system server obtains the target IP address corresponding to the target domain name through the second domain name system server provided by operator C, that is, the public DNS server of operator C. For example, the first domain name system server sends the target domain name to the public DNS server of operator C through the second export server of operator C. When the public DNS server of operator C receives the target domain name, it converts the target domain name into the corresponding target IP address, and returns the target IP address to the first domain name system server through the second export server of operator C. That is, in the embodiment of the present disclosure, the resolution of the target domain name is a recursive resolution process.
[0102] S603: Receive a target Internet Protocol address corresponding to the target domain name from the first domain name system server.
[0103] When the first domain name system server receives the target IP address returned by the public network DNS server of operator C, it sends the target IP address to the decision module, and the decision module can store the corresponding relationship between the target domain name, the target operator information, and the target IP address.
[0104] S604: Receive a second query request sent by a router in the data center intranet, where the second query request includes the target Internet Protocol address.
[0105] For example, after the first domain name system server receives the target IP address returned by the public DNS server of operator C, it is also necessary to return the target IP address to the Pod, that is, the Pod receives the target IP address from the first domain name system server. After the Pod receives the target IP address from the first domain name system server, it initiates an access request based on the target IP address. Specifically, the Pod sends the access request to the router in the data center intranet. The access request includes the target IP address and the IP address of the Pod, wherein the target IP address is the destination IP address of the access request, and the IP address of the Pod is the source IP address of the access request. When the router receives the access request, it determines the target operator corresponding to the target IP address based on the destination IP address of the access request, that is, the target IP address. Specifically, the router can send a second query request to the decision module, and the second query request includes the target IP address.
[0106] S605: Return the target operator information corresponding to the target Internet Protocol address to the router, the router being used to forward the access request including the target Internet Protocol address to a first egress server provided by the target operator, the first egress server being used to forward the access request to a public network server provided by the target operator.
[0107] Since the decision module stores the correspondence between the target domain name, the target operator information, and the target IP address, when the decision module receives the second query request, it can determine the target operator information corresponding to the target IP address from the correspondence and return the target operator information to the router. This makes the target operator queried by the first domain name system server and the router the same, for example, both are operator C. Further, the router sends the access request to the first exit server provided by operator C, i.e. Figure 2The first egress server of operator C shown in FIG. 1 further forwards the access request to the public network server provided by operator C. Thus, the Pod can access the public network server, that is, the external network.
[0108] Optionally, the method further includes: if there is no preset domain name matching the target domain name in the decision module, returning the default operator information to the first domain name system server; the first domain name system server obtains the target Internet Protocol address corresponding to the target domain name through a second domain name system server provided by the default operator; and the router forwards the access request including the target Internet Protocol address to the first export server provided by the default operator.
[0109] For example, when the decision module receives the first query request from the first domain name system server, it queries whether the corresponding relationship between the target domain name and the target operator information is stored locally. If not, the default operator information is returned to the first domain name system server. For example, the default operator is operator A, and the first domain name system server obtains the target IP address corresponding to the target domain name through the public DNS server of operator A. In addition, when the router receives the access request from the Pod, since the access request includes the target IP address, the router sends a second query request to the decision module, and the second query request includes the target IP address. Since the decision module does not have a corresponding relationship between the target IP address and the target operator information, the decision module returns the default operator information to the router, and the router forwards the access request to the first exit server of operator A.
[0110] Optionally, the method also includes: receiving and storing the preset domain name sent by the first domain name system server, and the operator information corresponding to the preset domain name, wherein the operator corresponding to the preset domain name is the operator with the lowest delay and / or the lowest packet loss rate when detecting the preset domain name.
[0111] For example, the first domain name system server can detect the preset domain name to obtain the operator information corresponding to the preset domain name. The operator corresponding to the preset domain name is the operator with the lowest delay and / or the lowest packet loss rate when detecting the preset domain name. The specific detection process can refer to the content of the above embodiment. Further, the first domain name system server sends the preset domain name and the operator information corresponding to the preset domain name to the decision module, and the decision module receives and stores the preset domain name and the operator information corresponding to the preset domain name.
[0112] Optionally, the detection information for the preset domain name includes the preset domain name, and the feedback information for the detection information includes the public Internet Protocol address corresponding to the preset domain name; accordingly, receiving and storing the preset domain name sent by the first domain name system server and the operator information corresponding to the preset domain name includes: receiving and storing the preset domain name sent by the first domain name system server, the operator information corresponding to the preset domain name, and the public Internet Protocol address corresponding to the preset domain name.
[0113] For example, the detection information may include the preset domain name, and the feedback information may include the public IP address corresponding to the preset domain name. Because the first domain name system server has received feedback information from the second export server of each operator before determining the operator corresponding to the preset domain name from multiple operators, each feedback information includes the public IP address corresponding to the preset domain name, but the public IP addresses provided by different operators may be different. Therefore, after the first domain name system server determines the operator corresponding to the preset domain name from multiple operators, the public IP address provided by the operator is used as the final public IP address corresponding to the preset domain name. Further, the first domain name system server can store the preset domain name, the operator information corresponding to the preset domain name, and the final public IP address corresponding to the preset domain name in the decision module. That is, the decision module receives and stores the preset domain name sent by the first domain name system server, the operator information corresponding to the preset domain name, and the final public IP address corresponding to the preset domain name.
[0114] In the disclosed embodiment, the first domain name system server can store each domain name it has resolved and the public IP address corresponding to each domain name. Therefore, the decision module can periodically send a request to the first domain name system server, so that the first domain name system server sends each domain name and the public IP address corresponding to each domain name to the decision module, so that the decision module updates the locally stored public IP address.
[0115] The disclosed embodiment queries the decision module through the first domain name system server and the router in the data center intranet respectively, determines the target operator corresponding to the Pod, so that when the first domain name system server receives the domain name resolution request of the Pod, it obtains the target IP address corresponding to the target domain name through the second domain name system server provided by the target operator. When the router receives the access request of the Pod for the target IP address, it sends an access request to the first export server provided by the target operator, so that the operator used by the first domain name system server to obtain the external network IP address, that is, the target IP address, and the export operator used by the Pod when accessing the external network according to the external network IP address are the same. This reduces the delay when the Pod accesses the external network and improves the stability of the Pod's access to the external network.
[0116] Figure 7 A flow chart of an external network access method provided by another embodiment of the present disclosure, such as Figure 7 As shown, the method includes the following steps:
[0117] 1. The Pod sends a domain name resolution request to the first domain name system server.
[0118] 2. The first domain name system server sends a first query request to the decision module.
[0119] 3. The decision module returns the target operator information or the default operator information to the first domain name system server.
[0120] 4. The first domain name system server sends the target domain name to the second export server of the target operator or the default operator, such as operator C.
[0121] 5. The second egress server of operator C sends the target domain name to the public DNS server of operator C.
[0122] 6. The public DNS server of operator C returns the target IP address corresponding to the target domain name to the second egress server of operator C.
[0123] 7. The second egress server of operator C sends the target IP address corresponding to the target domain name to the first domain name system server.
[0124] 8. The first domain name system server sends the target IP address corresponding to the target domain name to the decision module.
[0125] 9. The first DNS server sends the target IP address corresponding to the target domain name to the Pod.
[0126] 10. The Pod sends an access request to the router.
[0127] 11. The router sends a second query request to the decision module.
[0128] 12. The decision module feeds back the target operator information or the default operator information to the router.
[0129] 13. The router sends an access request to the first egress server of the target operator or the default operator, such as operator C.
[0130] 14. The first egress server of operator C sends an access request to the public network server of operator C.
[0131] The specific principles and implementation methods of the above steps 1 to 14 are consistent with those described in the above embodiment and will not be repeated here.
[0132] Figure 8 The schematic diagram of the structure of the external network access device provided in the embodiment of the present disclosure. The external network access device is configured as a basic unit in the container cluster management system, and the container cluster management system is located in the intranet of the data center. The external network access device provided in the embodiment of the present disclosure can execute the processing flow provided in the embodiment of the external network access method, such as Figure 8 As shown, the external network access device 80 includes:
[0133] A sending module 81 is used to send a domain name resolution request to a first domain name system server in the data center intranet, wherein the domain name resolution request includes a target domain name to be resolved, and the first domain name system server is used to query the target operator information corresponding to the target domain name from the decision module in the data center intranet, and obtain the target Internet Protocol address corresponding to the target domain name through a second domain name system server provided by the target operator, and then store the target Internet Protocol address in the decision module;
[0134] A receiving module 82, configured to receive the target Internet Protocol address from the first domain name system server;
[0135] The sending module 81 is further used to send an access request to a router in the data center intranet, the access request including the target Internet Protocol address, the router is used to query the target operator information corresponding to the target Internet Protocol address from the decision module, and forward the access request to a first egress server provided by the target operator, and the first egress server is used to forward the access request to a public network server provided by the target operator.
[0136] Figure 8 The external network access device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment, and its implementation principle and technical effect are similar and will not be repeated here.
[0137] Fig. 9 The schematic diagram of the structure of the external network access device provided in the embodiment of the present disclosure. The external network access device is configured in the first domain name system server in the intranet of the data center. The external network access device provided in the embodiment of the present disclosure can execute the processing flow provided in the embodiment of the external network access method, such as Fig. 9 As shown, the external network access device 90 includes:
[0138] A receiving module 91 is used to receive a domain name resolution request sent by any basic unit in the container cluster management system, wherein the domain name resolution request includes a target domain name to be resolved, and the container cluster management system is located in the intranet of the data center;
[0139] A query module 92, configured to query target operator information corresponding to the target domain name from a decision module in the data center intranet;
[0140] An acquisition module 93, configured to acquire a target Internet Protocol address corresponding to the target domain name through a second domain name system server provided by the target operator;
[0141] The sending module 94 is used to send the target Internet Protocol address to any of the basic units.
[0142] Optionally, the sending module 94 is further used to: send the target Internet Protocol address corresponding to the target domain name to the decision module, and the decision module is used to store the corresponding relationship between the target domain name and the target Internet Protocol address.
[0143] Optionally, the sending module 94 is also used to: for a preset domain name, send detection information to second export servers respectively provided by multiple operators, each second export server is used to send the detection information to the second domain name system server provided by its corresponding operator, and the second domain name system server provided by the same operator is used to send feedback information to the second export server provided by the same operator; the receiving module 91 is also used to: receive the feedback information from the second export servers respectively provided by the multiple operators; the external network access device 90 also includes: a determination module 95, used to determine, for each operator, the delay and / or packet loss rate from sending the detection information to receiving the feedback information; and determine the operator with the lowest delay and / or the lowest packet loss rate as the operator corresponding to the preset domain name; the sending module 94 is also used to store the preset domain name and the operator information corresponding to the preset domain name in the decision module.
[0144] Optionally, the preset domain name is a domain name whose access times or access frequency is greater than or equal to a preset threshold.
[0145] Optionally, the detection information includes the preset domain name, and the feedback information includes the public Internet Protocol address corresponding to the preset domain name; when the sending module 94 stores the preset domain name and the operator information corresponding to the preset domain name in the decision module, it is specifically used to: store the preset domain name, the operator information corresponding to the preset domain name, and the public Internet Protocol address corresponding to the preset domain name in the decision module.
[0146] Fig. 9 The external network access device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment, and its implementation principle and technical effect are similar and will not be repeated here.
[0147] Fig.10The schematic diagram of the structure of the external network access device provided in the embodiment of the present disclosure. The external network access device is configured in a router in the intranet of a data center. The external network access device provided in the embodiment of the present disclosure can execute the processing flow provided in the embodiment of the external network access method, such as Fig.10 As shown, the external network access device 100 includes:
[0148] The receiving module 1001 is used to receive an access request sent by any basic unit in the container cluster management system, wherein the access request includes a target Internet protocol address, and the container cluster management system is located in the intranet of the data center;
[0149] A query module 1002, configured to query target operator information corresponding to the target Internet Protocol address from a decision module in the data center intranet;
[0150] The sending module 1003 is used to forward the access request to a first egress server provided by the target operator, and the first egress server is used to forward the access request to a public network server provided by the target operator.
[0151] Fig.10 The external network access device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment, and its implementation principle and technical effect are similar and will not be repeated here.
[0152] Fig.11 The schematic diagram of the structure of the external network access device provided in the embodiment of the present disclosure. The external network access device is configured in the decision module in the intranet of the data center. The external network access device provided in the embodiment of the present disclosure can execute the processing flow provided in the embodiment of the external network access method, such as Fig.11 As shown, the external network access device 110 includes:
[0153] A receiving module 111 is configured to receive a first query request sent by a first domain name system server in the data center intranet, wherein the first query request includes a target domain name;
[0154] The sending module 112 is used to return the target operator information to the first domain name system server when the corresponding relationship between the target domain name and the target operator information is stored locally, and the first domain name system server is used to obtain the target Internet Protocol address corresponding to the target domain name through the second domain name system server provided by the target operator;
[0155] The receiving module 111 is further used to: receive a target Internet Protocol address corresponding to the target domain name from the first domain name system server; receive a second query request sent by a router in the data center intranet, wherein the second query request includes the target Internet Protocol address;
[0156] The sending module 112 is further used to return the target operator information corresponding to the target Internet Protocol address to the router, the router is used to forward the access request containing the target Internet Protocol address to the first egress server provided by the target operator, and the first egress server is used to forward the access request to the public network server provided by the target operator.
[0157] Optionally, the sending module 112 is further used to: when there is no corresponding relationship between the target domain name and the target operator information locally, return the default operator information to the first domain name system server, the first domain name system server is used to obtain the target Internet Protocol address corresponding to the target domain name through the second domain name system server provided by the default operator, and the router is used to forward the access request containing the target Internet Protocol address to the first export server provided by the default operator.
[0158] Optionally, the receiving module 111 is also used to: receive the preset domain name sent by the first domain name system server, and the operator information corresponding to the preset domain name, the operator corresponding to the preset domain name is the operator with the lowest delay and / or the lowest packet loss rate when detecting the preset domain name; the external network access device 110 also includes: a storage module 113, used to store the preset domain name sent by the first domain name system server, and the operator information corresponding to the preset domain name.
[0159] Optionally, the detection information for the preset domain name includes the preset domain name, and the feedback information for the detection information includes the public Internet Protocol address corresponding to the preset domain name; the receiving module 111 is specifically used to: receive the preset domain name sent by the first domain name system server, the operator information corresponding to the preset domain name, and the public Internet Protocol address corresponding to the preset domain name; the storage module 113 is specifically used to store the preset domain name sent by the first domain name system server, the operator information corresponding to the preset domain name, and the public Internet Protocol address corresponding to the preset domain name.
[0160] Fig.11 The external network access device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment, and its implementation principle and technical effect are similar and will not be repeated here.
[0161] In addition, the embodiment of the present disclosure further provides a data center intranet. Specifically, the data center intranet includes a container cluster management system, a first domain name system server, a decision module, and a router. The container cluster management system includes a basic unit;
[0162] The basic unit is used to send a domain name resolution request to the first domain name system server, wherein the domain name resolution request includes a target domain name to be resolved;
[0163] The first domain name system server is used to query the target operator information corresponding to the target domain name from the decision module, and obtain the target Internet Protocol address corresponding to the target domain name through the second domain name system server provided by the target operator and store the target Internet Protocol address in the decision module, and the decision module is used to store the corresponding relationship between the target domain name and the target Internet Protocol address;
[0164] The basic unit is used to receive the target Internet Protocol address from the first domain name system server and send an access request to the router, wherein the access request includes the target Internet Protocol address;
[0165] The router is used to query the target operator information corresponding to the target Internet Protocol address from the decision module, and forward the access request to a first egress server provided by the target operator, and the first egress server is used to forward the access request to a public network server provided by the target operator.
[0166] Optionally, the first domain name system server is further used for:
[0167] For a preset domain name, detection information is sent to second egress servers respectively provided by multiple operators, each second egress server is used to send the detection information to a second domain name system server provided by its corresponding operator, and the second domain name system server provided by the same operator is used to send feedback information to the second egress server provided by the same operator;
[0168] receiving the feedback information from second egress servers respectively provided by the plurality of operators;
[0169] For each operator, determining a delay and / or a packet loss rate from sending the detection information to receiving the feedback information;
[0170] Determine the operator with the lowest delay and / or the lowest packet loss rate as the operator corresponding to the preset domain name;
[0171] The preset domain name and the operator information corresponding to the preset domain name are stored in the decision module, and the target operator information is the operator information corresponding to the preset domain name matching the target domain name.
[0172] Optionally, the preset domain name is a domain name whose access times or access frequency is greater than or equal to a preset threshold.
[0173] Optionally, the detection information includes the preset domain name, and the feedback information includes a public Internet Protocol address corresponding to the preset domain name; when the first domain name system server stores the preset domain name and the operator information corresponding to the preset domain name in the decision module, it is specifically used to: store the preset domain name, the operator information corresponding to the preset domain name, and the public Internet Protocol address corresponding to the preset domain name in the decision module.
[0174] Optionally, if there is no preset domain name matching the target domain name in the decision module, the decision module is also used to return the default operator information to the first domain name system server; the first domain name system server is also used to obtain the target Internet Protocol address corresponding to the target domain name through the second domain name system server provided by the default operator; the router is also used to forward the access request containing the target Internet Protocol address to the first export server provided by the default operator.
[0175] Optionally, the Internet Protocol address of the basic unit is a source Internet Protocol address of the access request, and the first egress server is used to convert the source Internet Protocol address into the Internet Protocol address of the first egress server.
[0176] The internal functions and structure of the external network access device are described above. The device can be implemented as an electronic device. Fig.12 This is a schematic diagram of the structure of an electronic device embodiment provided by the present disclosure. Fig.12 As shown, the electronic device includes a memory 121 and a processor 122 .
[0177] The memory 121 is used to store programs. In addition to the above-mentioned programs, the memory 121 can also be configured to store various other data to support operations on the electronic device. Examples of these data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc.
[0178] The memory 121 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0179] The processor 122 is coupled to the memory 121 and executes the program stored in the memory 121 to implement the technical solution of the above method embodiment.
[0180] Further, if Fig.12 As shown, the electronic device may also include: a communication component 123, a power component 124, an audio component 125, a display 126 and other components. Fig.12 Only some components are shown schematically, which does not mean that the electronic device only includes Fig.12 Components shown.
[0181] The communication component 123 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 123 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 123 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0182] The power supply component 124 provides power to various components of the electronic device. The power supply component 124 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device.
[0183] The audio component 125 is configured to output and / or input audio signals. For example, the audio component 125 includes a microphone (MIC), and when the electronic device is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 121 or sent via the communication component 123. In some embodiments, the audio component 125 also includes a speaker for outputting audio signals.
[0184] The display 126 includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0185] In addition, an embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the method described in the above embodiment.
[0186] The exemplary embodiments of the present disclosure further provide a computer program product, including a computer program, wherein when the computer program is executed by a processor of a computer, it is used to enable the computer to implement the method described in the above embodiments.
[0187] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0188] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for accessing an external network, wherein: The method is applied to a data center intranet, the data center intranet includes a container cluster management system, a first domain name system server, a decision module, and a router, the container cluster management system includes a basic unit, and the method includes: The basic unit sends a domain name resolution request to the first domain name system server, wherein the domain name resolution request includes a target domain name to be resolved; The first domain name system server queries the target operator information corresponding to the target domain name from the decision module, obtains the target Internet Protocol address corresponding to the target domain name through the second domain name system server provided by the target operator, and stores the target Internet Protocol address in the decision module, wherein the decision module stores the correspondence between the target domain name and the target Internet Protocol address; The basic unit receives the target Internet Protocol address from the first domain name system server and sends an access request to the router, wherein the access request includes the target Internet Protocol address; The router queries the target operator information corresponding to the target Internet Protocol address from the decision module, and forwards the access request to a first egress server provided by the target operator, wherein the first egress server is used to forward the access request to a public network server provided by the target operator.
2. The method according to claim 1, wherein: The method further comprises: For a preset domain name, the first domain name system server sends detection information to second egress servers respectively provided by multiple operators, each second egress server is used to send the detection information to a second domain name system server provided by its corresponding operator, and the second domain name system server provided by the same operator is used to send feedback information to the second egress server provided by the same operator; The first domain name system server receives the feedback information from the second export servers respectively provided by the multiple operators; For each operator, the first domain name system server determines a delay and / or a packet loss rate from sending the detection information to receiving the feedback information; The first domain name system server determines the operator with the lowest delay and / or the lowest packet loss rate as the operator corresponding to the preset domain name; The first domain name system server stores the preset domain name and the operator information corresponding to the preset domain name in the decision module, and the target operator information is the operator information corresponding to the preset domain name matching the target domain name.
3. The method according to claim 2, wherein: The preset domain name is a domain name whose access times or access frequency is greater than or equal to a preset threshold.
4. The method according to claim 2, wherein: The detection information includes the preset domain name, and the feedback information includes a public Internet Protocol address corresponding to the preset domain name; Correspondingly, the first domain name system server stores the preset domain name and the operator information corresponding to the preset domain name in the decision module, including: The first domain name system server stores the preset domain name, the operator information corresponding to the preset domain name, and the public Internet Protocol address corresponding to the preset domain name in the decision module.
5. The method according to claim 1, wherein: If there is no preset domain name matching the target domain name in the decision module, returning the default operator information to the first domain name system server; The first domain name system server obtains a target Internet Protocol address corresponding to the target domain name through a second domain name system server provided by the default operator; The router forwards the access request including the target Internet Protocol address to a first egress server provided by a default operator.
6. The method according to claim 1, wherein: The Internet Protocol address of the basic unit is a source Internet Protocol address of the access request, and the first egress server is used to convert the source Internet Protocol address into the Internet Protocol address of the first egress server.
7. A data center intranet, wherein: The data center intranet includes a container cluster management system, a first domain name system server, a decision module, and a router, and the container cluster management system includes a basic unit; The basic unit is used to send a domain name resolution request to the first domain name system server, wherein the domain name resolution request includes a target domain name to be resolved; The first domain name system server is used to query the target operator information corresponding to the target domain name from the decision module, and obtain the target Internet Protocol address corresponding to the target domain name through the second domain name system server provided by the target operator and store the target Internet Protocol address in the decision module, and the decision module is used to store the corresponding relationship between the target domain name and the target Internet Protocol address; The basic unit is used to receive the target Internet Protocol address from the first domain name system server and send an access request to the router, wherein the access request includes the target Internet Protocol address; The router is used to query the target operator information corresponding to the target Internet Protocol address from the decision module, and forward the access request to a first egress server provided by the target operator, and the first egress server is used to forward the access request to a public network server provided by the target operator.
8. An electronic device, wherein: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.