Amazon Interview Question
Country: India
Interview Type: Phone Interview
For legacy purposes DNS can work on TCP and UDP, mostly is UDP based, however production networks usually consider DNS in TCP and UDP.
This is what I said. I failed to explain how an HTTP request is sent to the server once the ip is determined. He wanted to know what is the default DNS flush timeout in most OSes. Any document that you can share which gives complete flow ?
When you type Amazon.com in firefox or any other browser first checks the corresponding name in local cache of the browser.
- scofield2390 January 19, 2012If the address corresponding to the name is found it first decodes the page and gives the appropriate response.
else
if it is not found in the local cache , then it asks the OS to get the IP address through DNS involvement. DNS gives the corresponding address. Next browser opens a TCP connection for the corresponding address and sends the HTTP request through the TCP connection.
Browser may close the connection or keep it alive according to specifications.If the address is cachable, it stores it in local cache of the browser.Next it decodes the page and gives the appropriate response.
Caches can be flushed at user defined options. They can be flushed regularly if u start the browser every time or after a fixed interval or event driven(i.e. when some thing is changes).
Sometimes they can be manually poised which is also known as DNS poisoning due to some malacious code or unsafe sites. use ipconfig /flushdns to clear the DNS