{"id":1941,"date":"2016-10-17T09:18:46","date_gmt":"2016-10-17T08:18:46","guid":{"rendered":"http:\/\/tekhead.it\/blog\/?p=1941"},"modified":"2016-10-17T09:19:31","modified_gmt":"2016-10-17T08:19:31","slug":"amazon-aws-tips-gotchas-part-10-efs","status":"publish","type":"post","link":"https:\/\/tekhead.it\/blog\/2016\/10\/amazon-aws-tips-gotchas-part-10-efs\/","title":{"rendered":"Amazon AWS Tips and Gotchas \u2013 Part 10 \u2013 EFS (Elastic File System)"},"content":{"rendered":"<p>Continuing in this series of blog posts taking a bit of a \u201cwarts and all\u201d view of a few Amazon AWS features, below are a handful more tips and gotchas when designing and implementing solutions on Amazon AWS. This week, we talk about the latest feature of AWS, EFS (aka Elastic File System).<\/p>\n<p>For the first post in this series with a bit of background on where it all originated from, see here:<br \/>\n<a href=\"http:\/\/tekhead.it\/blog\/2016\/02\/amazon-aws-tips-and-gotchas-part-1\/\" target=\"_blank\">Amazon #AWS Tips and Gotchas \u2013 Part 1<\/a><\/p>\n<p>For more posts in this series, see here:<br \/>\n<a href=\"http:\/\/tekhead.it\/blog\/2016\/07\/index-of-tekhead-it-blog-posts-on-amazon-aws\/#gotchas\" target=\"_blank\">Index of AWS Tips and Gotchas<\/a><\/p>\n<h5 class=\"p1\"><span class=\"s1\"><b>20. Amazon AWS Tips and Gotchas \u2013 Part 10 &#8211; EFS\u00a0(Elastic File System)<br \/>\n<\/b><\/span><\/h5>\n<p class=\"p1\">A big challenge when designing highly available web infrastructures is historically how to provide a centralised content store for static content without wasting resources.<\/p>\n<p class=\"p1\">A classic model for this is a pair of web \/ file servers with either rsync or Gluster to replicate the content between them. In Windows\u00a0world, this would be something like either a WSFC (failover cluster) or perhaps something evil like a DFS replicated share. This means that not only are you wasting money on multiple virtual machines \/ instances just to serve file content, but you also add significant risk and complexity in the replication and failover between these machines.<\/p>\n<p class=\"p1\">Enter, AWS EFS!<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1985\" src=\"http:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/09\/EFS_GENERAL-300x210.png\" alt=\"AWS EFS\" width=\"300\" height=\"210\" srcset=\"https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/09\/EFS_GENERAL-300x210.png 300w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/09\/EFS_GENERAL-150x105.png 150w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/09\/EFS_GENERAL.png 500w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/>At a simple level, EFS is basically an NFS (v4.1) share within the AWS cloud, which is replicated across all AZs in any one region. No need for managing and replicating between instances, or indeed paying for EC2 instances just to create file shares! Great!<\/p>\n<p class=\"p1\">As this is still a relatively immature product, there are still a few &#8220;features&#8221; to be aware of:<\/p>\n<ol>\n<li class=\"p1\">There is no native EFS backup solution (yet!). I&#8217;m sure this will come very soon. As we have Re:invent coming up, it wouldn&#8217;t surprise me if something came out then. In the meantime, your main methods would be either to use <a href=\"http:\/\/docs.aws.amazon.com\/efs\/latest\/ug\/efs-backup.html\" target=\"_blank\">Data Pipeline to backup to another EFS store<\/a>\u00a0or potentially mount EFS and backup through an EC2 instance using your own tools or scripts. I would be concerned about backing up EFS to EFS (if in the same region), as this is putting all your eggs in one basket. Hopefully, AWS will provide other target options in the\u00a0future.<\/li>\n<li class=\"p1\">There is no native encryption of EFS data as yet. If you need this right now, you could achieve it by simply pre-encrypting the data in your application first, before it is written to EFS. Alternatively, just hold your breath as AWS have already stated\u00a0that:<br \/>\n<em>&#8220;Amazon EFS does not currently provide the option to encrypt data at rest, but we will offer this option soon&#8221;<\/em>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1986\" src=\"http:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/09\/efs-meme-300x274.jpeg\" alt=\"AWS EFS Meme\" width=\"300\" height=\"274\" srcset=\"https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/09\/efs-meme-300x274.jpeg 300w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/09\/efs-meme-150x137.jpeg 150w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/09\/efs-meme.jpeg 546w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/li>\n<li class=\"p1\">If you have less than about 100GB, then due to the way the performance burst credits work you may not get the performance you need. The more you buy, the more performance you get, so don&#8217;t short change your app for the sake of a few dollars!<br \/>\n<em><br \/>\n\u201cAmazon EFS uses a credit system to determine when file systems can burst. Each file system earns credits over time at a baseline rate that is determined by the size of the file system, and uses credits whenever it reads or writes data\u201d<\/em>.<\/p>\n<p>In early testing, it has been seen that very small filesystems can lead to IO starvation and performance issues. I would recommend you start with 100GB as a minimum (subject to your workload requirements of course!). This is still pretty cheap at only about $30-33 a month; a lot less than even a pair of EC2 instances, never mind the complexity reduction benefits. KISS!<\/p>\n<p>Of course, the more caching you can do on that content, e.g. using CloudFront as a CDN, the lower the IO requirements on your EFS store.<\/p>\n<p>For more info on performance see here:<br \/>\n<a href=\"http:\/\/docs.aws.amazon.com\/efs\/latest\/ug\/performance.html\" target=\"_blank\">Amazon EFS Performance<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1987\" src=\"http:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/09\/KISS-300x207.jpg\" alt=\"kiss - Keep it simple stupid EFS\" width=\"300\" height=\"207\" srcset=\"https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/09\/KISS-300x207.jpg 300w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/09\/KISS-150x103.jpg 150w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/09\/KISS.jpg 551w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/li>\n<li>And finally&#8230; being NFS based, this is obviously primarily aimed at Linux solutions. It would be nice to think that AWS will release an SMB version in the future&#8230; we can but hope!<\/li>\n<\/ol>\n<p>Thanks to my learned colleague <a href=\"https:\/\/twitter.com\/iamtomellis\" target=\"_blank\">Tom Ellis<\/a> for the tip! As he says, <em>&#8220;The size needs to be determined by the throughput needs, and not the storage capacity needs. &#8220;<\/em><\/p>\n<p class=\"p1\">Find\u00a0more posts in this series here:<br \/>\n<a href=\"http:\/\/tekhead.it\/blog\/2016\/07\/index-of-tekhead-it-blog-posts-on-amazon-aws\/#gotchas\" target=\"_blank\">Index of AWS Tips and Gotchas<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Continuing in this series of blog posts taking a bit of a \u201cwarts and all\u201d view of a few Amazon AWS features, below are a handful more tips [..]<\/p>\n","protected":false},"author":1,"featured_media":1549,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"EFS","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"AWS is awesome, but this series covers common issues you may come across and provides tips, workarounds & fixes. Part 10 on AWS EFS (Elastic File System)","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"New Blog Post: Amazon #AWS Tips and Gotchas \u2013 Part 10 \u2013 #EFS (Elastic File System) #Cloud","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[688,725],"tags":[270,709,895,699,706,707,894,467,958,914,957,843,518,115,710,66],"class_list":["post-1941","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws","category-cloud","tag-amazon","tag-architecture","tag-availability-zones","tag-aws","tag-awsgotchas","tag-awstips","tag-az","tag-backup","tag-credits","tag-efs","tag-elastic-file-system","tag-encryption","tag-ha","tag-nfs","tag-solution-architect","tag-tips"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/amazon-web-services-logo.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2l3lU-vj","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/posts\/1941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/comments?post=1941"}],"version-history":[{"count":0,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/posts\/1941\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/media\/1549"}],"wp:attachment":[{"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/media?parent=1941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/categories?post=1941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/tags?post=1941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}