On Mon, Sep 13, 2021 at 11:07:27AM +0200, Max-Julian Pogner <max-jul...@pogner.at> wrote:
> Hi there, > > when a user clicks "send", the email client has to make some tcp-connection > to some ip address. > what if the hostname configured at the email client resolves to multiple ip > addresses? > > i actually know the theory (either round-robin, or just the first, or try > first and if fail then try next, possibilities to react if server is running > but only makes garbage responses, etc..), but what behaviour do the "big" > email clients actually perform? > > i couldn't find the slightest answer using my google fu, nor does any email > client of interest to me (ms outlook, thunderbird, k-9, whatever iphone is > doing) seem to publish any kind of documentation in that regard. > > could someone suggest me a page to read next or google search word to try > out? > > best regards, > Max I just searched "what happens where dns query returns multiple ip addresses?" and found: https://serverfault.com/questions/264799/what-is-the-purpose-of-a-dns-server-returning-more-than-1-a-record/264804 https://serverfault.com/questions/102879/how-do-dns-clients-choose-an-ip-address-when-they-get-multiple-answers https://en.wikipedia.org/wiki/Round-robin_DNS One answer (by Wes Hardaker who knows things) says that the specifications say to ideally pick one at random, but that in practice, load balancers are used instead of multiple A/AAAA records. Other answers say that clients decide what to do, and that many web browsers try the first, but if that fails, try the next. That might be true, I suppose. Also, if the client can identify an address as being "closer", in terms of subnet or remembered round trip times, it might use that one. But that sounds more complicated than it's worth. That sort of optimization tends to be managed at the other end by Content Delivery Networks (CDNs). cheers, raf