Amazon Interview Question
Software Engineer / DevelopersCountry: United States
Interview Type: In-Person
At application level, it follows below:
1. client send request to container(web container say server).
2. container checks if it is available or can it be generated dynamically (through servlets).
3. container send the response in particular format that client sent in the request header (e.g; displays web page on browser if format is "html")
1. you enter the url.
2. url DNS to IP address resolve.
2.1 kickin any loadbalancer etc listening to one IP and routing request to a specific server
3 generate a http request GET to server.
4. server recieve get request, and process the request
4.1 http.sys get request, send to app pool
4.2 worker process in app pool pick up and process the request.
4.3 authentication, authorization if required
4.4 fetch data from database etc if required, include addiitonal processing
4.5 request handler generate a response.
5. server send response back to client in html
6. browser render html, if required send request for other URLs
serving a web page to a client can mean 2 diffrt things... the first is that we knoe the address of the page that we are searching for...dns will give us the reqd ip adress... arp and rarp will look for that ip address.... and the second and a little complex is searching via a search engine.. a search engine has 3 parts.. the first one is crawler.. it comprise of huge number of computers that crawl through millions of pages on a daily basis.. delete pages that have expired and add the new ones in the index... then comes indexing the web pages that are found by crawler.... this is one with the help of hundreds of factors.. the metric used for measuring importance of a web page is PAGE RANK.. the bettr rank.. the relevant ur page is to that query.. this is indexing.....atlast is serving the desired pages... this is again based on page rank... more relevant pages are displayed first..
- ayushsethi22031992 September 29, 2013