Field of the Invention
The present invention generally relates to optimization of network connections. More specifically, the present invention relates to selection of an optimal server for internet data transfer from a list of internet protocol (IP) addresses identified by a Domain Name System (DNS) server.
Description of the Related Art
Network-based data communications are useful for a variety of tasks, such as sending and receiving emails, browsing Internet web pages, browsing intranet private network portals, sending and receiving instant messages, telephone calls over voice-over-internet-protocol (VOIP) services, and video calls.
The Domain Name System (DNS) is a hierarchical distributed naming system for computers, services, or any resource connected to the Internet or a private network. It associates various information with domain names assigned to each of the participating entities. Most prominently, it translates domain names, which can be easily memorized by humans, to the numerical IP addresses needed for the purpose of computer services and devices worldwide. The Domain Name System is an essential component of the functionality of most Internet services because it is the Internet's primary directory service.
Typically, a user device sends a DNS request to a DNS server identifying a domain. The DNS server will respond with a DNS response that lists internet protocol (IP) addresses corresponding to that domain, or if it does not have that information, will recursively ask other DNS servers until it does. The user device then typically selects one of the IP addresses from the DNS response and makes a connection (e.g. a TCP connection) and transmits data to a selected server associated with the selected IP address and with the domain identified in the DNS request.
Typically, user devices simply pick the first IP address listed in the DNS response. The DNS server generally circles the order of the listed IP addresses using a round robin approach, thus directing a similar number of user devices to each server listed in the DNS response.
However, not all servers or network connections are equal—some servers may be physically farther away than others from the user device, and it may require more “hops” through other servers and network devices for data to get from the user device to such a faraway server. Some connections between the user device and a particular server may be limited in terms of bandwidth, may have a high latency, or may have a high packet loss rate.
Therefore, there is a need for an improved IP address selection to optimize network connections.
One exemplary method for domain server communication includes receiving a domain name system (DNS) response packet over a communication network, the domain name system (DNS) response packet identifying a plurality of internet protocol (IP) addresses corresponding to a domain name. The method also includes transmitting a plurality of probe packets by transmitting a probe packet to each server of a plurality of servers, the plurality of servers corresponding to the plurality of internet protocol (IP) addresses identified in the domain name system (DNS) response packet. The method also includes receiving one or more probe return packets by receiving a probe return packet from each server of at least a subset of the plurality of servers. The method also includes calculating one or more connection parameters based on at least the receipt of the one or more probe return packets, the one or more connection parameters associated with one or more connections, the one or more connections each having an endpoint at one server of at least the subset of the plurality of servers from which a probe return packets have been received. The method also includes selecting a selected server of the plurality of servers based on at least the calculated one or more connection parameters. The method also includes communicating with the selected server.
One exemplary system for domain server communication includes a communication transceiver that is communicatively coupled to at least a plurality of servers and a domain name system (DNS) server over a communication network. The system also includes a processor coupled to a memory and to the communication transceiver. Execution of instructions stored in the memory by the processor performs a variety of system operations. The system operations include receiving a domain name system (DNS) response packet via the communication transceiver over the communication network, the domain name system (DNS) response packet identifying a plurality of internet protocol (IP) addresses corresponding to a domain name. The system operations also include transmitting a plurality of probe packets via the communication transceiver by transmitting a probe packet to each server of the plurality of servers, the plurality of servers corresponding to the plurality of internet protocol (IP) addresses identified in the domain name system (DNS) response packet. The system operations also include receiving one or more probe return packets via the communication transceiver by receiving a probe return packet from each server of at least a subset of the plurality of servers. The system operations also include calculating one or more connection parameters based on at least the receipt of the one or more probe return packets, the one or more connection parameters associated with one or more connections, the one or more connections each having an endpoint at one server of at least the subset of the plurality of servers from which a probe return packets have been received. The system operations also include selecting a selected server of the plurality of servers based on at least the calculated one or more connection parameters. The system operations also include communicating with the selected server via the communication transceiver.
One exemplary non-transitory computer-readable storage medium may have embodied thereon a program executable by a processor to perform a method for domain server communication. The exemplary program method includes receiving a domain name system (DNS) response packet over a communication network, the domain name system (DNS) response packet identifying a plurality of internet protocol (IP) addresses corresponding to a domain name. The method also includes transmitting a plurality of probe packets by transmitting a probe packet to each server of a plurality of servers, the plurality of servers corresponding to the plurality of internet protocol (IP) addresses identified in the domain name system (DNS) response packet. The method also includes receiving one or more probe return packets by receiving a probe return packet from each server of at least a subset of the plurality of servers. The method also includes calculating one or more connection parameters based on at least the receipt of the one or more probe return packets, the one or more connection parameters associated with one or more connections, the one or more connections each having an endpoint at one server of at least the subset of the plurality of servers from which a probe return packets have been received. The method also includes selecting a selected server of the plurality of servers based on at least the calculated one or more connection parameters. The method also includes communicating with the selected server.
A user device, in trying to communicate with an internet resource knowing an associated domain name, transmits a Domain Name System (DNS) request packet to a DNS server, which responds with a DNS response packet identifying multiple Internet Protocol (IP) addresses corresponding to multiple servers associated with the identified domain name. The user device then selects one of these servers and communicates with that selected server. The user device may select the server by probing properties of the servers and of the connections between the user device and each of the servers, and by then picking the server whose own properties and whose connection properties are better. The user device probes these properties by sending at least one set of probe packets to each server and receiving at least one set of probe return packets and calculating round trip time, hop distance, bandwidth, latency, packet loss rate, and other properties.
The user device 100 of
Once the DNS server 115 receives the packet A 130, it reads the domain name identified in the packet A 130 and searches through information stored at the DNS server 115 for at least one internet protocol (IP) address of at least one server associated with that domain name. In the DNS server 115 cannot find any IP addresses matching the domain name, it may ask another DNS server for the information. If the second DNS server cannot find any IP addresses matching the domain name, it may ask yet another DNS server for the information, and so on, recursively, until one or more IP addresses corresponding to the domain name are identified or until the DNS servers 115 collectively determine that the domain name is invalid and return an error (not shown) to the user device 100.
Once the DNS server(s) 115 have identified a set of one or more IP addresses corresponding to a set of one or more servers (e.g., domain server set 120 of
Once the user device 100 receives the packet B 135 from the DNS server(s) 115, it reads through the packet B 135 to find the listing of the IP addresses of the domain server set 120, which is simulated in a readable pseudo code format in the illustration of
The selected IP address associated with the selected server 125 may be selected by the user device 100 using a number of approaches. One such approach that a user device 100 can take is to simply select the first IP address listed in the DNS response (e.g., in packet B 135 of
Another approach to selecting an IP address by the user device 100 is that the user device 100 may pick the IP address from the IP addresses listed in the DNS response (e.g., in packet B 135 of
Yet another approach to selecting an IP address by the user device 100 involves sending one or more probe packets from the user device 100 to each server of the domain server set 120 as illustrated in
Once the user device 100 selects the selected IP address corresponding to the selected server 125, the user device 100 then transmits a packet C 140 to the selected server 125. The packet C 140 may include information that the user device 100 originally intended to get to a server associated with the domain name, and may for example include a Hypertext Transfer Protocol (HTTP) request, a File Transfer Protocol (FTP) request, a Simple Mail Transfer Protocol (SMTP) request, a secure variant of any of these (e.g. using Secure Sockets Layer or Transport Layer Security protocols), or some combination thereof.
Each of the user device 100, the DNS server(s) 115, and the domain server set 120 may include at least one variant of computer system 700 identified in
It should be understood that the network connection labeled “internet 110” in
In particular, the domain server set 120 illustrated in
The selected server 125, as illustrated in
In particular, the packet B 135 may include data exemplified by the PACKET_B_DNS_RESPONSE_INFO 300 of
The user device 100 may use the DNS response information 300 of
The traceroute operation illustrated in
As illustrated in
Once each server of the domain server set 120 receives its probe packet of the probe packets 510, the server transmits a probe return packet back to the user device 100. The user device 100 will thus receive a set of one or more probe return packets 520 from at least a subset of the servers of the domain server set 120. The user device 100 might not receive a probe return packet from all of the servers in the domain server set 120, for example if one of the servers is down or experiencing errors, or if the packet is lost due to a high packet loss rate of an unreliable (e.g., congested) connection, or if the connection to the server is overly congested, faulty, or severed. The probe return packets 520 may be ACK packets using a TCP protocol.
The user device 100 may optionally send a set of reset packets 530 to the domain server set 120, so that each server of the domain server set 120 receives a reset packet from the user device 100. The reset packets 530 may be used to reset the connections between the user device 100 and each server of the domain server set 120. The reset packets 530 may be RST packets using a TCP protocol. Note that the RST packets 530 are only needed if the probe packets 510 use TCP probing. If the probe packets 510 instead use ICMP probing or UDP probing, there is no need for the RST packets 530.
The user device 100 may measure how much time has elapsed between the transmission of each of the probe packets 510 and receipt of each of the corresponding probe return packets 520. From this, the user device 100 may determine a round trip time (RTT) for each connection between the user device 100 and each server of the domain server set 120. The user device 100 may also optionally use the probe packets 510 and probe return packets 520 to determine a hop distance between the user device 100 and each server of the domain server set 120 using a traceroute process as illustrated in
In some cases (not pictured), the process described above, at least including the transmission of a set of probe packets by the user device 100 and the receipt of a set of probe return packets 520, may be repeated a predetermined number of times, for example to test reliability of servers over time, to get a more accurate average round trip time (average RTT) or hop distance value for each server by averaging consecutive round trip times (RTTs) or hop distances for each server of the domain server set 120, or to get a better idea of packet loss rate or bandwidth in each connection.
Once the user device 100 receives the probe return packets 520 from at least a subset of the domain server set 120, it may use the information it has gathered to make its decision about which server it will select from the domain server set 120 to be the selected server 125. It may, for example, pick the server with the shortest round trip time (RTT), the server that is the shortest hop distance away, the server whose connection has the best bandwidth, the server whose connection has the best latency, the server whose connection has the best packet loss rate, the server with the fastest/best hardware setup, the server with the fastest/best software setup, or some combination thereof (e.g., a heuristic may be calculated that takes several of these factors into account—in which some factors may optionally have more weight/importance than others).
The table of
The first three packets, identified by numbers 605, 610, and 615, are probe packets sent from the IP address 250 of the user device 100 (marked by a humanoid icon). Probe packet 605 is sent to IP address 215 (marked by a star icon). Probe packet 610 is sent to IP address 220 (marked by a triangle icon). Probe packet 615 is sent to IP address 210 (marked by a cross icon).
The third, fifth, and seventh packets, identified by numbers 620, 630, and 640, are probe return packets sent back to the user device 100 (marked by a humanoid icon). Probe packet 620 is sent from IP address 215 (marked by a star icon). Probe packet 630 is sent to IP address 220 (marked by a triangle icon). Probe packet 640 is sent to IP address 210 (marked by a cross icon).
The round trip time (RTT) of the connection between the user device 100 and the server corresponding to the IP address 215 (marked by a star icon) is 0.016666 milliseconds. The round trip time (RTT) of the connection between the user device 100 and the server corresponding to the IP address 220 (marked by a triangle icon) is also 0.016666 milliseconds. The round trip time (RTT) of the connection between the user device 100 and the server corresponding to the IP address 210 (marked by a cross icon), however, is 0.166666 milliseconds.
Therefore, if the user device 100 is basing its decision of selected server 125 purely on round trip time (RTT), it should pick either the server corresponding to the IP address 215 (marked by a star icon) or the server corresponding to the IP address 220 (marked by a triangle icon), which have an equally short round trip time (RTT) of 0.016666 milliseconds, rather than the server corresponding to the IP address 210 (marked by a cross icon), which has a significantly longer round trip time (RTT) of 0.166666 milliseconds. Note that while
The fifth packet 625, the seventh packet 635, and the ninth packet 645 all represent a second transmission from the user device 100 to each of the server corresponding to the IP address 215, the server corresponding to the IP address 220, and the server corresponding to the IP address 210, respectively. These may represent be the reset packets 530. Alternately, these could represent a second set of probe packets 510. These have been left unmarked to visually bring more attention to the initial probe packets 510 and probe return packets 520 of
The components shown in
Mass storage device 730, which may be implemented with a magnetic disk drive or an optical disk drive, is a non-volatile storage device for storing data and instructions for use by processor unit 710. Mass storage device 730 can store the system software for implementing embodiments of the present invention for purposes of loading that software into main memory 710.
Portable storage device 740 operates in conjunction with a portable non-volatile storage medium, such as a floppy disk, compact disk or Digital video disc, to input and output data and code to and from the computer system 700 of
Input devices 760 provide a portion of a user interface. Input devices 760 may include an alpha-numeric keypad, such as a keyboard, for inputting alpha-numeric and other information, or a pointing device, such as a mouse, a trackball, stylus, or cursor direction keys. Additionally, the system 700 as shown in
Display system 770 may include a liquid crystal display (LCD), a plasma display, an organic light-emitting diode (OLED) display, an electronic ink display, a projector-based display, a holographic display, or another suitable display device. Display system 770 receives textual and graphical information, and processes the information for output to the display device. The display system 770 may include multiple-touch touch screen input capabilities, such as capacitive touch detection, resistive touch detection, surface acoustic wave touch detection, or infrared touch detection. Such touch screen input capabilities may or may not allow for variable pressure or force detection.
Peripherals 780 may include any type of computer support device to add additional functionality to the computer system. For example, peripheral device(s) 780 may include a modem or a router.
The components contained in the computer system 700 of
In some cases, the computer system 700 may be part of a multi-computer system that uses multiple computer systems 700 (e.g., for one or more specific tasks or purposes). For example, the multi-computer system may include multiple computer systems 400 communicatively coupled together via one or more private networks (e.g., at least one LAN, WLAN, MAN, or WAN), or may include multiple computer systems 700 communicatively coupled together via the internet (e.g., a “distributed” system), or some combination thereof.
While various flow diagrams provided and described above may show a particular order of operations performed by certain embodiments of the invention, it should be understood that such order is exemplary (e.g., alternative embodiments can perform the operations in a different order, combine certain operations, overlap certain operations, etc.).
The foregoing detailed description of the technology has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the technology to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. The described embodiments were chosen in order to best explain the principles of the technology, its practical application, and to enable others skilled in the art to utilize the technology in various embodiments and with various modifications as are suited to the particular use contemplated. It is intended that the scope of the technology be defined by the claim.