When we talk about storage we often think about hard drives, USB sticks and devices of the kind. All those solutions are okay for personal computers (and even for servers to store the basic Operating System data) but, when it comes to scaling, we need something better. The main problem of using volumes in HDD or SSD drives are clear when we fill them up, specially with demanding media applications storing large pictures or, even worse, videos. Sure, we can automate some script resizing the drive and so on, but that’s a nasty solution. Please welcome the concept of “Object Storage“.

 

 

Object Storage

Object Storage, as opposed to other storage architectures like file systems which manages data as a file hierarchy, and block storage which manages data as blocks within sectors and tracks. Each object typically includes the data itself, a variable amount of metadata, and a globally unique identifier.

 

Object vs File vs Block

 

Originally, data storage usually meant only local storage, stored directly on the computer using it. As IT evolved, the need to share data among computers made the NFS model (Network File Share) a need. As mentioned above, that model cannot meet the growing demands of storing very large amounts of data and requires O&M for scaling. Consequently, Object Storage was born as an essential way to meet the needs of more and more diverse data.

 

 

Alibaba Cloud Object Storage Service (OSS)

Named just OSS, is the managed object storage solution from Alibaba Cloud to “store and access any amount of data from anywhere“. According to them, OSS is designed for 99.9999999999% (12 9’s) durability, so your data will be pretty secure with it.

 

OSS Logo

 

In this article I’ll go through what, in my opinion, are the top features of OSS. This service goes beyond “storage” and offers a couple of nice ways to treat the data stored in it.

 

Static Website hosting with any CNAME

If you have a pure HTML & JS website, you’ll probably won’t need a web server on a Virtual Machine running 24/7. OSS offers “Static Website Hosting“, which will hold your static website in a bucket and use the endpoint of the bucket to access the website. The good thing of this is that you can “link” any CNAME to any bucket and even use SSL termination.

 

 

Real-Time Image Processing

This, in my opinion, is the game-changer in the Object Storage market. On top of the last point (Static Website Hosting), this feature also helps you avoid creating computing instances to serve images to your applications or websites using properly-sized images. When you request an image from the bucket, you can just add GET parameters to the URL to add image watermarks to images, convert image formats, resize or compress.

As examples, I made some processing for an image I have in a bucket:

 

Resize the longest side to 340px

https://eurobucket.oss-accelerate.aliyuncs.com/mobile-office.jpg?x-oss-process=image/resize,l_340

Original picture

 

Also increase brightness

https://eurobucket.oss-accelerate.aliyuncs.com/mobile-office.jpg?x-oss-process=image/resize,l_340/bright,75

Brighter

 

Blurred the picture

https://eurobucket.oss-accelerate.aliyuncs.com/mobile-office.jpg?x-oss-process=image/resize,l_340/blur,r_5,s_2

Blurry

 

Put the picture inside a circle

https://eurobucket.oss-accelerate.aliyuncs.com/mobile-office.jpg?x-oss-process=image/resize,l_340/circle,r_100

In a circle!

 

 

Real-Time Video Snapshotting

If you are dealing with videos and need to generate thumbnails or snapshots from them, don’t worry, the built-in media processing of OSS also includes this capability.

As an example, to post a link to my presentation in Spanish about Alibaba Cloud Serverless, I can do the following:

https://eurobucket.oss-accelerate.aliyuncs.com/ecosistema-serverless-aliyun.mp4?x-oss-process=video/snapshot,t_745000,f_jpg,w_800

Preview in JPG using the moment at 12min 25sec

 

 

Content Delivery Acceleration

If the OSS objects are going to be accessed from multiple places across the globe, you can activate the “Acceleration” endpoint uses data centres distributed around the planet. When a request is sent to your bucket, it is parsed and routed with Geo-DNS to the data center where the bucket is located using an optimal network path.

This, in my experience, decreased the loading time for China-stored objects from over 3 minutes to 500ms. The performance increase is just mind-blowing.

 

 

Same/Cross-Region Replication

Disasters, although unlikely, may happen. For this, you can configure a near real-time replication of the objects you upload to the buckets. The replication can be in the same region (another zone) or in another region (making it more resilient against disasters). This can be useful for compliance requirements, lowering the latency, data backup, disaster recovery plans, etc.