HTTP and persistent connections

The HTTP protocol is a request-response model, where the client submits the message (HTTP Request) and the server processes this message and sends the response (HTTP Response) to the client. The connection will be closed after the response is sent.

Look at the following diagram:

It's pretty simple to understand. The client will send the request, and in this case, the connection will be opened. After that, the server will receive the request to process something and it will send the answer to the client. The connection will be closed after the whole process. If the client needs to send a new request, the connection ...

Get Spring 5.0 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.