Transfer acceleration

Updated at: 2025-04-01 16:46

You can enable transfer acceleration to accelerate the uploads and downloads of objects in a bucket over long distances. For example, if you are located in the Chinese mainland, you can enable transfer acceleration when you upload objects to or download objects from a bucket that is located outside the Chinese mainland. This way, data uploads or downloads are accelerated. The transfer acceleration feature provides an optimized end-to-end solution with data centers distributed around the world to accelerate access to Object Storage Service (OSS) over the Internet. When the feature is enabled, requests destined for your bucket are routed to the data center nearest to users by using the optimal network path and protocol.

Prerequisites

Real-name registration for the current Alibaba Cloud account is completed. For more information, see How do I complete real-name registration?

Scenarios

  • Accelerate remote data transfer

    Forums and online collaboration tools that provide services to users across the globe can store data in OSS. Transfer acceleration allows users from different regions to access data in OSS by using the optimal network path. This accelerates data transfer and improves user experience.

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

    When large objects are uploaded or downloaded over long 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 transfers of large objects over the Internet. You can combine transfer acceleration with multipart upload and resumable download to implement a solution for long-distance uploads and downloads of large objects.

  • Accelerate downloads of dynamic and cold data

    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 positive feedback on social networking applications. You can use transfer acceleration to maximize bandwidth utilization and accelerate data transfers from OSS.

Usage notes

  • You are charged transfer acceleration fees when you use an acceleration endpoint to accelerate data uploads. You are charged transfer acceleration fees and fees for outbound traffic over the Internet when you use an acceleration endpoint to accelerate data downloads. For example, if you use an acceleration endpoint to download 1 GB of data from a bucket for which transfer acceleration is enabled, you are charged transfer acceleration fees of 1 GB of data and fees for 1 GB of outbound traffic over the Internet. For more information, see Transfer acceleration fees and Traffic fees.

  • When transfer acceleration is enabled, an acceleration endpoint is required to improve the access speed. However, you can still use the default endpoint to access OSS. In scenarios in which transfer acceleration is not required, you can use the default endpoint to prevent unnecessary charges. For more information about the default endpoint, see Regions and endpoints.

  • When you access OSS by calling API operations with an acceleration endpoint specified, only the HTTP or HTTPS protocol is supported. Other protocols, such as Real-Time Messaging Protocol (RTMP) are not supported.

  • Based on the transfer acceleration logic, HTTPS may be used to ensure secure data transfers. Even if the client uses an acceleration endpoint to access a bucket over HTTP, the protocol recorded in the access log may be HTTPS.

Enable transfer acceleration

After you enable transfer acceleration for a bucket, you can access the bucket by using the default endpoint or one of the following acceleration endpoints:

  • Global acceleration endpoint: oss-accelerate.aliyuncs.com. Acceleration endpoints are distributed around the world. You can use a global acceleration endpoint to accelerate data transfer for buckets in all regions.

  • Acceleration endpoint of regions outside the Chinese mainland: oss-accelerate-overseas.aliyuncs.com. Acceleration endpoints are distributed across regions outside the Chinese mainland. You can use the acceleration endpoint of regions outside the Chinese mainland only when you add a CNAME record to point a mapped custom domain for which ICP filing was not obtained to the OSS-accelerated domain of a bucket that is located in the China (Hong Kong) region or other regions outside the Chinese mainland.

You can use one of the following methods to enable transfer acceleration.

Use the OSS console
Use OSS SDKs
Use ossutil
  1. Log on to the OSS console.

  2. In the left-side navigation pane, click Buckets. On the Buckets page, find and click the desired bucket.

  3. In the left-side navigation tree, choose Bucket Settings > Transfer Acceleration.

  4. On the Transfer Acceleration page, turn on Transfer Acceleration and click OK in the message that appears.

    After you enable or disable transfer acceleration, approximately 30 minutes are required to allow the changes to take effect.

The following sample code provides examples on how to enable transfer acceleration by using OSS SDKs for common programming languages. For more information about how to enable transfer acceleration by using OSS SDKs for other programming languages, see Overview.

Java
Python
Go
import com.aliyun.oss.ClientException;
import com.aliyun.oss.OSS;
import com.aliyun.oss.common.auth.*;
import com.aliyun.oss.OSSClientBuilder;
import com.aliyun.oss.OSSException;

public class Demo {

    public static void main(String[] args) throws Exception {
        // In this example, the endpoint of the China (Hangzhou) region is used. Specify your actual endpoint. 
        String endpoint = "https://oss-cn-hangzhou.aliyuncs.com";
        // Obtain access credentials from environment variables. Before you run the sample code, make sure that the OSS_ACCESS_KEY_ID and OSS_ACCESS_KEY_SECRET environment variables are configured. 
        EnvironmentVariableCredentialsProvider credentialsProvider = CredentialsProviderFactory.newEnvironmentVariableCredentialsProvider();
        // Specify the name of the bucket. Example: examplebucket. 
        String bucketName = "examplebucket";
        // Specify the region in which the bucket is located. For example, if the bucket is located in the China (Hangzhou) region, set the region to cn-hangzhou.
        String region = "cn-hangzhou";

        // Create an OSSClient instance. 
        ClientBuilderConfiguration clientBuilderConfiguration = new ClientBuilderConfiguration();
        clientBuilderConfiguration.setSignatureVersion(SignVersion.V4);        
        OSS ossClient = OSSClientBuilder.create()
        .endpoint(endpoint)
        .credentialsProvider(credentialsProvider)
        .clientConfiguration(clientBuilderConfiguration)
        .region(region)               
        .build();

        try {
            // Configure transfer acceleration for the bucket. 
            // If enabled is set to true, transfer acceleration is enabled. If enabled is set to false, transfer acceleration is disabled. 
            boolean enabled = true;
            ossClient.setBucketTransferAcceleration(bucketName, enabled);

        } catch (OSSException oe) {
            System.out.println("Caught an OSSException, which means your request made it to OSS, "
                    + "but was rejected with an error response for some reason.");
            System.out.println("Error Message:" + oe.getErrorMessage());
            System.out.println("Error Code:" + oe.getErrorCode());
            System.out.println("Request ID:" + oe.getRequestId());
            System.out.println("Host ID:" + oe.getHostId());
        } catch (ClientException ce) {
            System.out.println("Caught an ClientException, which means the client encountered "
                    + "a serious internal problem while trying to communicate with OSS, "
                    + "such as not being able to access the network.");
            System.out.println("Error Message:" + ce.getMessage());
        } finally {
            if (ossClient != null) {
                ossClient.shutdown();
            }
        }
    }
}
import oss2
from oss2.credentials import EnvironmentVariableCredentialsProvider

# Obtain access credentials from environment variables. Before you run the sample code, make sure that the OSS_ACCESS_KEY_ID and OSS_ACCESS_KEY_SECRET environment variables are configured. 
auth = oss2.ProviderAuthV4(EnvironmentVariableCredentialsProvider())

# Specify the endpoint of the region in which the bucket is located. For example, if the bucket is located in the China (Hangzhou) region, set the endpoint to https://oss-cn-hangzhou.aliyuncs.com. 
endpoint = "https://oss-cn-hangzhou.aliyuncs.com"
# Specify the ID of the region that maps to the endpoint. Example: cn-hangzhou. This parameter is required if you use the signature algorithm V4.
region = "cn-hangzhou"

# Specify the name of the bucket.
bucket = oss2.Bucket(auth, endpoint, "examplebucket", region=region)

# Configure transfer acceleration for the bucket. 
# If enabled is set to true, transfer acceleration is enabled. If enabled is set to false, transfer acceleration is disabled. 
enabled = 'true'
bucket.put_bucket_transfer_acceleration(enabled)
package main

import (
	"context"
	"flag"
	"log"

	"github.com/aliyun/alibabacloud-oss-go-sdk-v2/oss"
	"github.com/aliyun/alibabacloud-oss-go-sdk-v2/oss/credentials"
)

// Define global variables.
var (
	region     string // Region in which the bucket is located.
	bucketName string // Name of the bucket.
)

// Specify the init function used to initialize command line parameters.
func init() {
	flag.StringVar(&region, "region", "", "The region in which the bucket is located.")
	flag.StringVar(&bucketName, "bucket", "", "The name of the bucket.")
}

func main() {
	// Parse command line parameters.
	flag.Parse()

	// Check whether the name of the bucket is specified.
	if len(bucketName) == 0 {
		flag.PrintDefaults()
		log.Fatalf("invalid parameters, bucket name required")
	}

	// Check whether the region is specified.
	if len(region) == 0 {
		flag.PrintDefaults()
		log.Fatalf("invalid parameters, region required")
	}

	// Load the default configurations and specify the credential provider and region.
	cfg := oss.LoadDefaultConfig().
		WithCredentialsProvider(credentials.NewEnvironmentVariableCredentialsProvider()).
		WithRegion(region)

	// Create an OSS client.
	client := oss.NewClient(cfg)

	// Create a request to enable transfer acceleration for the bucket.
	request := &oss.PutBucketTransferAccelerationRequest{
		Bucket: oss.Ptr(bucketName), // Name of the bucket.
		TransferAccelerationConfiguration: &oss.TransferAccelerationConfiguration{
			Enabled: oss.Ptr(true), // Enable transfer acceleration.
		},
	}

	// Execute the request to enable transfer acceleration.
	result, err := client.PutBucketTransferAcceleration(context.TODO(), request)
	if err != nil {
		log.Fatalf("failed to put bucket transfer acceleration %v", err)
	}

	// Display the result.
	log.Printf("put bucket transfer acceleration result:%#v\n", result)
}

You can enable transfer acceleration for a bucket by using ossutil. For more information about how to install ossutil, see Install ossutil.

The following command provides an example on how to enable transfer acceleration for a bucket named examplebucket:

ossutil api put-bucket-transfer-acceleration --bucket examplebucket --transfer-acceleration-configuration "{\"Enabled\":\"true\"}"

For more information about this command, see put-bucket-transfer-acceleration.

Use transfer acceleration

Use a browser
Use ossutil
Use ossbrowser 1.0
Use OSS SDKs

When you use an object URL to access an object from a browser, replace the endpoint part of the URL with an acceleration endpoint. For example, to use transfer acceleration to accelerate access to https://test.oss-cn-shenzhen.aliyuncs.com/myphoto.jpg, change the URL to https://test.oss-accelerate.aliyuncs.com/myphoto.jpg. If the access control list (ACL) of the object that you want to access is private, you must sign the access request.

  • If you need to accelerate access to objects in a bucket by using ossutil, replace the endpoint specified in the configuration file with an acceleration endpoint.

    • Find and open the configuration file of ossutil. By default, the configuration file is stored in the following path:

      • Linux/home/user/.ossutilconfig

      • WindowsC:\Users\user\.ossutilconfig

      • macOS/Users/user/.ossutilconfig

      If you specify a different path when you configure ossutil, go to the specified path.

    • Modify the endpoint. In the configuration file, find the endpoint field and change its value to the acceleration endpoint:

      [Credentials]
      endpoint = oss-accelerate.aliyuncs.com
      accessKeyID = yourAccessKeyID
      accessKeySecret = yourAccessKeySecret
      region=cn-hangzhou

      Save the configuration file to allow the modifications to take effect.

  • When you run commands in ossutil, you can add -e oss-accelerate.aliyuncs.com to the commands, which only takes effect for the current command. The following command provides an example on how to specify an acceleration endpoint when you run the cp command to upload an object by using ossutil.

    ossutil cp /path/to/local/file oss://examplebucket/exampleobject  -e  oss-accelerate.aliyuncs.com
Important

When you access a bucket by using ossbrowser, you must specify your AccessKey pair and the preset path of the bucket or the directory of the bucket in OSS.

The following table describes the parameters that you must configure when you use ossbrowser to access objects in OSS.

Parameter

Description

Endpoint

Select Customize and enter https://oss-accelerate.aliyuncs.com.

AccessKeyId and AccessKeySecret

Provide the AccessKey pair of your account. For more information about how to obtain the AccessKey pair, see Obtain an AccessKey pair.

Important

To ensure data security, we recommend that you use the AccessKey pair of a RAM user to log on to ossbrowser. To log on as a RAM user, make sure that the following policies are attached to the RAM user: AliyunOSSFullAccess, AliyunRAMFullAccess, and AliyunSTSAssumeRoleAccess. For more information, see Manage permissions.

Preset OSS Path

Specify the bucket or the directory of the bucket to which the user has access. Format: oss://bucketname/path For example, if you are authorized to access only objects and subdirectories in the examplefolder directory of a bucket named examplebucket, enter oss://examplebucket/examplefolder/.

Example:

Transfer.jpg

If you need to accelerate data access by using OSS SDKs, set the endpoint parameter to an acceleration endpoint. The following sample code provides examples on how to accelerate simple uploads and simple downloads by using OSS SDK for Java and OSS SDK for Go.

  • Simple upload

    Java
    Go
    import com.aliyun.oss.ClientException;
    import com.aliyun.oss.OSS;
    import com.aliyun.oss.common.auth.*;
    import com.aliyun.oss.OSSClientBuilder;
    import com.aliyun.oss.OSSException;
    import com.aliyun.oss.model.PutObjectRequest;
    import java.io.File;
    
    public class Demo {
    
        public static void main(String[] args) throws Exception {
            // Specify an acceleration endpoint. In this example, the global acceleration endpoint is used. 
            String endpoint = "https://oss-accelerate.aliyuncs.com";
            // We recommend that you do not save access credentials in the project code. Otherwise, access credentials may be leaked, which compromises the security of all resources in your account. In this example, access credentials are obtained from environment variables. Before you run the sample code, make sure that the environment variables are configured. 
            EnvironmentVariableCredentialsProvider credentialsProvider = CredentialsProviderFactory.newEnvironmentVariableCredentialsProvider();
            // Specify the name of the bucket. Example: examplebucket. 
            String bucketName = "examplebucket";
            // Specify the full path of the object. Example: exampledir/exampleobject.txt. Do not include the bucket name in the full path. 
            String objectName = "exampledir/exampleobject.txt";
            // Specify the full path of the local file. Example: D:\\localpath\\examplefile.txt. 
            // If the path of the local file is not specified, the local file is uploaded from the path of the project to which the sample program belongs. 
            String filePath= "D:\\localpath\\examplefile.txt";
    
            // Specify the region in which the bucket is located. For example, if the bucket is located in the China (Hangzhou) region, set the region to cn-hangzhou. 
            String region = "cn-hangzhou";
    
            // Create an OSSClient instance. 
            ClientBuilderConfiguration clientBuilderConfiguration = new ClientBuilderConfiguration();
            // Explicitly declare the use of the V4 signature algorithm.
            clientBuilderConfiguration.setSignatureVersion(SignVersion.V4);        
            OSS ossClient = OSSClientBuilder.create()
            .endpoint(endpoint)
            .credentialsProvider(credentialsProvider)
            .clientConfiguration(clientBuilderConfiguration)
            .region(region)               
            .build();
    
            try {
                // Create a PutObjectRequest object.             
                PutObjectRequest putObjectRequest = new PutObjectRequest(bucketName, objectName, filePath);
                // Optional. Specify the storage class and ACL of the object. 
                // ObjectMetadata metadata = new ObjectMetadata();
                // metadata.setHeader(OSSHeaders.OSS_STORAGE_CLASS, StorageClass.Standard.toString());
                // metadata.setObjectAcl(CannedAccessControlList.Private);
                // putObjectRequest.setMetadata(metadata);
    
                // Upload the object. 
                ossClient.putObject(putObjectRequest);
            } catch (OSSException oe) {
                System.out.println("Caught an OSSException, which means your request made it to OSS, "
                        + "but was rejected with an error response for some reason.");
                System.out.println("Error Message:" + oe.getErrorMessage());
                System.out.println("Error Code:" + oe.getErrorCode());
                System.out.println("Request ID:" + oe.getRequestId());
                System.out.println("Host ID:" + oe.getHostId());
            } catch (ClientException ce) {
                System.out.println("Caught an ClientException, which means the client encountered "
                        + "a serious internal problem while trying to communicate with OSS, "
                        + "such as not being able to access the network.");
                System.out.println("Error Message:" + ce.getMessage());
            } finally {
                if (ossClient != null) {
                    ossClient.shutdown();
                }
            }
        }
    }            
    package main
    
    import (
    	"context"
    	"flag"
    	"log"
    
    	"github.com/aliyun/alibabacloud-oss-go-sdk-v2/oss"
    	"github.com/aliyun/alibabacloud-oss-go-sdk-v2/oss/credentials"
    )
    
    // Specify the global variables.
    var (
    	region     string // The region in which the bucket is located.
    	bucketName string // The name of the bucket.
    	objectName string // The name of the object.
    )
    
    // Specify the init function used to initialize command line parameters.
    func init() {
    	flag.StringVar(&region, "region", "", "The region in which the bucket is located.")
    	flag.StringVar(&bucketName, "bucket", "", "The name of the bucket.")
    	flag.StringVar(&objectName, "object", "", "The name of the object.")
    }
    
    func main() {
    	// Parse command line parameters.
    	flag.Parse()
    
    	// Check whether the bucket name is empty.
    	if len(bucketName) == 0 {
    		flag.PrintDefaults()
    		log.Fatalf("invalid parameters, bucket name required")
    	}
    
    	// Check whether the region in which the bucket is located is empty.
    	if len(region) == 0 {
    		flag.PrintDefaults()
    		log.Fatalf("invalid parameters, region required")
    	}
    
    	// Check whether the object name is empty.
    	if len(objectName) == 0 {
    		flag.PrintDefaults()
    		log.Fatalf("invalid parameters, object name required")
    	}
    
    	// Load the default configurations and specify the credential provider and region.
    	cfg := oss.LoadDefaultConfig().
    		WithCredentialsProvider(credentials.NewEnvironmentVariableCredentialsProvider()).
    		WithRegion(region).
    		WithEndpoint("oss-accelerate.aliyuncs.com") // Specify the acceleration endpoint.
    
    	// Create an OSSClient instance.
    	client := oss.NewClient(cfg)
    
    	// Specify the path of the local file that you want to upload. Example: /Users/localpath/exampleobject.txt.
    	localFile := "/Users/localpath/exampleobject.txt"
    
    	// Create a request to upload the local file.
    	putRequest := &oss.PutObjectRequest{
    		Bucket:       oss.Ptr(bucketName),      // Specify the name of the bucket.
    		Key:          oss.Ptr(objectName),      // Specify the name of the object.
    		StorageClass: oss.StorageClassStandard, // Set the storage class of the object to Standard.
    		Acl:          oss.ObjectACLPrivate,     // Set the ACL of the object to private.
    	}
    
    	// Execute the request to upload the local file.
    	result, err := client.PutObjectFromFile(context.TODO(), putRequest, localFile)
    	if err != nil {
    		log.Fatalf("failed to put object from file %v", err)
    	}
    
    	// Display the result of the object upload.
    	log.Printf("put object result:%#v\n", result)
    }
    
  • Simple download

    Java
    Go
    import com.aliyun.oss.ClientException;
    import com.aliyun.oss.OSS;
    import com.aliyun.oss.common.auth.*;
    import com.aliyun.oss.OSSClientBuilder;
    import com.aliyun.oss.OSSException;
    import com.aliyun.oss.model.GetObjectRequest;
    import java.io.File;
    
    public class Demo {
    
        public static void main(String[] args) throws Exception {
            // Specify an acceleration endpoint. In this example, the global acceleration endpoint is used. 
            String endpoint = "https://oss-accelerate.aliyuncs.com";
            // We recommend that you do not save access credentials in the project code. Otherwise, access credentials may be leaked, which compromises the security of all resources in your account. In this example, access credentials are obtained from environment variables. Before you run the sample code, make sure that the environment variables are configured. 
            EnvironmentVariableCredentialsProvider credentialsProvider = CredentialsProviderFactory.newEnvironmentVariableCredentialsProvider();
            // Specify the name of the bucket. Example: examplebucket. 
            String bucketName = "examplebucket";
            // Specify the full path of the object. Do not include the bucket name in the full path. Example: testfolder/exampleobject.txt. 
            String objectName = "testfolder/exampleobject.txt";
            String filePath = "D:\\localpath\\examplefile.txt";
    
            // Specify the region in which the bucket is located. For example, if the bucket is located in the China (Hangzhou) region, set the region to cn-hangzhou. 
            String region = "cn-hangzhou";
    
            // Create an OSSClient instance. 
            ClientBuilderConfiguration clientBuilderConfiguration = new ClientBuilderConfiguration();
            // Explicitly declare the use of the V4 signature algorithm.
            clientBuilderConfiguration.setSignatureVersion(SignVersion.V4);        
            OSS ossClient = OSSClientBuilder.create()
            .endpoint(endpoint)
            .credentialsProvider(credentialsProvider)
            .clientConfiguration(clientBuilderConfiguration)
            .region(region)               
            .build();
    
            try {
                // Download the object as a local file in the specified path. If a file that has the same name already exists in the path, the downloaded object overwrites the file. If no file that has the same name exists in the path, the downloaded object is saved in the path. 
                // If you do not specify a local path for the downloaded object, the downloaded object is saved to the path of the project to which the sample program belongs. 
                ossClient.getObject(new GetObjectRequest(bucketName, objectName), new File(filePath));
            } catch (OSSException oe) {
                System.out.println("Caught an OSSException, which means your request made it to OSS, "
                        + "but was rejected with an error response for some reason.");
                System.out.println("Error Message:" + oe.getErrorMessage());
                System.out.println("Error Code:" + oe.getErrorCode());
                System.out.println("Request ID:" + oe.getRequestId());
                System.out.println("Host ID:" + oe.getHostId());
            } catch (ClientException ce) {
                System.out.println("Caught an ClientException, which means the client encountered "
                        + "a serious internal problem while trying to communicate with OSS, "
                        + "such as not being able to access the network.");
                System.out.println("Error Message:" + ce.getMessage());
            } finally {
                if (ossClient != null) {
                    ossClient.shutdown();
                }
            }
        }
    }
    package main
    
    import (
    	"context"
    	"flag"
    	"log"
    
    	"github.com/aliyun/alibabacloud-oss-go-sdk-v2/oss"
    	"github.com/aliyun/alibabacloud-oss-go-sdk-v2/oss/credentials"
    )
    
    // Specify the global variables.
    var (
    	region     string // The region in which the bucket is located.
    	bucketName string // The name of the bucket.
    	objectName string // The name of the object.
    )
    
    // Specify the init function used to initialize command line parameters.
    func init() {
    	flag.StringVar(&region, "region", "", "The region in which the bucket is located.")
    	flag.StringVar(&bucketName, "bucket", "", "The name of the bucket.")
    	flag.StringVar(&objectName, "object", "", "The name of the object.")
    }
    
    func main() {
    	// Parse command line parameters.
    	flag.Parse()
    
    	// Check whether the bucket name is empty.
    	if len(bucketName) == 0 {
    		flag.PrintDefaults()
    		log.Fatalf("invalid parameters, bucket name required")
    	}
    
    	// Check whether the region in which the bucket is located is empty.
    	if len(region) == 0 {
    		flag.PrintDefaults()
    		log.Fatalf("invalid parameters, region required")
    	}
    
    	// Check whether the object name is empty.
    	if len(objectName) == 0 {
    		flag.PrintDefaults()
    		log.Fatalf("invalid parameters, object name required")
    	}
    
    	// Load the default configurations and specify the credential provider and region.
    	cfg := oss.LoadDefaultConfig().
    		WithCredentialsProvider(credentials.NewEnvironmentVariableCredentialsProvider()).
    		WithRegion(region).
    		WithEndpoint("oss-accelerate.aliyuncs.com") // Specify the acceleration endpoint.
    
    	// Create an OSSClient instance.
    	client := oss.NewClient(cfg)
    
    	// Specify the full path in which you want to store the downloaded object. Example: /Users/localpath/downloadobject.txt.
    	localFile := "/Users/localpath/exampleobject.txt"
    
    	// Create a request to download the object.
    	getRequest := &oss.GetObjectRequest{
    		Bucket: oss.Ptr(bucketName), // The name of the bucket.
    		Key:    oss.Ptr(objectName), // The name of the object.
    	}
    
    	// Download the object to your local computer and display the download result.
    	result, err := client.GetObjectToFile(context.TODO(), getRequest, localFile)
    	if err != nil {
    		log.Fatalf("failed to get object to file %v", err)
    	}
    
    	log.Printf("Get object sucessfully, Result: HTTPStatusCode=%d, ContentLength=%d\n", result.StatusCode, result.ContentLength)
    }
    

Test the effect of transfer acceleration

Use ossutil

You can run commands in ossutil to upload an object to OSS by using the default endpoint and an acceleration endpoint, respectively. You can compare the time that is used to upload the object to verify the effect of transfer acceleration. In the sample commands shown in the following figure, -e oss-us-west-1.aliyuncs.com is used to upload the object by using the default endpoint, and -e oss-accelerate.aliyuncs.com is used to upload the object by using the acceleration endpoint.

FAQ

Does OSS support other acceleration solutions in addition to transfer acceleration?

Yes, OSS also supports access acceleration based on Alibaba Cloud CDN. For more information, see Use Alibaba Cloud CDN to accelerate access to OSS objects.

Can I configure multiple acceleration solutions at the same time?

Yes, you can configure multiple acceleration solutions at the same time. For example, after you enable Alibaba Cloud CDN, you can also enable transfer acceleration, specify the OSS-accelerated domain as the origin of the CDN-accelerated domain, and then map the CDN-accelerated domain to the OSS bucket. For more information, see Map accelerated domain names.

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

Transfer acceleration takes effect only for domain names in the https://BucketName.oss-accelerate.aliyuncs.com format. Acceleration endpoints do not include a bucket name. Therefore, acceleration 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 for the China (Hangzhou) region.

OSS API

If your business requires a high level of customization, you can directly call the RESTful APIs. To directly call a RESTful API, you must include the signature calculation in your code. For more information, see PutBucketTransferAcceleration.

  • On this page (1)
  • Prerequisites
  • Scenarios
  • Usage notes
  • Enable transfer acceleration
  • Use transfer acceleration
  • Test the effect of transfer acceleration
  • FAQ
  • OSS API
Feedback