Answer the question
In order to leave comments, you need to log in
How do browsers behave when they receive multiple A-records from dns?
Subject.
And if there is any behavior if the server does not respond for a long time on this record? What if you sent an error?
Will he try next time to send a request to another ip? Or will he try to send the same request?
Answer the question
In order to leave comments, you need to log in
Depends on the browser. In general, it is divided into 2 groups:
1) (normal browsers) choose the first IP from the system resolver response (or whatever is in Windows instead) - A-records are usually sent in random order - and go to this IP with an http (s) request. Failed - show error.
2) (very smart) go to the first IP, try to do a TCP handshake. If it doesn't work, go to the next one. And so on until the end. _But_ the next ip is taken only and only if the handshake failed. If the server slows down / timeouts in 60 seconds / responds with a 5/4xx error, then the browser will not go to the next one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question