News for hackers. Stuff that matters.
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.