(해석 또는 이해가 잘못된 부분이 있다면 댓글로 편하게 알려주세요.)
Because HTTP is layered directly on TCP, the performance of HTTP transactions depends critically on the performance of the underlying TCP plumbing. This section highlights some significant performance considerations of these TCP connections. By understanding some of the basic performance characteristics of TCP, you’ll better appreciate HTTP’s connection optimization features, and you’ll be able to design and implement higher-performance HTTP applications.
HTTP 트랜잭션의 성능은 내부의 TCP 연결의 성능에 따라 크게 좌우됩니다. HTTP가 TCP 위에 직접 올라가기 때문입니다.
이번 섹션은 TCP 연결에서의 몇 가지 주요한 성능 고려사항에 주목합니다.
기본적인 TCP의 성능 특성을 이해함으로써 여러분은 HTTP 연결의 최적화 기능을 더 잘 이해할 수 있고, 더 높은 성능의 HTTP 응용 프로그램을 설계하고 구현할 수 있을 겁니다.
This section requires some understanding of the internal details of the TCP protocol. If you are not interested in (or are comfortable with) the details of TCP performance considerations, feel free to skip ahead to “HTTP Connection Handling.” Because TCP is a complex topic, we can provide only a brief overview of TCP performance here. Refer to the section “For More Information” at the end of this chapter for a list of excellent TCP references.
이번 섹션은 TCP 프로토콜의 세부적인 내용을 이해하는 것이 필요합니다.
만약 여러분이 자세한 TCP 성능 고려사항에 크게 관심이 없거나 이미 잘 알고 있다면, "HTTP Connection Handling" 섹션으로 바로 넘어가도 무방합니다.
TCP는 매우 복잡한 주제이므로 지금은 TCP 성능에 관한 간단한 요약만 제공할 수 있습니다.
TCP에 관한 훌륭한 자료들은 해당 챕터 마지막의 "For More Information" 섹션에 정리되어 있으니 참고 바랍니다.
Let’s start our TCP performance tour by reviewing what networking delays occur in the course of an HTTP request. Figure 4-7 depicts the major connect, transfer, and processing delays for an HTTP transaction.
HTTP 요청 과정에서 어떤 네트워킹 지연이 발생하는지 검토해보며 TCP 성능을 이해하기 위한 여정을 시작해봅시다.
Figure 4-7은 HTTP 트랜잭션에서 주로 나타나는 연결 지연, 전송 지연, 처리 지연을 나타낸 것입니다.
Notice that the transaction processing time can be quite small compared to the time required to set up TCP connections and transfer the request and response messages. Unless the client or server is overloaded or executing complex dynamic resources, most HTTP delays are caused by TCP network delays.
트랜잭션의 처리 시간은 TCP 연결을 설정하고 요청과 응답 메시지를 주고받는 데 소요되는 시간에 비해 상당히 짧을 수 있습니다.
클라이언트나 서버가 과부하에 걸리거나 복잡한 동적 리소스를 실행하지 않는 한 대부분의 HTTP 지연은 TCP 네트워크 지연에 의해 발생합니다.
There are several possible causes of delay in an HTTP transaction:
- A client first needs to determine the IP address and port number of the web server from the URI. If the hostname in the URI was not recently visited, it may take tens of seconds to convert the hostname from a URI into an IP address using the DNS resolution infrastructure.*
- Next, the client sends a TCP connection request to the server and waits for the server to send back a connection acceptance reply. Connection setup delay occurs for every new TCP connection. This usually takes at most a second or two, but it can add up quickly when hundreds of HTTP transactions are made.
- Once the connection is established, the client sends the HTTP request over the newly established TCP pipe. The web server reads the request message from the TCP connection as the data arrives and processes the request. It takes time for the request message to travel over the Internet and get processed by the server.
- The web server then writes back the HTTP response, which also takes time.
HTTP 트랜잭션에서 발생 가능한 몇 가지 지연 요인들이 있습니다.
The magnitude of these TCP network delays depends on hardware speed, the load of the network and server, the size of the request and response messages, and the distance between client and server. The delays also are significantly affected by technical intricacies of the TCP protocol.
이와 같은 TCP 네트워크 지연은 하드웨어 속도, 네트워크와 서버의 로딩 시간, 요청과 응답 메시지의 크기, 클라이언트와 서버 사이의 거리 등에 영향을 받습니다.
또한 TCP 프로토콜의 기술적 복잡도까지도 지연 시간에 큰 영향을 끼칩니다.
The remainder of this section outlines some of the most common TCP-related delays affecting HTTP programmers, including the causes and performance impacts of:
• The TCP connection setup handshake
• TCP slow-start congestion control
• Nagle’s algorithm for data aggregation
• TCP’s delayed acknowledgment algorithm for piggybacked acknowledgments
• TIME_WAIT delays and port exhaustion
If you are writing high-performance HTTP software, you should understand each of these factors. If you don’t need this level of performance optimization, feel free to skip ahead.
만약 여러분이 고성능의 HTTP 소프트웨어를 작성하고자 한다면 각각의 요인들을 이해해야 합니다.
이러한 수준의 성능 최적화가 필요하지 않다면 언제든 건너뛰어도 좋습니다.