HTTP 통신에서 성능에 큰 영향을 주는 HOL(Head Of Line) Blocking 에 대해서 정리해 본다.
웹의 보편화와 함께 HTTP 프로토콜은 성능 측면, 특히 지연속도(Latency) 를 줄이려는 노력을 끊임없이 하고 있다.
HTTP 1.0 에서 HTTP 1.1 로 발전함에 따라 추가된 다음의 기능들이 크게 대표적이라 할 수 있겠다.
- Persistent
- Pipelining
- 1번 요청 : 삼계탕
- 2번 요청 : 양파 1개
- 3번 요청 : 당근 1개
8.1.2.2 Pipelining
A client that supports persistent connections MAY "pipeline" its requests (i.e., send multiple requests without waiting for each response). A server MUST send its responses to those requests in the same order that the requests were received.
-> 서버는 반드시 응답을 요청 순서(request in the same order)에 맞추어 전달해야 한다.
Clients which assume persistent connections and pipeline immediately after connection establishment SHOULD be prepared to retry their connection if the first pipelined attempt fails. If a client does such a retry, it MUST NOT pipeline before it knows the connection is persistent. Clients MUST also be prepared to resend their requests if the server closes the connection before sending all of the corresponding responses.
Clients SHOULD NOT pipeline requests using non-idempotent methods or non-idempotent sequences of methods (see section 9.1.2). Otherwise, a premature termination of the transport connection could lead to indeterminate results. A client wishing to send a non-idempotent request SHOULD wait to send that request until it has received the response status for the previous request.
댓글 없음:
댓글 쓰기