ON-THE-FLY REVERSE MAPPING
In accordance with the invention, embodiments of a DNS server, a DNS proxy process, and an intermediate server (IMS) are described. The DNS server, DNS proxy process, and intermediate server (IMS) described herein utilize a destination IP address for a destination device in on-the-fly reverse mapping operations in order to accurately provide a hostname originally requested by the client device.
1 . A domain name system (DNS) server comprising:
a receiver to receive a hostname from a client device, wherein the hostname corresponds to a destination device;
a forward mapping engine to obtain a destination internet protocol (IP) address for the destination device based on the hostname received from the client device; and
a reverse mapping engine to generate and store on-the-fly a reverse mapping in a local cache, wherein the reverse mapping defines a correlation between:
the hostname; and
the destination IP address for the destination device.
2 . The DNS server of claim 1 , wherein the reverse mapping engine is further configured to store the reverse mapping in the local cache after obtaining the destination IP address and before sending the destination IP address to the client device.
3 . The DNS server of claim 1 , wherein the reverse mapping engine is implemented within internal logic code, and the internal logic code comprises a reverse mapping hook to trigger storing the reverse mapping in the local cache during forward mapping operations between the client device and the DNS server.
4 . The DNS server of claim 3 , wherein the internal logic code further comprises an address selection hook to trigger selection of a single destination IP address in response to retrieving multiple destination IP addresses corresponding to the hostname of the destination device, wherein the address selection hook triggers discarding all of the destination IP addresses except for the selected destination IP address.
5 . The DNS server of claim 3 , wherein the internal logic code further comprises a time-to-live (TTL) hook to set a TTL parameter to zero, wherein the TTL parameter is indicative of a time during which the forward mapping is considered valid.
6 . The DNS server of claim 1 , further comprising:
a plurality of front ends, wherein each front end comprises:
a DNS proxy process; and
a proxy cache; and
a load balancer coupled to each of the plurality of front ends, wherein the load balancer is configured to send all network requests from the source IP address for the client device to the same front end throughout a client session for the client device.
7 . The DNS server of claim 6 , wherein each front end further comprises an intermediate server (IMS) to communicate with the corresponding DNS proxy process, wherein the intermediate server is configured to send a reverse mapping query to the corresponding DNS proxy process to obtain the hostname of the destination device in response to receiving a packet from the client device directed to the destination IP address of the destination device.
8 . A domain name system (DNS) proxy process comprising:
internal logic code stored on a computer readable storage medium, the internal logic code comprising instructions to perform operations, when executed on a computer, for IP address mapping, wherein the operations comprise:
obtaining a destination internet protocol (IP) address for a destination device based on a corresponding hostname received from a client device;
storing a forward mapping in a local cache, wherein the forward mapping defines a correlation between:
the destination IP address for the destination device; and
the hostname; and
storing on-the-fly a reverse mapping in the local cache, wherein the reverse mapping defines a correlation between:
the hostname; and
the destination IP address for the destination device.
9 . The DNS proxy process of claim 8 , wherein the internal logic code comprises further instructions to perform further operations comprising:
sending the destination IP address of the destination device to the client device; and
storing the reverse mapping in the local cache after obtaining the destination IP address and before sending the destination IP address to the client device.
10 . The DNS proxy process of claim 8 , wherein the internal logic code comprises further instructions to perform further operations comprising:
selecting a single destination IP address from a plurality of destination IP addresses corresponding to the hostname of the destination device; and
discarding all of the destination IP addresses except for the selected destination IP address.
11 . The DNS proxy process of claim 8 , wherein the internal logic code comprises further instructions to perform further operations comprising setting a TTL parameter to zero, wherein the TTL parameter is indicative of a time during which the forward mapping is considered valid.
12 . An intermediate server of a domain name system (DNS) server, the intermediate server comprising:
internal logic code stored on a computer readable storage medium, the internal logic code comprising instructions to perform operations, when executed on a computer, for processing network packet requests, wherein the operations comprise:
receiving a network packet from a client device, wherein the network packet comprises a destination IP address corresponding to a destination device;
sending a reverse mapping query to a corresponding DNS proxy process to obtain a hostname of the destination device, wherein the reverse mapping query comprises the destination IP address; and
receiving the hostname of the destination device from the DNS proxy process.
13 . The intermediate server of claim 12 , wherein the internal logic code comprises further instructions to perform operations to maintain a log of hostnames, including the hostname for the destination device, corresponding to the source IP address of the client device.