Object Storage Service (OSS) uses data centers distributed around the globe to implement transfer acceleration. When a request is sent to your bucket, it is parsed and routed to the data center where the bucket resides over the most optimal network path and protocol. The transfer acceleration feature provides an optimized end-to-end acceleration solution to access OSS over the Internet.

Scenarios

OSS transfer acceleration can be used in the following scenarios to accelerate access to OSS and improve user experience:
  • Accelerate remote data transfer

    For example, forums and online collaboration tools that provide services to users across the globe store data in OSS. However, upload and download speeds vary from region to region, which delivers an inconsistent user experience. OSS transfer acceleration allows users from different regions to access data in OSS over the most optimal network path. This accelerates data transfer and improves user experience.

  • Accelerate the uploads and downloads of gigabyte- and terabyte-grade objects

    When large objects are uploaded or downloaded over long geographical distances, transmission failures may occur due to high network latencies. Transfer acceleration combines optimal route selection, protocol stack tuning, and transmission algorithm optimization to reduce timeouts during remote transfer of large objects over the Internet. You can combine transfer acceleration with multipart upload, resumable upload, and resumable download to develop a solution to upload and download large objects over long distances. For more information, see Multipart upload and Resumable download .

  • Accelerate the downloads of non-static and cold data

    For example, user experience is a driving factor for product competitiveness and customer retention in applications that require high data download speeds, such as photo management applications, games, e-commerce applications, enterprise portal websites, and financial applications. High download speeds are also required to obtain comments on social networking applications. OSS transfer acceleration is a feature designed to accelerate OSS uploads and downloads. You can enable transfer acceleration to maximize bandwidth utilization and accelerate data transfer.

Accelerate endpoint types

After you enable transfer acceleration for a bucket, you can access the bucket by using the following two endpoints in addition to the default endpoint:

  • Global accelerate endpoint: oss-accelerate.aliyuncs.com. Transfer acceleration access points are distributed across the world. You can use this endpoint to accelerate data transfer for buckets in all regions.
  • Accelerate endpoint of regions outside mainland China: oss-accelerate-overseas.aliyuncs.com. Transfer acceleration access points are distributed across regions outside mainland China. This endpoint can be used to accelerate data transfer across buckets in the China (Hong Kong) region and regions outside mainland China.
In this example, ossutil is used to test the actual acceleration effect. The following figure shows the test results.

You can compare the access speeds when you use the accelerate and default endpoints to access OSS in different regions. For more information, see The Comparison of OSS Direct Data Transfer and Accelerated Data Transfer in Different Regions.

Implementation methods

For more information about how to enable transfer acceleration, see Enable transfer acceleration. When transfer acceleration is enabled, you can use an accelerate endpoint to implement transfer acceleration by using one of the following methods:
  • Browser
    When you use a browser to access data stored in OSS, replace the endpoint in the object URL with an accelerate endpoint. For example, replace https://test.oss-cn-shenzhen.aliyuncs.com/myphoto.jpg with https://test.oss-accelerate.aliyuncs.com/myphoto.jpg. For more information about how to obtain the URL of an object, see How do I obtain the URL of an uploaded object?. If the access control list (ACL) of the object you want to access is private, you must sign the access request.
    Note To accelerate access to a bucket with transfer acceleration enabled and a custom domain name mapped, configure CNAME to map your custom domain name to an accelerate endpoint. For more information about how to configure CNAME, see Bind accelerate endpoints.
  • ossutil

    When you use ossutil to access data stored in OSS, replace the endpoint specified in the configuration file with an accelerate endpoint. For more information about how to configure the endpoint when you use ossutil, see ossutil.

    You can also add the -e oss-accelerate.aliyuncs.com option to each command to manage OSS when you run ossutil commands. The following figure shows how to specify an accelerate endpoint when you run the cp command to upload an object by using ossutil.

    ossu
  • ossbrowser
    The following table describes the parameters that you must configure when you use ossbrowser to access data stored in OSS.
    Parameter Description
    Endpoint Select Customize and enter https://oss-accelerate.aliyuncs.com.
    AccessKeyId and AccessKeySecret Enter the AccessKey pair of your account. For more information about how to obtain the AccessKey pair, see Create an AccessKey pair.
    Notice To ensure data security, we recommend that you log on to ossbrowser by using the AccessKey pair of a Resource Access Management (RAM) user. Before you use the AccessKey pair of a RAM user to log on to ossbrowser, you must grant the following permissions to the RAM user: AliyunOSSFullAccess, AliyunRAMFullAccess, and AliyunSTSAssumeRoleAccess. For more information about how to grant the permissions, see Permission management.
    Preset OSS Path Specify permissions on a bucket or resources stored in the bucket. Format: oss://bucketname/path. For example, if you are authorized to access only objects or subdirectories in the examplefolder directory of a bucket named examplebucket, enter oss://examplebucket/examplefolder/.

    The following figure shows an example on how to specify an accelerate endpoint when you use ossbrowser.

    Transfer.jpg
  • SDK
    When you use SDKs for different programming languages to access OSS, set the endpoint parameter to an accelerate endpoint. The following code provides examples on how to specify an accelerate endpoint when you use OSS SDK for Java to perform simple upload and download:
    • Simple upload
      // Specify an accelerate endpoint. In this example, the global accelerate endpoint is used. 
      String endpoint = "https://oss-accelerate.aliyuncs.com";
      // Security risks may arise if you use the AccessKey pair of an Alibaba Cloud account to access OSS because the account has permissions on all API operations. We recommend that you use a RAM user to call API operations or perform routine O&M. To create a RAM user, log on to the RAM console. 
      String accessKeyId = "yourAccessKeyId";
      String accessKeySecret = "yourAccessKeySecret";
      
      // Create an OSSClient instance. 
      OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
      
      // Upload the object to OSS. yourLocalFile consists of the local file path and the file name. Example: /users/local/myfile.txt. 
      ossClient.putObject("yourBucketName", "yourObjectName", new File("yourLocalFile"));
      
      // Shut down the OSSClient instance. 
      ossClient.shutdown();
    • Simple download
      // Specify an accelerate endpoint. In this example, the global accelerate endpoint is used. 
      String endpoint = "https://oss-accelerate.aliyuncs.com";
      // Security risks may arise if you use the AccessKey pair of an Alibaba Cloud account to access OSS because the account has permissions on all API operations. We recommend that you use a RAM user to call API operations or perform routine O&M. To create a RAM user, log on to the RAM console. 
      String accessKeyId = "yourAccessKeyId";
      String accessKeySecret = "yourAccessKeySecret";
      // Specify the bucket name. 
      String bucketName = "yourBucketName";
      // Specify the full path of the object. The full path of the object cannot contain bucket names. Example: testfolder/exampleobject.txt. 
      String objectName = "yourObjectName";
      
      // Create an OSSClient instance. 
      OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
      
      // Download the object to a local file in the specified path. If the specified local file exists, it is overwritten by the downloaded object. Otherwise, the local file is created. 
      // By default, if yourLocalFile does not include the file path, the downloaded object is stored in the relative path of the project to which the sample program belongs. 
      ossClient.getObject(new GetObjectRequest(bucketName, objectName), new File("yourLocalFile"));
      
      // Shut down the OSSClient instance. 
      ossClient.shutdown();

Usage notes

  • You must complete real-name registration on the Real-name Registration page before you can enable transfer acceleration for a bucket.
  • Transfer acceleration takes effect within 30 minutes after it is enabled.
  • Transfer acceleration is applied only when you use an accelerate endpoint to access a bucket that has transfer acceleration enabled.
  • When you use an accelerate endpoint, you can manage only buckets that have transfer acceleration enabled.
  • After you enable transfer acceleration for a bucket, other endpoints of the bucket remain available. In scenarios where transfer acceleration is not required, you can use the default endpoint to avoid unnecessary charges.
  • To ensure data security, the protocol used in transmission may be changed from HTTP to HTTPS after the peer end receives the request. Therefore, when the client uses an accelerate endpoint to access OSS over HTTP, the protocol recorded in access logs may be HTTPS.
  • You are charged for the use of transfer acceleration. For more information, see Transfer acceleration fees.

FAQ

  • What are the differences between transfer acceleration and Alibaba Cloud CDN?
    Feature How it works Scenario
    Transfer acceleration Transfer acceleration provides an end-to-end acceleration solution by combining smart scheduling, protocol stack tuning, optimal route selection, and transmission algorithm optimization with OSS server-side configurations.
    • Accelerate object uploads.
    • Accelerate remote object uploads and downloads.
    • Accelerate the uploads and downloads of large objects.
    • Accelerate dynamic object updates and cold object downloads.
    Alibaba Cloud CDN OSS buckets can be used as origin servers and distribute the content to edge nodes. When users request content, Alibaba Cloud CDN delivers content to the users from the nodes that are nearest to them. This helps accelerate content delivery. Accelerate content delivery when a large number of users in the same region concurrently request the same static content.
  • How do I implement transfer acceleration based on a custom domain name?

    After you map a custom domain name to a bucket, you can map the CNAME to an accelerate endpoint. For more information, see Bind accelerate endpoints.

  • Why am I unable to list buckets by using an accelerate endpoint?

    Transfer acceleration is applicable only to third-level domains that contain a specific bucket name, such as https://BucketName.oss-accelerate.aliyuncs.com. The domain name in a ListBuckets request does not contain a bucket name. Therefore, accelerate endpoints cannot be used to list buckets. To list buckets in a specific region, we recommend that you use the default endpoint of the region, such as https://oss-cn-hangzhou.aliyuncs.com.