EBS volume vs EFS volume for AWS storage

Are you considering EBS (Elastic Block Storage) or EFS (Elastic File Storage) for your storage solution?

Both EBS and EFS store data, but each serve a very different purpose. In order to understand which one to create, let’s first look at the key differences between block and file storage:

Key features of  Block Storage

  • Operates at Lower Level.
  • Data is stored in blocks.
  • SAN – Storage Area Network (a network of boxes to store data, where multiple SAN Devices can be connected together to form a cluster).
  • Uses iSCSI or Fibre Channel protocol to get to the storage.

Key features of File Storage

  • Operates at Higher Level.
  • Data is organised in directories or files – File Server (the purpose is to store data only).
  • NAS – Network Attached Storage.
  • Uses CIFS (Common Internet File System) or NFS (Network File System) to get to the data.

Now that we have a basic understanding of Block Storage and File System, let’s look at a few case studies and whether you might want to use block storage or file storage:

Case studies of when to use EBS or EFS

 Situation EBS or EFS
 Databases EBS – block storage is the preferred type for databases.
 Need to share files between multiple instances EFS. An EFS volume can be attached to multiple EC2 instances. EBS, however, can be attached to only one EC2 instance.
 Email Servers EBS. The majority of mail servers only support block storage – for example, Microsoft Exchange only supports block storage

One thing you need to bear in mind is that AWS Elastic Block Storage (EBS) can be attached to a single EC2 instance, whereas AWS Elastic File Storage can be attached to multiple EC2 instances.

It’s a good practice to save data on an EBS or EFS to reduce the chance of a failure. In traditional architecture, data is stored on the same server itself. This is a weak design as, if the hosting server fails, the data will be inaccessible. Migration of data will then be difficult.