This topic describes how to create and delete OSS accelerators and how to modify their cache capacity.
Prerequisites
The OSS accelerator feature is in public preview. The feature is available for public preview in the following regions: China (Hangzhou), China (Shanghai), China (Beijing), China (Ulanqab), China (Shenzhen), and Singapore.
Considerations
You can use the accelerated endpoint of an accelerator to access resources in the accelerator only over the internal network. If you want to cache OSS data that is accessed over the Internet, we recommend that you use Alibaba Cloud CDN.
The cached data on the OSS accelerator is a single replica. If the cache hardware fails, data must be prefetched again from OSS. The access speed decreases before the prefetch is complete.
After you create an OSS accelerator, you can modify the cache capacity of the accelerator only once per hour. For example, if you create an accelerator or modify the cache capacity of an accelerator at 08:10:00, you can modify the cache capacity again only after 09:10:00.
Create an accelerator
Create an accelerator.
Log on to the OSS console.
In the left-side navigation pane, click Buckets. On the Buckets page, find and click the desired bucket.
In the left-side navigation pane, choose
.On the OSS Accelerator page, click Create OSS Accelerator.
In the Activation Prompt dialog box, read the terms of service and click Next.
In the Create OSS Accelerator panel, select a Zone that is supported in the region where the target bucket is located, configure the Cache Capacity, and then click Next.
ImportantAfter you create an OSS accelerator, you can modify the cache capacity of the accelerator only once per hour. For example, if you create an accelerator or modify the cache capacity of an accelerator at 08:10:00, you can modify the cache capacity again only after 09:10:00. If you find that the cache capacity is incorrectly configured immediately after you create an accelerator, you can delete the accelerator, create a new accelerator, and configure the cache capacity.
Configure the cache capacity for the accelerator based on your business requirements. For example, 50 GB of hot data is stored in the bucket. The data volume is expected to increase by 20% to 30% in the coming months due to rapid business growth. In this case, you can set the cache capacity to a value that ranges from 70 to 80 GB.
Create an acceleration path.
In the Create Acceleration Path panel, configure the following parameters.
Parameter
Description
Acceleration Policy
Select an acceleration strategy for the accelerator.
Accelerate Specified Paths: Specify the access paths of file directories. You can add up to 10 paths. After you specify the paths, the accelerator accelerates only the files whose paths start with the specified paths.
If you need to accelerate only a small number of critical directories and you want to reduce costs, you can select Accelerate Specified Paths to allocate acceleration resources more precisely and avoid waste.
Accelerate The Entire Bucket: Accelerate all files in the bucket.
If your business requires high access speeds for all files in the bucket and you do not need to reduce costs, you can select Accelerate The Entire Bucket to ensure high-performance access to all files.
Synchronous Cache Warmup
If you enable synchronous cache warmup, when you write data to OSS by using the accelerated endpoint of the OSS accelerator, the data is written to both the OSS bucket and the OSS accelerator space. The next time you read the data, you can use the accelerated endpoint of the OSS accelerator to access the OSS accelerator space to obtain lower latency. In synchronous cache warmup mode, you can use a regular OSS endpoint to access only the OSS bucket but not the OSS accelerator space.
We recommend that you enable synchronous cache warmup in scenarios in which you require high real-time performance, perform frequent read and write operations, and are sensitive to user experience. We recommend that you do not enable synchronous cache warmup in scenarios in which you want to reduce costs, do not have high requirements on latency, frequently write data to OSS but seldomly read data from OSS, and store large amounts of data that may generate high storage fees.
After you complete the configurations, click Next. In the Please Confirm The Billing Items In The Settings dialog box, click OK.
Create a batch prefetch task (optional).
The batch prefetch feature of OSS accelerators allows you to asynchronously import OSS data to a high-performance cluster storage. This feature provides lower latency when you access the data next time. If you do not need to enable this feature, click the OK button. Read the billing information and then complete the creation of the OSS accelerator.
Modify the cache capacity of an accelerator
Log on to the OSS console.
In the left-side navigation pane, click Buckets. On the Buckets page, find and click the desired bucket.
In the left-side navigation pane, choose
. Then, click Details in the Actions column.In the Basic Information area of the OSS accelerator details page, click the
icon next to Cache Capacity.
In the Edit OSS Accelerator panel, modify Cache Capacity, click OK, and then confirm the modification.
ImportantAfter you create an OSS accelerator, you can modify the cache capacity of the accelerator only once per hour. For example, if you create an accelerator or modify the cache capacity of an accelerator at 08:10:00, you can modify the cache capacity again only after 09:10:00.
After you complete the modification, click OK.
Delete an accelerator
Note that deleting an accelerator clears only the cached data in the accelerator. The data stored in the OSS bucket is not affected.
Log on to the OSS console.
In the left-side navigation pane, click Buckets. On the Buckets page, find and click the desired bucket.
In the left-side navigation pane, choose
.In the OSS accelerator list, click Delete in the Actions column, or click Details to go to the OSS Accelerator page. In the Basic Information section, click the
icon in the upper-right corner.
In the dialog box that appears, enter the name of the accelerator and click OK to delete the accelerator.
What to do next
You can use OSS accelerator together with common OSS tools and OSS SDKs. For more information, see Use an accelerator.