Sun. Jan 22nd, 2023

Request Response Model

When you view a webpage, you are viewing a set of static data that has been generated on a web server and sent to your browser for rendering.

A summary of this cycle is shown in the image below:

Note that the only connection to and from the client (the web browser) is the HTTP Request and the HTTP Response, which are between the client and the web server. However, the diagram above also show two other entities: a database and disk storage.

The client can only access the web server. If the client requires information from another source, for example a database, the web server is responsible for these interactions – this is achieved through the use of server-side script: that is, code that runs on the web server in response to a client’s request.

This allows for sensitive information, such as databases of customer information, to be securely segregated behind a firewall, where the only access to and from it is mediated by the web server.

It also means that a web server is able to connect to other systems on behalf of the client, and relay back information from those sources as part of the HTTP response.

When a client attempts to view a web page, it sends a request to the web server. The web server then processes this information and constructs the information needed to form the response. When this information is ready, it is sent back to the client, where the browser is able to display it.