Global acceleration scheme for OSS object storage

Time:2021-9-26

Business scenario

OSS object storage, as a mass, secure, low-cost and high lasting cloud storage service, is deeply loved by the majority of developers. However, in the global business scenario, whether OSS is located overseas or in mainland China, it will lead to poor upload and access quality of other users.

This paper aims to provide a low-cost global acceleration scheme based on OSS object storage.

Network architecture diagram

Global acceleration scheme for OSS object storage

conceptual design

Download scheme

Upload scheme

Configuration steps

  • Configure CDN acceleration
  1. Accelerate domain name configurationCustom domain nameThis domain name is used for subsequent object access. Source station information selectionOSS domain name, domain name type selectionCustomize OSS origin, the domain name is configured asOSS transport acceleration domain name {bucket}. Oss-accelerate.aliyuncs.com

    Global acceleration scheme for OSS object storage

  2. After successful creation, a CDN accelerated domain name (similar to XXX. Com. W.cdngslb. Com) will be generated

    Global acceleration scheme for OSS object storage

  3. If it is a private bucket, it needs to be enabled in the back to source configurationAlibaba cloud OSS private bucket back to source, access control – onURL authentication, fill inActive / standby key!

    Global acceleration scheme for OSS object storage

  • Configure DNS resolution

Resolve the custom domain name CNAME to the CDN accelerated domain name just configured

Global acceleration scheme for OSS object storage

  • Object access signature
/**

Comparative test

In this test, three schemes are compared, and the test pictures are 948kb.

  • Directly use OSS to speed up the domain name transmission scheme: the network time is not very stable, 0.48s fast and more than 1s slow

Global acceleration scheme for OSS object storage

  • Using CDN authentication + OSS transmission to speed up the domain name back to the source scheme: the network time to hit the CDN cache is about 0.15s, and the network time to the source is 1-2s

1. Command cache

Global acceleration scheme for OSS object storage

2. OSS transmission acceleration domain name back to source

Global acceleration scheme for OSS object storage

  • Using CDN authentication + OSS domain name back to the source scheme: hitting the CDN cache is similar to the above scheme, and the network back to the source takes another 4-7s

OSS domain name back to source

Global acceleration scheme for OSS object storage

From the above comparison test, it is obvious that the network transmission quality of CDN cache acceleration will be better. Compared with transmission acceleration, the cache of CDN at the nearest edge node is faster and more stable by selecting a high-quality link to fetch data from the OSS source station.

In terms of cost, the transmission acceleration is 1.6 yuan / g (excluding the traffic billing of OSS access), while the traffic billing of CDN acceleration only needs 0.x/g. Obviously, CDN acceleration saves more cost.

This work adoptsCC agreement, reprint must indicate the author and the link to this article