...

/

Optimizing Requests

Optimizing Requests

How HTTP requests are made impacts performance. Let's study how this process can be optimized.

TCP connections

For a host to request a website, it first needs to establish a connection with the server called a ‘TCP connection.’ This TCP connection requires a ‘handshake,’ much like the TLS handshake we studied that requires at least three back and forth messages between the client and the server. Once a connection is established, the TLS handshake can occur if the connection is to be encrypted, which requires two messages for TLS 1.3.

So, a total of at least five messages need to be exchanged before any requests can be made. This is a considerable overhead, and optimizing it deserves attention. In this lesson, we will study common measures to address this issue.

One connection per request

If one connection is established per ...