All Products
Search
Document Center

How to use Alibaba Cloud Content Delivery Network to accelerate OSS resources

Last Updated: Nov 18, 2021

Overview

Users directly access Alibaba Cloud OSS resources. The access speed is limited by the downstream bandwidth of OSS and the region of the bucket. If you use Alibaba Cloud Content Delivery Network to access OSS resources, the upper bandwidth limit is higher, and OSS resources can be cached to the nearest Alibaba Cloud Content Delivery Network node and distributed through Alibaba Cloud Content Delivery Network nodes. This shortens the network transmission distance, speeds up user calls, and costs less. This topic describes how to use Alibaba Cloud Content Delivery Network to accelerate access to OSS. The following issues are resolved by using Alibaba Cloud CDN Alibaba Cloud Content Delivery Network to accelerate OSS resources:

  • Static objects are accessed by a large number of users, which results in high server loads and I/O bottlenecks that decrease the access speed.
  • The number of static objects is too large to store in ECS instances.
  • Static file users have a large page view and are distributed everywhere.
  • Mobile update packages need to be downloaded at a high speed during a certain period of time, and the concurrent download volume is high.    

The returned message that indicates whether the request is successful.

Before you perform the following steps, confirm that you have created a bucket in OSS:

  1. Add a custom domain name:
    1. Log on to the OSS console, click Buckets, click the name of the target bucket, click Transmission Management > Domain Names, and then click Bind Domain Name.

    2. Enter the domain name that you want to bind and click Submit. If the bound domain name is Cloud DNS under the Alibaba Cloud account, you can select Automatically Add CNAME Record during the binding. You do not need to manually add CNAME records. If the bound domain name is not Cloud DNS under your Alibaba Cloud account, you must manually add a CNAME record in the DNS console after the domain name is successfully bound.

  2. Acceleration of OSS resources:
    On the Domain Names tab, click Not Configured for the Alibaba Cloud CDN Acceleration domain. The system is automatically redirected to the CDN console.
  3. Use Alibaba Cloud Content Delivery Network to accelerate OSS resources:
    1. Log on to the Alibaba Cloud Content Delivery Network console and choose Domain Names > Add Domain.
    2. Enter the accelerated domain name and other information based on the actual situation.
    3. Click Add Origin Information. On the Add Origin Information page, select OSS Domain Name for Origin Information and select the custom domain name that you bind to the OSS console. For more information about how to bind a custom domain name to a bucket, see Bind a custom domain name.
    4. After the configuration is complete, click OK.
  4. Add CNAME resolution. The Alibaba Cloud Content Delivery Network service takes effect only after the resolution is added.
  5. In the OSS console, on the Domain Name Management tab, turn on the Alibaba Cloud Content Delivery Network Cache Auto Refresh switch for the accelerated domain name.
    Note: If an object is updated after this operation, OSS automatically refreshes the updated object to the Alibaba Cloud Content Delivery Network cache node to refresh the cache in real time after the object is updated. After you unbind a bucket from a custom domain name, the OSS console does not support the Alibaba Cloud Content Delivery Network cache automatic refresh operation. You can configure it in the Alibaba Cloud Content Delivery Network console. For more information, see Refresh and preload resources.
  6. After the configuration is complete, the accelerated domain name is displayed in the Alibaba Cloud Content Delivery Network console. How to determine whether the Alibaba Cloud Content Delivery Network acceleration OSS takes effect? You can use the domain name of the Alibaba Cloud Content Delivery Network to access the URL of the previous resource of the bucket. The first access is obtained from the source. You can refresh the access multiple times to check whether it is hit. For more information about how to determine whether it is hit, see How to use the browser's review element to determine whether the Alibaba Cloud Content Delivery Network cache is successful.

References

Applicable scope

  • CDN
  • Object Storage Service (OSS)