Mehdi Akiki

Posts tagged "dns"

  • Published on

    Investigation · Part 8 of 10 · Following a TCP connection

    How a Name Becomes an Address: What getaddrinfo Really Does

    Connecting to localhost took 77 microseconds and connecting to 127.0.0.1 took 12, to the same server. I followed getaddrinfo with strace: four sources tried in order, files read on every call, answers sorted with IPv6 first, and a lookup that blocks the thread.