story behind a page hit – for newbies
when you type a URL in the web browser and hit enter to view the desired webpage, you generate a HTTP GET request. this request packet is passed on to your preferred[this is set in your machine's TCP/IP settings] DNS server. this server tries to retrieve the IP address of the URL you requested for. on success, this request is forwarded to a nearest router. this router again forwards your request to some other router that it thinks is on the way to the desired IP address. this forwarding is called a hop. after many hops, the request finally hits the port 80 [80 is the default, it may be some other number>1024] of the web server you requested for. at this point, you have sent a hit to this web server. this process usally takes < 2 secs.
the web sever reads the GET request it received, and tries to resolve it. if the request gets resolved, the webserver is suppoed to process the request and start sending out data/webpage (with a status code 200. i.e. successful) requested for. this totally depends on the servers cpacity and script performance to push out data as quickly as possible.
this data is split into numerous TCP/IP packets and thrown on the net. these TCP/IP packets know their destination and thier their position in the full document. they tell their destination to a router, which inturn throws them to another router on the way to the destination.
finally these packets reach a router in the network of your ISP. now it depends on the speed of your connection with your ISP, that how quickly these packets get delivered to your network card/modem. this device is now responsible to receive these TCP/IP packets and reorder them [the packets might reach in any order]. this device may again send a request for a missing packet(s) [if any].
the final document is compiled and passed on to your web browser. your web browser understands the code in this document and presents it to you in the form of a web page.
About this entry
You’re currently reading “story behind a page hit – for newbies,” an entry on /kapil/blog
- Published:
- 6.29.06 / 5pm
- Category:
- Uncategorized
/kapil/blog
1 Comment
Jump to comment form | comments rss [?] | trackback uri [?]