Slow webpage access how to find out why the Internet access speed is slow

Source: Internet
Author: User
Slow webpage access how to find out why the Internet access speed is slow Source: China IT lab Author: Qs Comment font size: Large | Medium | Small

In network management, network administrators often encounter slow access speeds between hosts in the LAN and web pages through Browsers (usually Internet access.

1. webpage access

In network management, network administrators often encounter slow access speeds between hosts in the LAN and web pages through Browsers (usually Internet access. To find out and solve such problems, we need to analyze the webpage loading process in detail.

Standard webpage access (HTTP) uses TCP port 80 and works in C/S mode.

The client sends a TCP connection SYN request to the HTTP server (1). After receiving the request, the HTTP server uses a SYN/ACK packet to respond to the client (2 ), after receiving the response, the client sends an ACK packet to the HTTP server again for confirmation (3). At this time, the TCP connection is established successfully. After the connection is established, the client immediately uses the Request Method (usually get or post) to request data to the server (4 ), generally, the HTTP server responds to the client with the corresponding HTTP header and data (5), but in some cases (the script is complicated and takes a lot of time to execute) at the beginning, only HTTP headers can be returned, while data (6, 7, n) may be separately grouped for transmission after a period of time. After the data is transmitted, the client sends fin data packets to close the connection.

In kelai Network Analysis System 5.0, the relative time (set a data packet as the benchmark) and time difference can be viewed for each data packet. When the webpage access speed is slow, capture HTTP access and view the corresponding time to identify the cause of slow access and troubleshoot.

2. Find out the cause of slow webpage access

The speed of accessing a webpage on the Intranet is very slow. We use the Kto network analysis system to track and analyze the data packets accessing the webpage to find out the cause.

1. the three data packets of 1-3 are the three-way handshake data packets between the client and the HTTP server, which takes about 2367 milliseconds. the time difference between the SYN/ack data packets returned by the HTTP server to the client is large, it is about 2367 milliseconds;

2. The client initiates a GET request to the HTTP server. The HTTP server responds to the GET request on 4th packets, which takes 6th milliseconds;

3. From 7th data packets to the end, the HTTP server sends the requested data to the client, which takes about 71183 milliseconds, that is, about 71 seconds;

From the above analysis, we can see that there are two main reasons for slow client access to webpages:

1. The distance between the client and the HTTP server is too long. The three-way handshake between the client and the HTTP server takes too long, indicating that there are too many routes for the two, and the path for data packet transmission is too long, resulting in slow speed.

2. the response time of the HTTP server script is too long. It may be that the requested page contains too many scripts, images, and other information, resulting in a long response time and slow speed.

Through the packet capture Analysis of web pages, we quickly found the cause of slow webpage access. This method can effectively detect the access speed of your website and optimize the parameters to be adjusted, to make the website provide the best access.

Note: When a webpage is transmitted, the Web Server opens multiple TCP connections at the same time. For example, each image is transmitted using a single TCP connection. Therefore, it is normal that the three-way handshake packet appears multiple times in Figure 2, because the server uses multiple TCP connections to open the client request page.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.