Subscribe by Email


Wednesday, July 1, 2009

WWW - The Server Side

For all the incoming connectionts from different clients, every website is associated with a server process listening to TCP port 80. The client sends a request after the connection is made and the server sends the reply and then the connection is released. The protocol that is responsible for requests and replies is called HTTP.

The steps that occur between the user clicking and a page being displayed are:
- The browser determines the URL.
- The browser asks DNS for IP address.
- DNS replies.
- Browser makes a TCP connection to the port.
- It then sendsthe GET command.
- The server sends the file.
- The TCP connection is released.
- The browser displays the text of the file.
- The browser fetchesand displays all images of the file.

Not all servers speak HTTP, Old servers use FTP, Gopher or other protocols. Given the number of different protocols, it was thought impractical to make browser understand different protocols. However, since there is a need to make information available (where the server talks in protocols other than HTTP), a solution was required. This solution is something called a proxy server. A proxy server takes a HTTP request from the browser and translates these requests into the FTP/Gopher/other protocols. The proxy server is a separate logical server.
A proxy server also serves to provide an important function called caching. Through caching, a proxy server keeps a local copy of the pages that pass through it. If a user requests for a page, if the page is present on the cache of the proxy server, it serves the page to the user. this way it serves to reduce load on final server.


No comments:

Facebook activity