Постоянное соединение в HTTP | Курс "Компьютерные сети"
New Section
The lecture discusses the evolution of HTTP connections, emphasizing the shift from simple web structures to complex modern web pages requiring multiple resources.
Evolution of Web Structures
- Initially, HTTP 1.0 operated in a request-response mode where clients requested and servers provided web pages, suitable for simple text-based HTML pages.
- Modern web pages are intricate, comprising various resources like images, videos, scripts, and external blocks from different sites.
- Introduces the concept of persistent connections where a single TCP connection can be used to fetch multiple resources beyond just HTML files.
- Persistent connections in HTTP are termed as "HTTP persistent Connection" or "HTTP Keep alive," enhancing webpage loading speed by avoiding repeated connection setups.
Optimizing Data Transfer Speed
Explores techniques such as persistent connections and window size adjustment to enhance data transfer efficiency in HTTP.
Enhancing Data Transfer Efficiency
- Using persistent connections eliminates the need for frequent connection establishments, improving data transfer speed significantly.
- TCP adjusts data transmission speed through window size; larger windows facilitate faster data transfer rates.
Managing Connection Persistence
Discusses mechanisms like the "Connection: Keep" header and its impact on maintaining open connections.
Connection Persistence Management
- Introduction of the "Connection: Keep" header post HTTP 1.0 publication allowed clients to request servers to keep connections open for further resource retrieval.
- Even without the "Connection: Keep" header, some servers maintain open connections unless explicitly closed using "Connection Close," balancing resource utilization with connection persistence.
Resource Utilization Challenges
Explores server resource constraints and automatic connection closure strategies due to high client demand variability.
Resource Management Challenges
- Servers automatically close idle connections after a set time (e.g., 5-20 seconds) to optimize resource allocation amidst fluctuating client requests.
Enhancing Data Transmission Speed
Introduces HTTP pipelining as a technology to expedite data transmission by sending multiple requests simultaneously.
Accelerating Data Transmission
New Section
This section discusses the limitations of technology in resource transmission order and how HTTP version 2 protocol addresses these issues by allowing numbered requests for resource delivery.
Resources Transmission Order
- Resources must be transmitted in the same order as the requests arrived. If an issue occurs with loading a resource, other resources cannot be transmitted even if they are ready.
- HTTP version 2 protocol resolves this problem by enabling request numbering and transmission flexibility.
New Section
The discussion shifts to the potential enhancement of web page loading speed through multiple HTTP connections and varied resource loading strategies.
Web Page Loading Speed Enhancement
- Server resources can be sent to clients in any order, but pipeline processing is rarely used in practice.
- Increasing web page loading speed involves opening multiple HTTP connections from the client to the server for parallel resource loading.
- Each connection can handle different types of resources like stylesheets, Java scripts, and images, optimizing load times.
New Section
Exploring the benefits of persistent HTTP connections in reducing resource loading time and avoiding repetitive TCP handshakes.
Benefits of Persistent Connections
- Utilizing a single TCP connection for multiple resource downloads reduces setup time without requiring repeated three-way handshakes.
- Modern browsers typically use four to eight simultaneous HTTP connections for efficient resource retrieval.
New Section
The evolution of persistent connections in HTTP protocols from version 1.0 to version 1.1 is discussed, highlighting default persistent connections in the latter.
Evolution of Persistent Connections
- In HTTP 1.0, there was no support for persistent connections; however, this feature was added post-publication as "Connection: Keep-alive."
- In contrast, all connections are persistent by default in HTTP 1.1, making "Connection: Keep-alive" header usage optional.