Uploading over a Public Network is Slow

Last updated: 2021-05-25 11:43:11

    Symptoms

    • Symptom 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.
    • Symptom 2: The upload is slow using a custom endpoint.

    Possible Causes

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

    Solutions

    Troubleshooting Procedure

    Checking the client-side network

    1. Run the following command to check whether the IPS of the IP address is the same as that of the client:

      ping COS endpoint

      Example:

      ping examplebucket-1250000000.cos.ap-beijing.mqcloud.com
    2. Check whether a proxy is enabled in the browser (Chrome is taken as an example).

      1. Open Chrome and click > Settings.

      2. Click Advanced. In the System area, click Open your computer’s proxy settings to open the configuration window of your OS.

        Check whether a proxy is enabled.

        • If yes, disable the proxy.
        • If not, perform Step 3.
    3. Check whether your Wi-Fi router limits the speed.

      • If yes, allocate the bandwidth as needed.
      • If not, perform Step 4.
    4. Test the performance of the upload to COS using the current network.
      The following example uses a 20 MB object and COS’s COSCMD to test the upload and download speeds:

      coscmd probe -n 1 -s 20

      A message similar to the following will be displayed, from which you can get the Average/Min/Max speeds:

    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 whether the client is accessing a bucket residing in a region in another country.

      • If yes, you are advised to enable COS’s Global Acceleration feature.
      • If not, please contact us.

    Modifying DNS record for your custom endpoint

    1. Check whether the custom endpoint is mapped to a COS endpoint.
      • If yes, please contact us.
        Common COS endpoints are as follows:
        XXX.cos.ap-beijing.myqcloud.com  (default COS endpoint)
        XXX.cos.accelerate.myqcloud.com (COS global acceleration endpoint)
        XXX.cos-website.ap-beijing.myqcloud.com (COS static website endpoint)
        XXX.picbj.myqcloud.com (COS’s default CI endpoint)
      • If not, perform Step 2.
        Common non-COS endpoints are as follows:
        XXX.file.myqcloud.com or XXX.cdn.dnsv1.com (Tencent Cloud’s CDN default endpoint)
        XXX.w.kunlungr.com (aliyunCDN default endpoint)
    2. Map the custom endpoint to the desired COS endpoint in the CNAME and upload data.
      Example: upload.mydomain.com cname XXX.cos.ap-beijing.myqcloud.com. For detailed directions, please see Enabling Custom Accelerated Domain Name.
    3. Modify the default COS endpoint of the client.
      The following uses C# as an example:
      CosXmlConfig config = new CosXmlConfig.Builder()
      .SetConnectionTimeoutMs(60000)  // Set the connection timeout in milliseconds. Defaults to 45000.
      .SetReadWriteTimeoutMs(40000)  // Set the read/write timeout period in milliseconds, which is 45,000 ms by default
      .IsHttps(true)  // Set HTTPS as default request method 
      .SetAppid(appid)  // Sets the APPID of your Tencent Cloud account
      .SetRegion(region)  // Sets the default bucket region
      .SetHost("XXXXXX.com") // Enter the custom endpoint.
      .SetDebugLog(true) .Build(); // Create the CosXmlConfig object.
      For more information about how to call other SDKs, please see SDK Overview.