Choosing between Object and Block Storage

Stan Georgian
ITNEXT
Published in
5 min readFeb 4, 2021

--

Photo by Denny Müller on Unsplash

The amount of data we work with is growing every day, causing its management to become overwhelming. So, a need arises for a dedicated and suitable form of storage.

There is more than one type of storage that you can choose from, each having its own distinct architecture and purpose.

In this article, we’ll look at both object storage and block storage and see how they differentiate from each other so that you know which to choose for your requirements.

Block Storage

Block storage is the more traditional way of doing things, and because it is the oldest, let’s start with it. It is a type of storage where data is written in raw blocks on the storage, and individual servers access it through a Storage Area Network (SAN).

The servers that access the data can either be on the same network or different networks, but they can only connect to storage through its SAN.

In this type of storage, the data is broken up into individual blocks and stored as separated pieces, each with a unique identifier. The information it’s spread across multiple environments that can better serve the data. The SAN will take this responsibility and place the blocks of data wherever it is most efficient.

Because each block lives on its own, it can be partitioned to work with different operating systems, which gives the owner complete freedom to configure their data.

Use cases:

In terms of performance, block storage provides the lowest possible latency in data retrieving and, in general, is highly redundant. Most block storage services offer a capability that is built-in where data is redundant across the volumes. So if a volume goes down, you can retrieve the data from other places.

Therefore block storage is the best fit for the following scenarios:

  • Workloads such as transactional databases, relational databases that require very low latency and high and consistent I/O performance.
  • Boot volumes: you can boot from disk images installed on a block storage volume, thus providing a cost effective way of maintaining an image.
  • Hot-swappable drives: block storage volumes can be detached from a cloud instance just as quickly as they are attached.

Downsides

When it comes to disadvantages, the ones that stand out are:

  • Block storage has a very high cost-per-gigabyte is expensive, so it isn’t a great choice when you need to store a large amount of data (we’re talking terabytes).
  • The limited scalability can drive up the complexity of such infrastructure.

Object Storage

Object storage, or object-based storage, is much newer than block storage and represents a flat structure where files are broken into pieces called objects. These objects are stored in a single repository instead of being kept as blocks on servers. At the same time, these objects can be spread across multiple network systems.

Object-based storage allows you to store large amounts of unstructured data in a highly scalable manner. This is because each object receives a unique ID and a set of metadata, which represents information about the file stored in the object storage.

At the same time, applications manage all the objects by accessing them directly with their unique ID. Still, they can also make use of the metadata for better identification and classification.

While you must first attach the volume to an operating system to access a block storage volume, you can access data on object storage devices directly through APIs or HTTP calls.

Use cases:

The metadata tags associated with each object represent a crucial advantage with object storage and includes details like age, privacies, securities, and access rights. You can also extend it by adding extremely detailed information. For example, if you store your photos in object storage, you could make use of the metadata tags to add information about the camera you used, the geographical location, and so on.

It comes as a pay-as-you-go solution, and you only pay for what you use. It also has a cheap cost-per-gigabyte.

Therefore object storage is the best fit for the following scenarios:

  • Public cloud storage.
  • Large sets of unstructured and static data(media types) like images, video, music, and so on.
  • Data recovery: because object storages provide a securely and cost-efficiently way to save data, it’s perfect for backups, database dumps, or log files.
  • Scalable infrastructures: the flat nature makes this type of architecture scale up very well to enormous quantities of data.

Downsides

Object storage, like any other type of storage, is not perfect. It can have pros and cons. Here are some of the most notable downsides:

  • An object can’t be modified: if an object needs to be modified, it is just stored as a new object. Simultaneously, if versioning is enabled, the previous version of the object is saved for historical purposes. Otherwise, the previous version is deleted.
  • Performance: writing objects is a slow process.

Here’s a table to summarize the differences between object and block storage:

Image Source

Conclusion

When it comes to block storage vs. object storage, the most critical difference is how each handles metadata. In object storage, you can customize metadata to include additional, detailed information about the data files stored in the object. In block storage, metadata is limited to primary file attributes.

Each type of storage was developed for a specific purpose and to solve a particular problem. The first step to finding the best solution for you is to have good detail about your project and understand your requirements.

Do you need to store a small amount of data or large datasets? Is the data structured or not? Does it require additional metadata? These are just a few questions you should answer for yourself before you select a storage mechanism.

--

--