HTTP 파이프라인
HTTP pipeliningHTTP |
---|
요청 방법 |
헤더 필드 |
응답 상태 코드 |
보안 접근 제어 방법 |
보안 취약성 |
HTTP pipelining은 HTTP/1.1의 기능으로, 해당 응답을 기다리지 않고 하나의 TCP(전송 제어 프로토콜) 연결을 통해 여러 HTTP 요청을 전송할 수 있다.[1] HTTP/1.1 규격은 서버가 HTTP 파이프라이닝을 지원하지 않더라도 파이프라인되지 않은 유효한 응답을 다시 보내면서 서버가 파이프라인 요청에 올바르게 응답하도록 요구한다. 이러한 요구사항에도 불구하고, 많은 기존 HTTP/1.1 서버는 파이프라이닝을 올바르게 지원하지 않기 때문에 대부분의 HTTP 클라이언트는 실제로 HTTP 파이프라이닝을 사용하지 않을 수 없다.
이 기술은 대부분의 최신 브라우저가 지원하는 HTTP/2를 통한 멀티플렉싱으로 대체되었다.[2][3]
HTTP/3에서 멀티플렉싱은 TCP를 대체하는 새로운 기반 QUIC 전송 프로토콜을 통해 이루어진다. 이렇게 하면 더 이상 헤드오프라인이 차단되지 않기 때문에 적재 시간이 더욱 단축된다.
동기부여와 한계
요청의 파이프라이닝은 특히 위성 인터넷 연결과 같은 높은 대기 시간 연결을 통해 HTML 페이지의 로딩 시간을 획기적으로 향상시킨다[4]. 속도 향상은 HTTP 1.1의 제한이 여전히 적용되기 때문에 광대역 연결에서 덜 뚜렷하게 나타난다. 즉, 서버는 요청을 받은 것과 같은 순서로 응답을 전송해야 전체 연결이 선입선출[1] 상태를 유지하고 HOL 차단이 발생할 수 있다.
The asynchronous operation of HTTP/2 and SPDY are solutions for this.[5] Browsers ultimately did not enable pipelining by default, and by 2017 most browsers supported HTTP/2 by default which used multiplexing instead.[2]
Non-idempotent requests, like those using POST
, should not be pipelined.[6] Sequences of GET
and HEAD
requests can always be pipelined. A sequence of other idempotent requests like PUT
and DELETE
can be pipelined or not depending on whether requests in the sequence depend on the effect of others.[1]
HTTP pipelining requires both the client and the server to support it. HTTP/1.1 conforming servers are required to support pipelining. This does not mean that servers are required to pipeline responses, but that they are required not to fail if a client chooses to pipeline requests.[7]
Most pipelining problems may happen in HTTP intermediate nodes (hop-by-hop), i.e. mainly in proxy servers (proxies), specially in transparent proxy servers (because they are used anyway without requiring user client configuration, so if only one of them, along the HTTP chain, does not handle pipelined requests properly then nothing works as it should).[8]
Using pipelining with HTTP proxy servers is usually not recommended also because the HOL blocking problem may really slow down a lot proxy server responses (as the server responses must be in the same order of the received requests).[1] [9]
Example: if a client sends 4 pipelined GET requests to a proxy through a single connection and the first one is not in its cache then the proxy has to forward that request to the destination web server; if the following three requests are instead found in its cache, the proxy has to wait for the web server response, then it has to send it to the client and only then it can send the three cached responses too.
If instead a client opens 4 connections to a proxy and sends 1 GET request per connection (without using pipelining) then the proxy can send the three cached responses to client in parallel before the response from server is received, decreasing a lot the overall completion time (because requests are served in parallel with no head-of-line blocking problem).[10] The same advantage, but with more speed, happens in HTTP/2 multiplexed streams.
Implementation status
Pipelining was introduced in HTTP/1.1 and was not present in HTTP/1.0.[11]
It looks like that since the beginning, implementing HTTP pipelining properly and / or deploying it has never been an easy task for anybody (excepted for developers of web servers). There have always been complains about browsers, proxy servers, etc. not working well when using pipelined requests / responses, up to the point that for many years (at least till 2011) software developers, engineers, web experts, etc. tried to summarize the various kind of problems they noted, to fix things and to give advices about how to deal with pipelining on the Open Web.[8]
Implementation in web servers
Implementing pipelining in web servers is a relatively simple matter of making sure that network buffers are not discarded between requests. For that reason, most modern web servers (that fully implement HTTP/1.1) handle pipelining without any problem.
Implementation in web browsers
Of all the major browsers, only Opera based on Presto layout engine had a fully working implementation that was enabled by default. In all other browsers HTTP pipelining was disabled or not implemented.[5]
- Internet Explorer 8 does not pipeline requests, due to concerns regarding buggy proxies and head-of-line blocking.[9]
- Internet Explorer 11 does not support pipelining.[12]
- Mozilla browsers (such as Mozilla Firefox, SeaMonkey and Camino) support pipelining; however, it is disabled by default.[13][14] Pipelining is disabled by default to avoid issues with misbehaving servers.[15] When pipelining is enabled, Mozilla browsers use some heuristics, especially to turn pipelining off for older IIS servers.[16] Support for H1 Pipeline was removed from Mozilla Firefox in Version 54.[17]
- Konqueror 2.0 supports pipelining, but it is disabled by default.[18]
- Google Chrome previously supported pipelining, but it has been disabled due to bugs and problems with poorly behaving servers.[19]
- Pale Moon (web browser) supports pipelining, and is enabled by default.[20]
웹 프록시 서버에 구현
대부분의 HTTP 프록시는 송신 요청을 파이프라인하지 않는다.[21]
투명 HTTP 프록시를 포함한 일부 HTTP 프록시는 파이프라인 요청을 매우 나쁘게 관리할 수 있다(즉, 파이프라인 응답 순서를 혼합하여).[22]
Squid 웹 프록시의 일부 버전은 최대 두 개의 송신 요청을 파이프라인할 것이다. 이 기능은 기본적으로 비활성화되었으며 "대역폭 관리 및 액세스 로깅 이유"[23]를 위해 수동으로 활성화해야 한다. Squid는 고객의 여러 요청을 지원한다.
오픈 소스 애플리케이션 제공 컨트롤러인 Tempesta FW는 백엔드 서버에 대한 파이프라인 요청도 한다.[25][26]
기타 구현
월드와이드웹컨소시엄(W3C)이 만든 libwww 도서관은 1997년 2월 18일 공개된 버전 5.1 이후 파이프라이닝을 지원한다.[27]
HTTP 파이프라이닝을 지원하는 기타 응용 프로그램 개발 라이브러리:
- HTTP 파이프라인에 대한 클라이언트 지원을 제공하는 Perl 모듈은 HTTP::Async 및 LWPng(libww-perl New Generation) 라이브러리.[28]
- 마이크로소프트.NET Framework 3.5는 모듈에서 HTTP 파이프라이닝을 지원한다.
System.Net.HttpWebRequest
.[29] - Qt급
QNetworkRequest
, 4.4에 소개되었다.[30]
현재 파이프라이닝을 이용하고 있는 일부 다른 애플리케이션은 다음과 같다.
- BULD389 이후 IceBreak 애플리케이션 서버
- FreeBSD에서 phttpget(최소주의자 파이프라인 HTTP 클라이언트)[31]
- libcurl은 이전에 CURLMOPT_PIPPINING 옵션을 사용하여 파이프라인에 대한 지원이 제한되었지만,[32] 이 지원은 버전 7.65.0에서[33] 제거되었다.
- 포트스냅(FreeB)SD 포트 트리 분배 시스템)
- APT(Advanced Packaging Tool)는 파이프라이닝을 지원한다.[citation needed]
- SVN(Subversion)은 serf WebDAV 액세스 모듈을 통해 HTTP 파이프라이닝을 선택적으로 지원한다(기본 모듈인 네온에는 파이프라이닝 지원이 없음).[34][35]
- Windows Server 2003의 Microsoft Message Queuing은 기본적으로 HTTP의 파이프라이닝을 사용하며 HTTPS에서 사용하도록 구성할 수 있다.[36]
- IBM CICS 3.1은 클라이언트 내에서 HTTP 파이프라이닝을 지원한다.[37]
HTTP 파이프라이닝을 지원하는 테스트 도구:
참고 항목
참조
- ^ a b c d "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing: Pipelining". ietf.org. Retrieved 2014-07-24.
- ^ a b "Revision 1330814 Connection management in HTTP/1.x MDN". MDN Web Docs. Retrieved 2018-03-19.
- ^ "HTTP2 browser support". Retrieved March 9, 2017.
- ^ Nielsen, Henrik Frystyk; Gettys, Jim; Baird-Smith, Anselm; Prud'hommeaux, Eric; Lie, Håkon Wium; Lilley, Chris (24 June 1997). "Network Performance Effects of HTTP/1.1, CSS1, and PNG". World Wide Web Consortium. Retrieved 14 January 2010.
- ^ a b Willis, Nathan (18 November 2009). "Reducing HTTP latency with SPDY". LWN.net.
- ^ "Connections". w3.org.
- ^ "HTTP/1.1 Pipelining FAQ'".
- ^ a b Mark Nottingham (March 14, 2011). "Making HTTP Pipelining Usable on the Open Web". Retrieved October 16, 2021. Cite 저널은 필요로 한다.
journal=
(도움말) - ^ a b "Wayback link of 'Windows Internet Explorer 8 Expert Zone Chat (August 14, 2008)'". Microsoft. August 14, 2008. Archived from the original on December 4, 2010. Retrieved May 10, 2012.
- ^ "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing: Concurrency". ietf.org. Retrieved 2014-07-24.
- ^ "Archived copy". Archived from the original on 2016-04-24. Retrieved 2016-04-16.CS1 maint: 제목으로 보관된 복사본(링크)
- ^ "Internet Explorer and Connection Limits". IEBlog. Retrieved 2016-11-14.
- ^ 파이프라이닝 네트워크 모질라진
- ^ Cheah Chu Yeow (2005). Firefox secrets. p. 180. ISBN 0-9752402-4-2.
- ^ "Bug 264354: Enable HTTP pipelining by default". Mozilla. Retrieved September 16, 2011.
- ^ "Source code – nsHttpConnection.cpp". Firefox source code. Mozilla. May 7, 2010. Retrieved December 5, 2010.
- ^ "Bug 1340655: Remove H1 Pipeline Support". Mozilla. Retrieved March 22, 2017.
- ^ Emir Arian. Internet Communication: Protocols and related subjects. Retrieved 2021-10-16.
- ^ HTTP 파이프라인 - 크롬 프로젝트
- ^ "HTTP/1 Pipelining support has been removed in Firefox 54 - Pale Moon forum". forum.palemoon.org. Retrieved 2018-06-07.
- ^ Mark Nottingham (June 20, 2007). "The State of Proxy Caching". Retrieved May 16, 2009.
- ^ Mark Nottingham (July 11, 2011). "What proxies must do". Retrieved October 16, 2021.
- ^ "squid : pipeline_prefetch configuration directive". Squid. November 9, 2009. Retrieved December 1, 2009.
- ^ "Polipo — a caching web proxy". Juliusz Chroboczek. September 18, 2009. Retrieved November 12, 2009.
- ^ "Tempesta FW — a Linux Application Delivery Controller". GitHub. Retrieved March 29, 2018.
- ^ "Servers: Tempesta's side - tempesta-tech/tempesta Wiki". Tempesta Technologies INC. August 1, 2017. Retrieved March 29, 2018.
- ^ Kahan, José (June 7, 2002). "Change History of libwww". World Wide Web Consortium. Retrieved August 3, 2010.
- ^ "Using HTTP::Async for Parallel HTTP Requests (Colin Bradford)" (PDF). Archived from the original (PDF) on 2012-03-10. Retrieved 2010-08-03.
- ^ 시스템.넷.HttpWebRequest & 파이프라인
- ^ QNetworkRequest Class Reference 2009-12-22 Wayback Machine, Nokia QT 문서에 보관
- ^ 파이프라인 HTTP GET 유틸리티
- ^ Curling pipelining 설명 Wayback Machine, Curl 개발자 설명서에 보관된 2012-06-27
- ^ Curling 파이프라인 제거 안내웨이백 머신에 2021-02-05
- ^ C. Michael Pilato; Ben Collins-Sussman; Brian W. Fitzpatrick (2008). Version Control with Subversion. O'Reilly Media. p. 238. ISBN 978-0-596-51033-6.
- ^ Justin R. Erenkrantz (2007). "Subversion: Powerful New Toys" (PDF).
- ^ "HTTP/HTTPS messages". Microsoft TechNet. January 21, 2005.
- ^ CICS Web 지원의 파이프라인 처리 방법
- ^ "HTTP Website". Archived from the original on 2012-06-08. Retrieved 2010-10-01.
외부 링크
- RFC 7230 "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing". ietf.org. Retrieved 2014-07-24.
- HTTP/1.1 파이프라인 FAQ(mozilla.org
- w3.org의 "HTTP/1.1, CSS1, PNG의 네트워크 성능 영향"
- "페이지 로드 시간 최적화" 문서
- 쳇펫
- 세르프 C 도서관