Updated on 2023-06-20 GMT+08:00

Practices

After finishing basic operations such as creating a bucket and uploading or downloading an object, you can use the commonly used OBS practices if needed.

Table 1 Commonly used best practices

Practice

Description

Data backup

Using Backup Software to Back Up Local Data to OBS

Third-party backup software, such as Commvault and AnyBackup Cloud, can connect to OBS for data backup. Relying on the backup software, you can customize policies for secure and efficient backups.

Data access

Accessing OBS Through an NGINX Reverse Proxy

For security purposes, some enterprises need to configure a blacklist or whitelist for external addresses, so a fixed IP address is required for accessing OBS. But an OBS bucket does not have a fixed IP address, because Huawei Cloud DNS always resolves the bucket's access domain name to different IP addresses for secure access.

To address this problem, you can set up an NGINX reverse proxy server on an ECS to allow users to access OBS with a fixed IP address.

Using a User-Defined Domain Name to Host a Static Website

If a company has a large number of static websites for users to access, but does not want to set up servers, it can host its static websites in an OBS bucket, so that users can access the hosted static websites using the domain name bound to the OBS bucket.

Data transmission

Using the PostObject API to Upload Data from a Web Client to OBS

You can use the PostObject API to directly upload files from a web client to OBS, which is called browser-based upload. With this method, you can directly upload data to OBS, without having to upload data to the app server first. This makes data transmission faster and does not impose pressure on the server. Additionally, direct transmission with a signature returned by the server is more secure.

Uploading Data from Mobile Apps to OBS

OBS is widely used as the storage for mobile Android and iOS apps. To protect application data from leakage and unauthorized access, you are advised to use a temporary security credential or a presigned URL to upload data to OBS.

Uploading Data from Mini Programs to OBS

Mini programs are now popular in a variety of scenarios. You can upload data to OBS from a mini program.