News for hackers. Stuff that matters.
Re:Amazon Elastic File System – Production-Ready in Three Re... by jedberg on Wednesday June 29, 2016 @02:30AM (#11999856)
This is really cool but also kind of a shame. I feel like it will encourage bad behavior.

I can see people using this to deploy code by deploying onto the shared volume so that all their instances get an "instant update". Which is great when it works, but lord help you when EFS goes down and every app server you have is hung on a broken NFS connection.

Re:Amazon Elastic File System – Production-Ready in Three Re... by Corrado on Wednesday June 29, 2016 @05:27AM (#12000430)
I think that deploying onto a shared volume is exactly the workload that EFS encourages. That things will stop functioning can be said about any (AWS) technology. "Lord help you when (S3|RDS|SQS|etc.) goes down and every (thing) you have is hung up on a broken (thing) connection."

The rational argument here is that if uptime is important to you, the solution is to utilize multiple regions, of which EFS is now in 4. You are using AWS because of the SLA and the assumption that when something goes wrong there are legions of technical folks trying to fix it as soon as possible.

Re:Amazon Elastic File System – Production-Ready in Three Re... by jedberg on Wednesday June 29, 2016 @05:52AM (#12000536)
The difference is that all of those services are accessed via an API, which means your client can do clever things when it fails, like timeout, give a fallback, find an equivalent resource in another zone or region, etc.

With EFS, it's exposed as NFS, which hooks in much deeper. If it goes down, there isn't anything you can do to work around the problem, unless you start hacking your own file system kernel modules.

Re:Amazon Elastic File System – Production-Ready in Three Re... by zeisss on Wednesday June 29, 2016 @07:32AM (#12000903)
Can't you measure and timeout on the file-descriptor writes too?
Re:Amazon Elastic File System – Production-Ready in Three Re... by pyre on Wednesday June 29, 2016 @08:16AM (#12001130)
Do you want to start wrapping your system calls to read files in code that forks to periodically check for a hung system call?
Re:Amazon Elastic File System – Production-Ready in Three Re... by jabl on Wednesday June 29, 2016 @09:40AM (#12001543)
It's worse that that, actually. With hard mounts (the default), the only way to interrupt is with SIGKILL, which if my memory serves me correctly, is a process-wide signal. So you'd have to do all NFS I/O in a separate child process.

With soft mounts (does EFS support this?) you can exchange SIGKILL for religiously checking return values for all I/O syscalls, retrying partial writes and whatnot.

Re:Amazon Elastic File System – Production-Ready in Three Re... by takeda on Wednesday June 29, 2016 @10:06AM (#12001684)
Can't you just use soft mounts? Especially since in the scenario you described you can use read only mounts.
Re:Amazon Elastic File System – Production-Ready in Three Re... by acdha on Wednesday June 29, 2016 @02:21PM (#12003526)
It depends on the nature of the failure. If you're doing something which triggers hard failures – i.e. where a read() call on a ocket would unblock with an error – soft mounts will eventually recover. The problem is that, in my experience anyways, the vast majority of failures aren't that clean – things like a server which processes packets but never responds, a network connection which drops packets but doesn't change the link status, etc. — and in those cases soft mounts behave no better than hard mounts. There also used to be kernel bugs in *BSD, Darwin, and Linux where the client could deadlock in heavy activity, which were hard to reproduce and get fixed.

In all of those cases, anything which tries to access something on the NFS mount will block in the kernel (i.e. “kill -9“ won't work) and the mount cannot be unmounted normally.

I wrote https://github.com/acdha/mountstatus awhile back – if memory serves, 2004 or so – because we found that on Linux a lazy unmount would still work in this case and so you could have a process monitor the mount status (fork() a child to check the mount, alert if it doesn't get a response within a set interval) and a watchdog could respond to an alert by issuing a “umount -l” and remounting, which doesn't fix the blocked process but is less disruptive than rebooting and that new processes won't block because they tried to access that mount.

Re:Amazon Elastic File System – Production-Ready in Three Re... by walden42 on Wednesday June 29, 2016 @12:38PM (#12002787)
Assuming all assets get stored on S3, the other common writing scenario is logging. How would multiple machines writing to the same log file work?
Re:Amazon Elastic File System – Production-Ready in Three Re... by Corrado on Wednesday June 29, 2016 @08:03PM (#12005755)
Generally, you wouldn't write to the same log file. Prepending/Appending the instance name to the file would be enough to make it unique.
Re:Amazon Elastic File System – Production-Ready in Three Re... by jabl on Thursday June 30, 2016 @03:24AM (#12007067)
It wouldn't. NFS is not fully POSIX compliant, largely due to not being cache coherent. In particular, O_APPEND is not supported.
Re:Amazon Elastic File System – Production-Ready in Three Re... by oconnore on Wednesday June 29, 2016 @03:10AM (#11999995)
Isn't the whole point of AWS that you can blame AWS engineers for downtime instead of your own (in this case) code deployment thingy?
Re:Amazon Elastic File System – Production-Ready in Three Re... by jedberg on Wednesday June 29, 2016 @03:33AM (#12000059)
I'm not sure if you're being sarcastic or not, but no, it isn't. It's to provide building blocks for infrastructure. Down time is still on you. Only a lazy engineer blames their tools for their failures.
Re:Amazon Elastic File System – Production-Ready in Three Re... by peteretep on Wednesday June 29, 2016 @07:27AM (#12000883)

    > Down time is still on you
If you can say "It's not our fault, it's Amazon's", there are plenty of boards and customers who are fine with that, in my experience.
Re:Amazon Elastic File System – Production-Ready in Three Re... by afarrell on Wednesday June 29, 2016 @10:34AM (#12001855)
Yep. "Nobody ever got fired for buying IBM" applies here.
Re:Amazon Elastic File System – Production-Ready in Three Re... by oconnore on Wednesday June 29, 2016 @04:16AM (#12000207)
Not sarcastic: aws is not a tool, it's a service. You're exchanging dollars for SLA. The SLA is built in: you're sometimes (rarely) down, and someone else gets called about it.
Re:Amazon Elastic File System – Production-Ready in Three Re... by riquito on Wednesday June 29, 2016 @04:25AM (#12000238)
Your customers will blame you: you don't want it to happen. Even if amazon pay you some damage you may lose trust or your whole business in the meantime.
Re:Amazon Elastic File System – Production-Ready in Three Re... by ceejayoz on Wednesday June 29, 2016 @09:51AM (#12001596)
With a major AWS outage, customers will think "the Internet is having trouble today." Half the sites they visit will be down or broken in some way.
Re:Amazon Elastic File System – Production-Ready in Three Re... by CaptSpify on Wednesday June 29, 2016 @11:29AM (#12002257)
I think this perspective really depends on who you are supporting. This is my experience:

1) Actual customers: They want you to fix it. They don't care who's fault it is, they are dependent on you.

2) Internal customers: They want someone to blame. They don't really care that it's down, they just want to point the finger at someone when their report goes out late.

Re:Amazon Elastic File System – Production-Ready in Three Re... by dunkelheit on Wednesday June 29, 2016 @03:44AM (#12000087)
"Down time is still on you" - well put. And it is actually great when you can only blame yourself because then you can fix the issue right away. If someone other is to blame, you need to a) convince that person that there is a problem and b) wait for the issue to rise to the top of their queue. Which can be painful.
Re:Amazon Elastic File System – Production-Ready in Three Re... by dexterdog on Wednesday June 29, 2016 @09:39AM (#12001536)
But in the case of Amazon they will likely know about the problem before you would have anyway. Sure, their problems tend to have a much larger scale, but their ops teams are pretty good.
Re:Amazon Elastic File System – Production-Ready in Three Re... by Johnny555 on Wednesday June 29, 2016 @11:27AM (#12002232)
Just because it's your fault, that doesn't mean that you can quickly and easily fix the problem yourself. Amazon has a team of people to keep EFS up and running, and AWS owns the entire storage, server, and network stack. When your own NFS server starts timing out, you may have only a few people to diagnose the problem.
Re:Amazon Elastic File System – Production-Ready in Three Re... by boucher on Wednesday June 29, 2016 @11:38AM (#12002345)
Do you think that's still true in a "serverless" architecture?
Re:Amazon Elastic File System – Production-Ready in Three Re... by cvik on Wednesday June 29, 2016 @12:12PM (#12002608)
Surprise! Serverless runs on... gasp servers!
Re:Amazon Elastic File System – Production-Ready in Three Re... by sciurus on Wednesday June 29, 2016 @06:54AM (#12000750)
Re:Amazon Elastic File System – Production-Ready in Three Re... by vacri on Wednesday June 29, 2016 @07:29AM (#12000890)
Hrm, so for the site 'whoownsMYavailability', the answer is someone else?
Re:Amazon Elastic File System – Production-Ready in Three Re... by hdra on Wednesday June 29, 2016 @03:45AM (#12000097)
I have to admit that is the first use case that I thought of when I read this. No more messing around with AMIs and launch config whenever an update is deployed.

You bring up a good point on the EFS being a point of failure though. What use case do you think the EFS is good for? It seems like even worse for data storage since IO can easily become a bottleneck.

Re:Amazon Elastic File System – Production-Ready in Three Re... by jedberg on Wednesday June 29, 2016 @03:57AM (#12000135)
> What use case do you think the EFS is good for

Out of band big data/data pipeline processing. Something where you want an easy way to sync your data but can handle extended downtimes.

Re:Amazon Elastic File System – Production-Ready in Three Re... by cothomps on Wednesday June 29, 2016 @09:21AM (#12001443)
Or scenarios where you can use EFS to stage data 'for something else' (i.e. shared image / upload content that stages to a CDN, etc.)

Keep in mind (and this comes from hard experience in 'traditional' NFS web server architecture) - if you mount everything on an NFS volume, you ensure that

1) If something goes wrong on that NFS mount, everything goes wrong. (bad code deploy? All nodes are down!)

2) If you rely on an NFS mount to store everything (e.g. trust keystores for JVMs,etc.) your entire infrastructure is dependent on the I/O capabilities of that NFS mount.

3) No matter how clever you are (or how much you trust NFS clients/versions) you will deal with file locking if you are doing a fair amount of read/write from multiple nodes to a single NFS mount.

Short story - EFS will make some of the 'hard' things with distributed nodes possible, but don't make the easy things impossible to troubleshoot.

Re:Amazon Elastic File System – Production-Ready in Three Re... by nemaar on Wednesday June 29, 2016 @11:58AM (#12002506)
The instance can fetch the upgrade from the NFS mount and also work using the previous version when NFS is down. I see no problem here.
Re:Amazon Elastic File System – Production-Ready in Three Re... by KaiserPro on Wednesday June 29, 2016 @03:45AM (#12000098)
but thats the same with any component. how is that different to SNS et al?

NFS is actually multi homed, so there is no real reason why it can't be HA/clustered, apart from the block store and the underlying file system.

Re:Amazon Elastic File System – Production-Ready in Three Re... by jedberg on Wednesday June 29, 2016 @03:59AM (#12000143)
> how is that different to SNS et al?

It's not really, and you should write your software to account for SNS outages, etc.

That being said, this is presented as NFS. NFS has a nasty habit of freezing your system if it breaks. If SNS breaks, you get errors and timeouts in your logs, but can keep going. If NFS breaks, you pretty much just sit around waiting for it to come back.

Re:Amazon Elastic File System – Production-Ready in Three Re... by facorreia on Wednesday June 29, 2016 @05:37PM (#12005013)
If people want to deploy that way, I suppose that using rsync to update a local clone, and running from that, would minimize this problem.
Re:Amazon Elastic File System – Production-Ready in Three Re... by Thaxll on Wednesday June 29, 2016 @10:32AM (#12001844)
Most app / language load everything at startup.