Akamai Interview Question
Software Engineer / DevelopersCountry: -
It looks up the URL Host name in DNS cache (see ipconfig /flushdns) then it checks the real dns(see google dns) which maps the domain to an ip.
There is probably a slightly altered route for local DNS lookups (for domains).
Then the browser makes a get request to that url.
Go get fiddler to see the request.
Then the server gets the request.
Then the server parses the URLs/cookies/querystrings/etc and returns a response such as a web page with a 200 response. Sometimes it returns a 302 or 301 redirect. Sometimes it returns a 404 for file not found or 500 for error (Search google for http status codes for full list)
Then the browser parses the response.
It uses http header to know if its a text/html file or some other file which should pop a download dialog.
Then it also does some content sniffing if it does not believe the Http Header content type.
Assuming it is a web page it then parses the markup and turns it into DOM.
When it comes across Images/CSS/JS/Object tags it checks cache and if not in cache it makes network requests...
...
0, Prepares the message to be sent to server
1, DNS Lookup for corresponding IP Address
2, Check whether IP Address belongs to locla network
2.1 Finds local network address adn matches against target address (Sub-net mask used here)
2.1.1 If address belongs to the same network-
2.1.1.1 Sends ARP messsage to find out MAC Address of machine
2.1.1.2 AFter finding out the MAC, sends message directed to that machine
2.1.2 If address belongs to the same network
2.1.2.1 Sends message to default gateway
2.1.2.2 Forwards message based on local routing table, to the router which owns that network address
2.1.2.3 This proecss repeats from step-2 onwards at each hop
3, Message reaches the server
4, Corresponding message sent back by server
5, Message reachse client following same method as step-2
6, Message if parsed by browser ...
It will be mapped to its IP address in the backend
- sureendarraju October 04, 2011