Head of the line blocking
Head of the line blocking
The request-response pattern exacerbates the performance problem of HTTP, known as "head-of-line blocking" (Head-of-line blocking).
When one of the sequentially sent requests is blocked for some reason, all requests queued later are also blocked, resulting in a delay in receiving data from the client.
HTTP/1.1 cannot be solved completely, but it can be alleviated:
Method 1: connect concurrently and initiate multiple persistent connections to a domain name at the same time. The browser supports 6-8 connections.
But this approach also has its drawbacks. If each client wants to make a lot of connections on its own, the number of users × concurrency will be astronomical. The resources of the server simply cannot bear, or are considered to be malicious by the server, which will cause a "denial of service".
Method 2: domain name fragmentation. Multiple domain names point to the same server.