Ref: https://learn.cantrill.io/courses/1820301/lectures/41301664 [ASSOCIATESHARED]
EFS Architecture
- 🔧 EFS = AWS implementation of NFSv4
- 💡 NW File System (NFS) is a fairly common storage standard for shared files
- Provides NW-based FSs which can be mounted within 1+ Linux EC2 instance(s)
- Allows storing media outside of EC2 instances → stateless instances
- Shared → One FS can be used by multiple Linux instances at once
- Private service, FS is accessed via mount targets inside VPC subnets
- Can be accessed via hybrid NWing from on-premises: VPC peering, VPN or DX
- To ensure HA in a region, put mount targets in multiple AZs (same as with NATGWs)
- Files in EFS exist separately from EC2 instances
- 💡 Just like EBS volumes exist separately from EC2
- EFS is file storage and EBS is block storage
- Data is not lost if instances are deleted and recreated
- This makes EC2 instances stateless, which is usually desired
- ‼️ EFS is ONLY for Linux instances!!
- Linux uses a tree structure for its FS
- Devices can be mounted into directories/folders in the hierarchy
- A FS could e.g. be mounted into a directory called
/nfs/media
- FSs use POSIX permissions
- 💡 POSIX = a standard for interoperability which is used in Linux
- EFS Architecture Diagram
EFS Additional Settings/Characteristics
- Creating a FS in EFS involves providing several settings
EFS Performance Settings
- Throughput modes:
- Bursting
- Has a burst pool, but throughput scales with FS size
- đź’ˇ Akin to GP2 volumes in EBS
- The more data you store in the FS, the better performance you get
- Default (provides basic performance requirements)
- Enhanced
- Elastic
- Throughput scales automatically, only pay for what you use
- For workloads with unpredictable I/O
- Provisioned
- Throughput requirements can be specified separately from FS size
- 💡 Akin to IO1 volumes in EBS
- More flexible, but not used by default
- Throughput Modes - UI Screenshot
- Performance modes:
- General Purpose
- 💡 Default for 99.99% of use cases
- Ideal for latency-sensitive use cases, web servers, CMSs, home directories or even general file serving
- Max I/O
- Scales to higher levels of aggregate throughput and IOPS…
- …with trade-off of increased latency
- Ideal for highly parallel apps
- e.g. big data media processing, scientific analysis…
- Ref (extra info and numbers): https://docs.aws.amazon.com/efs/latest/ug/performance.html
- 💡 No need to remember raw numbers for exam
EFS Storage Settings
- Storage classes:
- Standard:
- Default
- For frequently accessed files
- Infrequent Access (IA)
- For infrequently accessed files
- Cheaper than Standard
- Archive
- Very infrequently accessed files
- Cheaper than IA
- 💡 Similar to S3 storage classes (similar trade-offs)