Aliyun OSS object Storage configuration tutorial: low-cost High availability Illustration

In this article, we will deeply analyze the principles and characteristics of Ali Cloud OSS object storage, and guide you through detailed steps on how to configure and use Ali Cloud object storage service. Starting from the basic concept of object storage, we will explain its characteristics, the configuration of Ali Cloud object storage, and how to use it with CDN services.

object storage

object storage has the following characteristics:

(1) scalability: object storage can be easily extended horizontally to meet the storage needs of massive data. When you need to increase storage capacity, you can quickly add more nodes without affecting the performance and stability of the system.

(2) data redundancy and fault tolerance: object storage ensures the reliability and persistence of data through data copy and erasure code technology. Even if some storage nodes fail, you can ensure that the data is not lost.

(3) low cost: object storage usually uses cheap hard disk devices to achieve high performance and high availability through software-defined storage technology. This gives object storage a great advantage in terms of cost.

(4) High availability: object storage supports cross-regional data synchronization and access, ensuring high availability and low latency access of data between different regions.

Ali Cloud object storage configuration

creation OSS Bucket

the following describes how to configure Ali Cloud object storage:

(1) create storage space (Bucket): log in to the Ali Cloud console, enter the object storage OSS service, click create Bucket, enter the name, select region and storage type. The name here needs to be unique to distinguish between different storage spaces. When

creates a Bucket, you need to focus on the following information:

Bucket name: you can consider using domain name-storage content type, such as

Aliyun OSS object Storage configuration tutorial: low-cost High availability Illustration1

  • ;
  • region: it is recommended to have a region attribute, and the region is the same as the location of the server, because the products in the same region are interconnected with each other, so the speed is faster.domain-mediastorage type: if it is used as a static resource for a website and provides access to website users, select standard storage, and webmasters generally use OSS in the same way;
  • storage redundancy type: select local redundant storage;
  • read and write permissions: remember to select public read, unless your OSS storage resource is not open to the website;
  • resource group: select the default grouping. After
  • has completed the information about Bucket and set up, click OK to proceed to the next step.
  • (2) set access control (ACL): after you create a Bucket, you can set access control

Aliyun OSS object Storage configuration tutorial: low-cost High availability Illustration2

permissions, including public, private, and public read and write. Select the appropriate access control permissions according to the actual needs.

(3) configure cross-domain access (CORS): in the settings of Bucket, you can configure CORS rules to allow specific sources, HTTP methods, and HTTP headers to access your object store. This is particularly important for building Web applications because browsers often impose restrictions on cross-domain requests.

(4) set lifecycle rules: by configuring lifecycle rules, you can automatically delete or convert storage types of objects that are out of date or are no longer needed to save storage costs. For example, objects that have not been accessed for a long time can be automatically converted to low-frequency access storage types.

(5) upload and manage objects: in Bucket, objects can be uploaded, downloaded, and deleted. In addition, you can manage the metadata and access control permissions of objects. When uploading objects, you can choose whether to enable server-side encryption to protect the security of the data.

Point (2)-(5), for the general webmaster, there is no need to pay attention. We only need to fill in the Ali Cloud OSS configuration information after the Bucket creation is completed in the WPTurbo plug-in.

configures OSS object storage access domain name

(1) does not use CDN domain name

creates an access domain name for the previously created Bucket. You only need to enter the created Bucket, click “Bucket configuration”-“Domain name Management”, then click “bind Domain name”

, and then enter a subdomain name of your website, such as

, in the pop-up window. If your domain name is resolved in Aliyun, turn on automatically adding cname record to complete the domain name binding. Otherwise, you also need to go to the third-party domain name resolution to complete the addition of CNAME records. Finally,

Aliyun OSS object Storage configuration tutorial: low-cost High availability Illustration3

, complete the submission.oss.yourdomain.com(2)

Aliyun OSS object Storage configuration tutorial: low-cost High availability Illustration4

uses the CDN domain name

if you want to use the CDN domain name as the access domain name stored by Aliyun OSS object. You can visit the CDN console, enter the CDN domain name management interface that you need to bind to OSS object storage, and click “add Origin Server Information”.then add the origin server information, select the OSS domain name, and select the domain name corresponding to the OSS object storage Bucket that you need to access using the CDN domain name, set the priority as the main, and set the weight and port to the default, and finally click “OK”.

warm Tip: when you set the OSS domain name as the primary domain name of the origin server information, you need to set the origin server domain name to slave.

Aliyun OSS object Storage configuration tutorial: low-cost High availability Illustration5

configure WPTurbo plug-in object Storage Settings

First, enter the WPTurbo plug-in, select the “object storage” tab, turn on the object storage switch, select the service provider as Aliyun, and then click “configure API”; then, enter the configuration API page, where you need to fill in a lot of information;

Aliyun OSS object Storage configuration tutorial: low-cost High availability Illustration6

ACCESSKey ID: log in to the Aliyun workbench & gt;, click the main account avatar & gt;AccessKey Management to create and generate.

AccessKey Secret: generated together when you create an ACCESSKey ID build.

Aliyun OSS object Storage configuration tutorial: low-cost High availability Illustration7

BUCKET: the BUCKET name that you filled in when you created the BUCKET earlier.

Aliyun OSS object Storage configuration tutorial: low-cost High availability Illustration8

  • ENDPOINT: enter the Bucket list of Aliyun OSS, and find the corresponding Bucket to view the overview & gt; access port & gt; public network access corresponding Endpoint.
    Aliyun OSS object Storage configuration tutorial: low-cost High availability Illustration9
  • access domain name: enter the Bucket list of Aliyun OSS, and click the corresponding Bucket>Bucket configuration & gt; Domain name Management & gt; binding domain name. It should be noted that if you use the CDN domain name as the access domain name of the OSS object to store Bucket, you can enter the CDN domain name here. If not, enter the sub-domain name of the website you added and configured. After
  • completes the above API configuration, click “Save Settings”. Finally, click “File Service configuration” corresponding to the service mode at the bottom of the object Storage tab of
    Aliyun OSS object Storage configuration tutorial: low-cost High availability Illustration10
  • .
    Aliyun OSS object Storage configuration tutorial: low-cost High availability Illustration11
  • backup only: if you select this option, it means that the resources stored in the OSS are private, and the read and write permissions should also be set to private when you created the Bucket earlier.

access service (saving local files): that is, storing website resources on your server and OSS at the same time.

access service (delete local files): you can select this option if you do not want to keep resources synchronized to OSS on your web server. However, please proceed with caution.

  • finally clicks “Save” and click “Save Settings” under the plugin settings to make sure the settings take effect.
  • is very important: in addition, because the old data of the website is not automatically synchronized to OSS when CDN and OSS are used together, in this case, you also need to set up the mirrored origin-pull of the object bucket.
  • enters the Bucket corresponding to Ali Cloud COS, click “Image back to Origin” under “data Management”, and then click the create rules button. Set according to the following figure:

Aliyun OSS object Storage configuration tutorial: low-cost High availability Illustration12

focuses on the origin-pull address, http or https, which should be selected according to your website. Then enter your website domain name (pay attention to whether there is www). Other settings can be set by default.

finally clicks “OK”.

Webmasters who adopt the CDN+OSS strategy must set the mirror back to the origin of the OSS object storage, otherwise, the old data of the website cannot be synchronized to OSS.

Ali Cloud object Storage combined with CDN

combines Ali Cloud object Storage with CDN to further improve the access speed and availability of resources. The following are the basic steps of configuration:

(1) activate CDN service: log in to Ali Cloud console, log in to CDN service, and create accelerated domain name. Choose the appropriate type of acceleration, such as pictures, small files, large files, etc.

Aliyun OSS object Storage configuration tutorial: low-cost High availability Illustration13

(2) configure origin server information: in the setting of accelerated domain name, select Aliyun OSS as the origin server, and select the corresponding Bucket and region. In this way, the CDN node takes resources from your object store and accelerates distribution.

(3) configure caching policy: you can configure the caching policy of CDN according to the actual needs. For example, you can set the cache expiration time, cache content type, and so on.

(4) configure HTTPS: in order to ensure the security of data transmission, it is recommended to configure HTTPS certificates for accelerated domain names. Aliyun CDN supports free Let’s Encrypt certificates and user-defined certificates. For the specific operations of the above steps of

, you can read the “Ali Cloud CDN configuration using Picture and text tutorial”.

but what if you need to use Ali Cloud object Storage with CDN? What you must do is that

(1) adds the OSS domain name to the origin server information corresponding to the CDN accelerated domain name, and sets the priority as the primary; the priority of the website domain name is changed to standby.

(2) then sets the access domain name of the Bucket corresponding to the OSS object storage to the CDN domain name, and this general Aliyun will automatically add the CDN domain name as the access domain name of Bucket.

summary

this article introduces the principle, characteristics, configuration and usage of Ali Cloud OSS object storage in detail. By using Ali Cloud object Storage, you can easily implement highly scalable, highly available, low-cost data storage services. At the same time, using it in conjunction with CDN services can further improve the speed and availability of resource access.

We hope this article will help you better understand Ali Cloud object Storage and apply it to real-world projects. Please adjust the configuration and optimization strategy according to your needs to achieve the best storage and access results.

Note: Tencent Cloud, Baidu Cloud and Huawei Cloud are more or less the same as Aliyun’s OSS object storage configuration and the combination of CDN and object storage. It is hoped that the above tutorials will play an analogous role.

本文详细介绍了阿里云OSS对象存储的原理、特点以及配置和使用方法。通过使用阿里云对象存储,您可以轻松实现高可扩展、高可用、低成本的数据存储服务。同时,将其与CDN服务结合使用,可以进一步提升资源访问速度和可用性。

我们希望本文能够帮助您更好地了解阿里云对象存储,并将其应用于实际项目中。请根据自己的需求调整配置和优化策略,以实现最佳的存储和访问效果。

注:腾讯云、百度云和华为云,与阿里云的OSS对象存储配置,及CDN和对象存储结合的方式和操作大同小异,希望上述教程起到触类旁通的作用。

Disclaimer: All articles on this website, unless otherwise specified or marked, are original and published on this website. Any individual or organization is prohibited from copying, stealing, collecting, or publishing the content of this site to any website, book, or other media platform without the consent of this site. If the content on this website infringes on the legitimate rights and interests of the original author, you can contact us for assistance.