Pergunta de entrevista da empresa IBM

Explain process when you type www.google.com and press enter. What is happening next ?

Resposta da entrevista

Sigiloso

13 de set. de 2016

1. The browser extracts the domain name from the URL. 2. The browser queries DNS for the IP address of the URL. 3. Browser checks its cached copy of the IP address, if not found its fwd’d to OS 4. OS checks its cached copy of the IP –if not found 5. A request is sent off to the system's configured DNS server. 6. The client machine knows the IP address for the DNS server, since its pre-configured. 7. The request sent to the DNS server as a single packet. 8. A request for content if fwd'd to the DNS server; via single packet includes the IP address it is destined for in its header. 9. If that DNS server has the address for the requested domain name, it will return it. 10. Otherwise, it will forward the query along to DNS server it is configured to defer to. This occurs recursively until the request is fulfilled or it reaches an authoritative name server. (If the authoritative name server doesn't recognize the domain, the response indicates failure and the browser generally gives an error like "Can't find the server at ....".) 11. Assuming the DNS request is successful, the client machine now has an IP that uniquely identifies a machine on the Internet. 12. The web browser then assembles an HTTP request, which consists of a header and optional content. 13. The header includes things like the specific path being requested from the web server, the HTTP ver., browser cookies, etc. 14. Request may include form data like a username and password etc. 15. This HTTP request is sent off to the web server host. 16. Once the request arrives at the webserver, it generates a response (this may be a static page or a more dynamic response) 17. The web server software sends the generated page back to the client. 18. Assuming the response is HTML (and not an image/data file), the browser parses (analyzes) the HTML to renders the page. 19. Part of this parsing and rendering process may be the discovery that the web page includes images or other embedded content that is not part of the HTML document. 20. The browser will then send off further requests (either to the original web server or different ones, as appropriate) to fetch the embedded content, which will then be rendered into the document as well.

1