WWW's Client/Server Architecture

The basic WWW architecture, shown in the figure, below, is based on the client/server model of distributed systems. In the model, a client process makes a request to a server process, normally running on a different machine and using a network such as the Internet for communication. The server process receives the request, establishes a connection with the client, performs the desired function, returns the result to the client, and breaks the connection. The server is then available to receive requests from other clients and perform similar services for them. In some implementations, the server may create a copy of itself (called forking) immediately upon receiving the request; the child process then establishes the connection with the client and performs the desired service while the parent process goes back to listening for other request. This design enables a single server to provide services for a number of clients at the same time.

In the architecture of the WWW, the client is normally a Web browser, such as Netscape or Internet Explorer. The Server may be any of a variety of servers. The common element among them is that they all support a high-level set of conventions - a protocol - called HTTP (HyperText Transfer Protocol). HTTP messages are embedded as the data portion of TCP segments which, in turn, are embedded in IP datagrams, which in term are embedded in Ethernet frames. The whole thing is like a set of nested Russian dolls.

HTTP messages normally include a header, which contains a verb such as GET, and a body which contains additional data. Thus, a frequent interaction between a browser and a WWW server is to request a particular document or "page" of information. After parsing the request, the server fetches the requested data from its local file system, constructs a HTTP message, places the file contents in the body portion of the message, and returns the entire package to the client, once again using TCP, IP, and, most like, Ethernet.

In some cases, the request sent to a server will not be to fetch an existing file but to execute some program, such as a database access program, to generate the desired results. In this case, the WWW server uses a special interface, called the CGI (Common Gateway Interface), to run the desired program. That program is then responsible for constructing the HTTP message that includes the data requested by the user, which it passes back to the server for delivery to the client.

The mechanics of establishing the connection between Web browser and HTTP server are outlined below.


Communication between WWW browsers and servers