Search Posts on Binpipe Blog

Alibaba Cloud OSS Overview


Alibaba Cloud's OSS is a versatile, economical, and safe way of storing data objects in the cloud. The name stands for "Object Storage Service," and it provides a simple organization for storing and retrieving information. Unlike a database, it doesn't do anything fancy. It does one thing: letting you store as much data as you want. Its data is stored redundantly across multiple sites. That makes the chances of data loss or downtime tiny, far lower than they would be if you used on-premises hardware. It has good security, with options to make it still stronger.



OSS vs. other services
OSS isn't a database, in the sense of a service with a query language for adding and extracting data fields. If that's what you want, you should look at Alibaba Cloud's RDS. With RDS, you can choose from several different SQL engines. Alternatively, you can host a database on your own servers, with all the responsibility that entails. OSS is more economical than RDS if you don't need all the features of a database.

OSS also isn't a full-blown file system. It consists of buckets which hold objects, but you can't nest them inside other buckets. For a general-purpose, hierarchical file system, you should look at Alibaba Cloud's EFS or set up a virtual machine and use its file directories. If you set up a cloud VM using a service like EC2, you pay for storage as part of the VM's ongoing costs.

Alibaba Cloud OSS is optimized for "write once, read many" operation. When you update an object, you replace the whole object. If your data requires constant modifications, it's better to use RDS, EFS, or the local file system of a VM.

The basics of OSS
The organization of information in OSS is very simple. Information consists of objects, which are stored in buckets. A bucket belongs to one account. An object is just a bunch of data plus some metadata describing it. Metadata are key-value pairs. OSS works with the metadata, but the object data is just a collection of bytes as far as it's concerned.

You can save multiple versions of an object, letting you go back to an earlier version if you change or delete something by mistake. Every object has a key and a version number to identify it uniquely across all of OSS.

You can specify the geographic region a bucket is stored in. That lets you keep latency down, and it may help to meet regulatory requirements.

Normally OSS reads or writes whole objects, but OSS Select allows retrieving just part of an object. This is a new feature available to all customers.

Uses for OSS
Wherever an application calls for retrieving moderate to large units of data that don't change often, OSS can be a great choice.

Backup: OSS can hold a backup copy of a website, a database, or a whole disk. With very high durability, it gives confidence your data won't be lost.
Disaster recovery: A complete, up-to-date disk image can be stored on OSS. If a disaster makes a primary server unavailable, the saved image is available to launch another server and keep business operations going.
Application data: OSS can hold large amounts of data for use by a web or mobile application. For instance, it could hold images of all the products a business sells or geographic data about its locations.
Website data: OSS can host a complete static website (one which doesn't require running any code on the server). To set it up, you tell OSS to configure a bucket as a website endpoint.

Access control and security
Buckets and objects are secure by default, and you can make them more secure by applying the right options. You have control over how they're shared, and you can encrypt the data.

The system of bucket policies gives you detailed control over access. You can limit access by account, IP address, or membership in an access group. Multi-factor authentication can be mandated. Read access can be open to everyone while write access is restricted to just a few users. If you prefer, you can use Alibaba Cloud IAM to manage access.

For additional protection of data, you can use server-side or client-side encryption. That way, even if someone steals a password and gets access to your objects, they won't be able to do anything with them.

Getting started
If you have an Alibaba Cloud account, setting up OSS usage is straightforward. From the console, select the OSS service. You'll be given the option to create a new bucket. You need to give it a unique name and select a region. There are a number of options you can then choose, including logging and versioning. Next, you can give permission to other accounts to access the bucket. The console will let you review your settings, after which you confirm the creation of the bucket.

Next, you can upload objects to the bucket and set permissions and properties for them. If you're using OSS through other Alibaba Cloud services, you may never need to upload directly. You'll still want to check the OSS console occasionally to verify that your usage and costs are in the range you expected and that bucket authorizations are what they should be.

When deciding whether OSS is the best way to handle the storage for your application, evaluate how it stacks up against your needs. If you don't require a full file system and you don't need to rewrite data often, OSS can be a very cost-effective choice. It provides high data availability and security at a very reasonable price.