Amazon Interview Question


Country: India
Interview Type: Phone Interview




Comment hidden because of low score. Click to expand.
0
of 0 vote

When you type Amazon.com in firefox or any other browser first checks the corresponding name in local cache of the browser.
If 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

- scofield2390 January 19, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

You cant have a TCP connection. DNS works on UDP.

- Anin January 19, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

its after u get a DNS address, the browser opens a TCP connection.

- scofield2390 January 20, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

For legacy purposes DNS can work on TCP and UDP, mostly is UDP based, however production networks usually consider DNS in TCP and UDP.

- Carlos January 21, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

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 ?

- geekopedia January 21, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

You just forgot to mention the browser shall find out the protocol to use first, since the "amason.com" does not contain the protocol prefix like "http:\//".

- tsichevski January 21, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Have a look at

tldp.org/HOWTO/Unix-and-Internet-Fundamentals-HOWTO/internet.html

- abc January 22, 2012 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More