rust-http icon indicating copy to clipboard operation
rust-http copied to clipboard

Perform DNS resolution in RequestWriter

Open chris-morgan opened this issue 12 years ago • 1 comments

DNS lookup was implemented in mozilla/rust#9000; the client needs to use this to look up a remote address based on the hostname.

I'm not certain what should happen in case of an unknown hostname.

I'm not certain what the deal is with regards to multiple IP addresses being returned.

chris-morgan avatar Sep 06 '13 12:09 chris-morgan

I assume you just want to use the first address. Maybe try each address in order until one resolves. Most DNS servers hand out the addresses in a different order (round robin) each time a client queries the server. It can have a load balancing effect if you always pick the first address in the list since other clients receive the list of IPs in a different order.

esummers avatar Apr 07 '14 22:04 esummers