A block, sometimes known as a physical record, is a bit sequence, that contains a whole number of records and has a maximum length called a block size. Files are divided into blocks of even size. Each block has a unique address. Blocks don’t have metadata, unlike objects.
For storing large quantities of data, the blocks are distributed among storage nodes. Providers of public clouds allow file systems to be created on the block storage system. Block storage is ideal for backing up data in the cloud.
Object storage works well for data sets that are unstructured and where the data is typically read instead of being written. Basically, it is well-suited to writing data once and reading the data often. The object normally includes:
- The data. Data can be text, pictures, sound, or whatever you want to digitally store.
- A way of identifying the data. The identifier is an address for locating the object over a distributed system instead of a physical location. Sometimes data can be spread out over different data centers.
- Metadata. Metadata contains information about the data such as its size, type of data, and security factors.
Unlike block storage, files can be spread over different storage nodes and devices.
The advantages of object-based storage
The big advantage with object storage is that the data doesn’t have to be physically next to each other. The data can be spread across different nodes in different locations. The unique ID makes it easy to find and handle the data. Resources can be used much more efficiently. With blocking storage, it can be hard or impossible to distribute data across more than a few servers.
Object storage is good for:
- Systems that need to read a lot of data more than once but that don’t need to write (update or change) the data more than once.
- Doing large-scale analytics because the data can be indexed for easy searching but the data is not changed once it is written.
- Backups because the data can be distributed to different locations.
- Data growth because it’s not as tied to the physical system that holds the data.
- Data that needs to be customized. It is ideal for data that needs to be readily available. Facebook pictures are often stored using object storage.
Object storage is not ideal for databases where records are constantly updated.
Because the objects can be distributed, there is less downtime with object storage.
The advantages of block storage
Block storage is good for:
- Modifying data because the data can be easily reached. With object storage, modifying the data (or a file) requires uploading a version of the file which can create performance issues.
- Databases which require constant modifications (updates, deletes, and additions).
- Input/output speed. This makes block storage good for caching, for example.
- Virtual machine files systems.
Unlike object storage, block storage allows for incremental edits to part of a file. With object storage, the whole object needs to be edited.