Slow Upload over Public Network

Last updated: 2023-09-14 18:08:34

Problem

Phenomenon 1
:
The upload speed is slow (below 8 Mbps) over a home network, while it is normal over a corporate network.
The upload speed is slow (below 8 Mbps) over a corporate network, while it is normal using a 4G network.
Phenomenon 2
: The upload speed is slow when using a custom domain.

Possible Cause

Symptom 1
1. The speed is slow due to your ISP and network condition.
2. CORS is used and thus the speed is slow.
Symptom 2: CNAME maps the custom domain name to other products (e.g., Content Delivery Network (CDN), Cloud Virtual Machine (CVM), or Anti-DDoS) before mapping to COS.

Solution

If you encounter Phenomenon 1, you can troubleshoot by checking the client's network environment. For detailed steps, please refer to Troubleshooting Client Network.
If you encounter Phenomenon 2, you can improve the transmission efficiency by modifying the custom domain name resolution to reduce the transmission relay links. For detailed instructions, please refer to Modifying Custom Domain Name Resolution.

Instructions

Checking the client network

1. Run the following command to check whether the ISP of the IP address is the same as that of the client network:
ping COS domain
Example:
ping examplebucket-1250000000.cos.ap-beijing.mqcloud.com
If yes, skip to Step 3.
If not, proceed to step 2.
2.
Using Google Chrome as an example, check if the browser has a proxy configured.
2.1 Open Google Chrome, click on the
41a048f92c3d6160faff7e211bacce76.png (7×17)

in the top-right corner, and select Settings to open the settings page.
2.2 Click Advanced, select Proxy settings for your computer under the "System" section, and open the operating system's settings window. Check if a proxy is set.
If yes, disable the proxy.
If not, perform Step 3.
3.
Check if the Wi-Fi router being used has any speed limitations.
If yes, allocate the bandwidth as needed.
If not, please go to Step 4.
4.
Check the current network's transfer performance when uploading to COS.
Using the COSCMD tool as an example, test the upload and download performance of a 20MB object.
coscmd probe -n 1 -s 20
The results will be similar to the following, displaying the average speed (Average), the lowest speed (Min), and the highest speed (Max).

Note
Please install the COSCMD tool first. After installation, execute commands using the command line tool. For more information, see COSCMD Tool.
5. Browse Speed Test to test the speed and compare the tested speed with data obtained in Step 4 to determine whether the client has used the maximum bandwidth.
If the speeds obtained in Step 4 are slower than the client bandwidth, please contact us.
If the speeds obtained in Step 4 equal to the client bandwidth but have not reached the speed promised by your ISP, please contact your ISP.
If the speeds obtained in Step 4 equal to the client bandwidth and reached the bandwidth promised by your ISP, please perform Step 6.
6.
Check if there are domestic clients accessing overseas node buckets, or overseas clients accessing domestic node buckets.
Yes, it is recommended to use COS's global acceleration feature. For more information, please refer to Tencent Cloud COS Global Acceleration for Faster Access by Global Users and Efficient Transmission Practices with COS Global Acceleration.
If not, contact us.

Modifying DNS record for your custom domain

1. Check whether the custom domain is mapped to a COS domain.
Yes, please contact us. Common COS domain names are as follows:
XXX.cos.ap-beijing.myqcloud.com (default COS domain)
XXX.cos.accelerate.myqcloud.com (COS global acceleration domain)
XXX.cos-website.ap-beijing.myqcloud.com (COS static website domain)
XXX.picbj.myqcloud.com (COS’s default CI domain)
No, please proceed to Step 2. Common non-COS domain names are as follows:
XXX.file.myqcloud.com or XXX.cdn.dnsv1.com (Tencent Cloud’s CDN default domain)
XXX.w.kunlungr.com (aliyunCDN default domain)
2.
Resolve the custom domain name's CNAME to the required COS domain name and proceed with data upload.
For example, upload.mydomain.com cname XXX.cos.ap-beijing.myqcloud.com. For detailed instructions, please refer to Enabling Custom Origin Domain Name.
3. Modify the default COS domain name in the client. For example, using C# code:
CosXmlConfig config = new CosXmlConfig.Builder()
.SetConnectionTimeoutMs(60000) // Set the connection timeout in milliseconds. Defaults to 45000.
.SetReadWriteTimeoutMs(40000) // Set the read/write timeout in milliseconds. Defaults to 45000.
.IsHttps(true) // Set HTTPS as the default request method.
.SetAppid(appid) // Set the APPID of your Tencent Cloud account
.SetRegion(region) // Set the default bucket region.
.SetHost("XXXXXX.com") // Enter the custom domain.
.SetDebugLog(true) .Build(); // Create the CosXmlConfig object.
For more information about how to call other SDKs, see SDK Overview.