EBS vs EFS Peristance Volume Storage Class

Hi friends, we’ve been running MongoDB on EBS backed persistance volume storage class.

Does anyone have insights on which is more suitable for deploying mongodb - EBS or EFS?

I know that EBS is single-AZ, while EFS offers multi-AZ support.

Hey @Kay_Khan ,

EFS is NFS on steroids. If we look into the debate from the angle of block storage vs NFS, then I would not suggest NFS/EFS for production databases:

  1. performance limitations - NFS performs extremely poor for random I/O operations, which is critical for dbs.
  2. NFS might have locking limitations due to its networking nature. Again, critical for DBs to maintain concurrent access. To this bucket - there might be some integrity concerns that again will be solved from a performance pocket.

As for multi-AZ. Even EBS is single-AZ, you can still deploy your database across various AZs with proper affinity settings. You will have a dedicated block volume per AZ per your DB Pod. It is how we see other companies doing it and what we usually recommend.

Let me know if you still in doubt :slight_smile:

thank you - thats valuable information.

Ultimately our goal is scale our mongdb production cluster.

You mention you have seen other companies deploy databases across multi az’s. You will have a dedicated block volume per AZ per your DB Pod.

Correct me if im wrong is this a replicaset configuration ? So the same data replicated across multiple pods? With as you say affinity settings to separate each replica pod on a separate node.

It is a replica set, yes.

Here is a quick sketch of how it looks like:

Same applies to sharded cluster.