EFS Flashcards
EFS
Elastic File System
managed Network File System that can be mounted on many EC2 in multi-AZ (as opposed to EBS which can only be attached to one instance at a time and locked on one AZ)
uses Security Groups to control access to EFS
uses NFSv4.1 protocol
EFS advantages
- highly available. scalable
- sharing data across EC2 instances
many different EC2 instances in different AZs can connect to the same EFS (EBS is always locked to one) and share the data
all the connected EC2 instances will be mounting the same EFS on to their file system
- file system scales automatically, pay-per-use, no capacity planing
EFS disadvantages
expensive (3 times more than GP2) but you only pay for what you use so if you don’t store that much data and if manage your data set and size on your EFS drive well, can be even less expensive than EBS
EFS use cases
- data sharing
- content management
- web serving
- Wordpress
EFS constraints
only works with Linux based AMIs
Windows instances cannot mount EFS onto their file systems
only POSIX file systems (~Linux), with a standard file API
To encrypt EFS
you can use KMS keys at rest
EFS scale
EFS is built for thousands of concurrent EFS clients - thousands of EC2 instances mounting the same NFS drive at the same time
has massive scale - 10GB+ /s throughput
can grow to petabyte-scale network file system automatically
EFS Performance mode
has to be set during creation
2 options
- general purpose = default latency-sensitive use case (web server, CMS etc)
anything web related - Max I/O - higher latency, throughput, highly parallel (big data, media processing) - huge files (not many small files) that can be accessed with a bit more latency - anything processing related
media processing
Storage tiers
you can move files between tiers after N number of days
- for frequently accessed files use Standard tier
- for infrequently accessed use EFS-IA: lower price to store but you pay a fee for every retrieval
EFS vs EBS
storing data in EBS works great when we’re in a single instance application but it doesn’t work really great when we have many, and so maybe we can use EFS then to have a distributed application across multi AZ
now the costing aspect of it is that EBS is cheaper
than EFS but we do get a lot of advantages by using EFS especially in these kind of use cases
so again, it’s up to you as a solution architect
to really understand the trade offs for doing
and why you’re doing things and the cost
implications of what you’re doing.