Posted July 30, 2019
Behind the scenes we’ve been upgrading the SlickDNS name servers. Apart from better performance, this update is frankly not very exciting, but we thought it would be fun to add a visualization of the work that the SlickDNS name servers do quietly behind the scenes.
Running an authoritative DNS hosting service like SlickDNS means that most of our “users” are actually computers, or caching DNS servers, typically in ISPs, which make DNS queries on behalf of their human customers.
When a caching name server queries the SlickDNS name servers, we can do an IP geolocation on the remote server’s IP address to get an approximate real-world location of the remote server, which can then be displayed on a map.
We’ve done exactly this to create the SlickDNS live DNS query map!
How does it work? Basically an agent running on the SlickDNS name servers takes a random sample every second of the IP address of a remote querying server. That IP address is then pushed to a central server which does an IP geolocation, and pushes the latitude and longitude location of the remote server to any web clients which have loaded the live query map web page. Those map locations are then drawn by the web browser onto a world map to complete the visualization.
The entire process, from a query being received by a SlickDNS name server, to the querying server’s location being drawn on the map, takes at most two seconds. And it has no impact on the performance of the regular SlickDNS website since the IP geolocation server runs in an independent Heroku app.
The following technologies were used to create the live query map: