janeczku/go-dnsmasq

Dual Dispatching of Lookups

gondor opened this issue · 3 comments

Hi, I'm really strongly considering using this in my cluster but ideally would like it to dispatch out to multiple servers and use the first response for fast resolution.

I don't mind forking this project and adding it if its not in your roadmap.

My question is: where would be the best spot to hook this functionality in?

I'm looking for an alternative to https://github.com/dcos/spartan . Spartan is in Erlang and not easy to install

Hi, i think this would make a great PR. It should be implemented as a configurable option though because go-dnsmasq should replicate glibc's resolver behavior by default (implementing the primary/secondary nameserver principle). The best place to hook this in would be the forwardQuery func https://github.com/janeczku/go-dnsmasq/blob/master/server/forwarding.go#L224. We could do a forwarder interface but i don't think it's necessary. Just add a forwardQueryParallel func and put your logic in there.

I would love to see this. @gondor let me know if I can help testing.

Closing this due to inactivity