Author: Stan

  • Surviving the Hacker News “hug of death”

    A quick article to mention that one of my articles on the DNS requests made by iPhones made the front page of Hacker News for a few hours. (and it got a lot of interesting comments!)

    When your post gets on the front page, there is what we call in the community the “HN hug of death”. It describes the huge traffic you will see on the URL you shared, and sometimes your site becomes unresponsive because the server is bloated.

    To be totally honest, I didn’t suffer from it because this blog is running with a very tiny CMS (almost a static website), the server is not a small VM and the front end is not bloated with dozens of requests.

    I got 10 114 unique visitors to the blog post from Hacker News on that day, so with a well-optimized website, everything should be fine!

  • High number of DNS requests made by iOS devices

    I run a simple ad blocker based on AlgoVPN. It is a simple adblocker for iOS devices. It blocks requests at the DNS level, so it is network-wide and thus very efficient.

    The connections are strictly anonymous and very secure (the code is here), but I anonymously log the DNS requests. It is a way of monitoring the usages of my servers.

    When I tested the service on my device, I discovered that iOS communicated non-stop with Apple servers. I thought it was linked to the Push services, but I looked into the logs and here are the concerned domains that are iOS-related:

    apple.com
    icloud.com
    akamaiedge.net
    akamadns.net
    apple-dns.net
    akamai.net
    akadns.net
    cdn-apple.com
    aaplimg.com

    Here is a screenshot showing the unexpected number of requests your phone makes. Notice the activity between 3AM and 5AM (I swear I was sleeping haha).

    I haven’t tried on Android devices, but it should be interesting as well. Another experiment would be to block these domains and see the impact on your battery life 😉

    UPDATE:

    Here is what it looks like with more devices. Observe the difference of requests between the two graphs.

    Here is a breakdown of all concerned hosts in a light csv file.

    Read more on the Hacker News discussion.