|
|
|
|
|
by tylfin
2122 days ago
|
|
Yeah, I've never had to implement my own DNS cache for a language before... If you're on a system with cgo available, you can use `GODEBUG=netdns=cgo` to avoid making direct DNS requests. This is the default on MacOS, so if it was running on four Mac Pro's I wouldn't expect it to be the root cause. |
|
To make DNS resolution really scale, we ended up moving all the DNS caching and resolution directly into Go. Not sure that's how you'd do it today, I'm sure Go has changed a lot. Building your own DNS resolver is actually not so hard with Go, the following were really useful:
https://idea.popcount.org/2013-11-28-how-to-resolve-a-millio...
https://github.com/miekg/dns