Understanding the web – request/response
Before going any further, it is imperative to understand the basic concept of the web. The idea behind HTTP 1.X is that a client sends an HTTP request to a server, and then the server responds to that client. That can sound trivial if you have web development experience. However, it is one of the most important web programming concepts, irrespective of whether you are building web APIs, websites, or complex cloud applications.
Let’s reduce an HTTP request lifetime to the following:
- The communication starts.
- The client sends a request to the server.
- The server receives the request.
- The server most likely does something (executes some code/logic).
- The server responds to the client.
- The communication ends.
After that cycle, the server is no longer aware of the client. Moreover, if the client sends another request, the server is unaware that it responded to a request earlier for...