File Storage vs. Block Storage vs. Object Storage

Rajkumar
4 min readMay 5, 2021

--

A brief description of different storage models available, pros and cons of each method

File Storage vs. Block Storage vs. Object Storage
File Storage vs. Block Storage vs. Object Storage

When we are developing applications, one of our concerns is the different storage techniques available and which suits our requirements best in terms of both cost and performance.

This article will look into different Storage techniques available and the pros and cons of each method.

File Storage

File storage is a storage architecture where data is stored as a single entity or as a single file in a folder in a hierarchical structure. This is how we store and access the files in our local systems. When we want to retrieve the data, we need the full path of the file stored in the hierarchy Example: Driver\\Folder_1\\Folder_2\\File_name.ext.

NAS (Network Attached Storage)

Sometimes we need to create a central repository or share the data with other clients. To do this, a single disk drive with all the files is not the best solution.

Think of a “series of disk drives attached to a network” called NAS. Using RAID, we can configure how files are stored in disks and the replication of files in different disks, ensuring that if one disk fails, backups are available. The image shown below is Orico 8 bay Network Attached Storage.

https://www.orico.me/product/orico-2-5-3-5inch-8-bay-network-attached-storage-with-raid-os800-nas-bk/

NAS (Network Attached Storage) vs. NFS (Network File System) vs. Distributed File System

NAS is often confused with Distributed File System. In NAS, files are stored on multiple disks but on a single machine, whereas Distributed File System stores parts of the file in multiple machines. NFS is a protocol for Distributed File System.

Pros:

  • Data replication
  • Centralized control of data
  • Cost-effective

Cons:

  • Performance degrades when network traffic increases.

Some of the File storage service providers

Block Storage

In Block Storage, the file is decomposed into smaller units of the same size called blocks. Each block has a unique identifier, and these blocks are placed in a system wherever it is more convenient and efficient. Each block may reside in different systems or different disk drives connected by the fibre optic cable.

The file is divided into multiple blocks

SAN (Storage Area Network)

The blocks of data are typically stored in the Storage Area Network called SAN. What exactly is SAN? As discussed above, SAN consists of various hard disks that communicate over fibre optic cable.

Storage Area Network

Let’s take a small example. Suppose we have an excel sheet of 32kb (32,000 bytes) and our block size is 512 bytes, so, excel sheet is divided into 62 blocks. Each of these blocks has an identifier and is stored in different systems or disks in the Storage Area Network. Whenever we want to read the file, all the blocks are accumulated into a single file using their block Ids. When we update a specific part of the sheet, say rows two and three, only corresponding blocks are updated.

NAS (Network Attached Storage) vs. SAN (Storage Area Network)

SAN is more efficient than NAS; this is because NAS systems are connected over the local network (LAN), whereas fibre optic cables connect the SAN systems.

Pros:

  • Efficient
  • Scalable
  • Good for Read/write operations

Cons:

  • Expensive and complex

Some of the Block storage service providers

Object Storage

Object Storage is a relatively new technology. It does not work like NAS or SAN. Unlike file storage( where files are stored in different folders) and block storage (where files are broken down and stored in different servers), files in Object storage are broken into discrete units called Objects and kept in a single repository.

Objects have three components:

  • Id — Unique Identifier
  • Metadata — description about the data, Ex: Timestamp, size etc.,
  • Data — actual data

When a portion of the file is updated, an entire object needs to be updated, unlike in block storage, where only the corresponding block is updated. Hence Object store is well suited for the write-once and read many applications (static content, photo or video repository).

We can perform read and write on the object by just submitting an HTTP request.

Pros:

  • Well suited for static content applications
  • Highly Scalable
  • Good for unstructured data
  • High performance

Cons:

  • Expensive
  • Update requires rewriting the whole object

Some of the Object storage service providers

--

--

Rajkumar
Rajkumar

Written by Rajkumar

“The more you SHARE, the more you HAVE”

No responses yet