Problem Description
High website latency.
Issue Analysis
A HTTP request includes domain name resolution, establishing a TCP connection, initiating a request, server receiving, processing the request and returning the processing result, browser parsing the HTML code and requesting other resources, and rendering the page. This HTTP request process starts at the user's local client, traverses the network nodes between the client and the access server, and ultimately reaches the server. Any problem in the three links may cause high website latency.
Solution
Checking the Local Client
- Test the speed of local access to each domain name.
- Based on the test results, check whether there is any issue with the local network.
We can learn from the results both the access delay of every domain name and whether the network is functioning normally.- If not normal, contact your network service provider for assistance in locating and resolving any issues.
- If normal, check network links.
Checking Network Links
- Use the local client to ping the server's public IP address to check whether there is packet loss or high latency.
- If there is packet loss or high latency, use MTR for diagnosis. For specific operations, see Server Network Delay and Packet Loss Processing.
- If there is no packet loss or high latency, go to step 2.
- Run
dig/nslookupcommand to check the DNS resolution and make sure whether the issue is caused by DNS resolution.
You can also directly access the corresponding page using the public IP to check whether the high website latency is due to DNS issues.- If yes, check DNS resolution.
- If no, check the server.
Checking the Server
- Log in to the CVM console.
- Select the ID/host name of the instance to be checked and enter the instance details page.
- On the instance details page, select the Monitoring tab to check the usage of instance resources.
- If there are high CPU/memory usage problems, see Windows Instance: Unable to Log in Due to High CPU and Memory Usage and Linux Instance: Unable to Log in Due to High CPU and Memory Usage for troubleshooting.
- If the bandwidth usage is too high, see Unable to Log in Due to High Bandwidth Usage for troubleshooting.
- If instance resource usage is normal, check for other potential issues.
Checking for Other Potential Issues
Based on the instance resource usage, the administrator should determine whether the increase in resource consumption is caused by server load.
- If yes, it is recommended to optimize business procedures or upgrade server configuration. You can also purchase new servers to reduce the pressure on existing servers.
- If no, we recommend that you check the log files to locating the issues, and perform targeted optimization.