Block storage is a type of cloud storage that works by dividing data into blocks. Block storage allows for quick data retrieval.
After reading this article you will be able to:
Copy article link
Block storage is a type of cloud storage that divides files and data into equally sized blocks. This storage method allows for fast retrieval of data, since it does not rely on a file system. Think of the difference between looking through a city library's digital catalog to find a book, and knowing exactly where a book is on the shelves. The former is more like file storage; the latter is more like block storage.
Developers often prefer block storage for applications that regularly need to load data from the backend. Block storage is fast and scales up extremely well. It also works well with several types of computing and networking models, including container computing, virtual machines, and storage area networks (SANs).
However, block storage is not without its downsides. File metadata has to be very basic and usually cannot be customized (imagine a library where only the title of a book is recorded). Block storage is also a more costly storage option than some other cloud storage models, like object storage.
When an application that uses block storage writes data to the block storage database, instead of storing it as one file, it divides the data into several sections — the "blocks." These blocks do not have to be stored in any particular order.
Each block has a unique identifier number that enables the application to find it later.
These unique identifiers are stored in a data lookup table — a format that allows the application to easily find where each block is when it is needed.
Whenever data stored in the blocks is requested, the application consults the data lookup table to find where the requested data is stored. Usually, the requested data is spread out over multiple blocks. The application uses the identifiers from the table to retrieve the data, and it merges the disparate blocks back into their original form.
Object storage keeps files and data in what is called a "data lake," a non-hierarchical collection of unstructured data. Any type of data or file format can go into object storage, which means that unlike block storage, metadata can be complex and customized. Media (such as video and audio), logs, and disaster recovery backups are some of the common uses for object storage, although it is extremely flexible and works with a variety of use cases.
Because object storage is not structured or hierarchical, it can quickly, and almost limitlessly, store vast quantities of data — just as tossing clothes loosely into a big bag is a faster way to pack for a vacation than carefully folding and sorting clothes into a suitcase. However, much like packing in this fashion, object storage can make data retrieval less efficient.
|Object storage vs. block storage
|Depends on vendor
Blob storage is another type of object storage, used for Binary Large Objects (colloquially called "blobs"). It also works best for unstructured data that does not need to be retrieved often.
Cloud file storage is essentially a traditional hierarchy of files and folders, hosted in the cloud. Folders of data nest within directories and subdirectories, and inside each folder, files are tagged with metadata for easy identification. File storage keeps data organized, but it does not scale up to large amounts of data very well. Going through the hierarchy adds time to data retrieval.
However, file storage may work just fine for some use cases. Individuals who do not need to store and retrieve data on an enterprise-level scale may find that file storage fits their needs.
The cost of data retrieval, also known as data egress, is a major concern for organizations today. To combat these rising costs, Cloudflare offers zero-egress-fee object storage via a service called Cloudflare R2. R2 allows for fast and free data retrieval, and when paired with Cloudflare Workers' distributed code functions, it is endlessly customizable. Cloudflare aims to help developers and organizations avoid vendor lock-in with this service.