by api · 6y ago · 0 comments
Implementation-wise HTTP has the advantage that the apps can tune the client code because the protocol client implementation isn't in the kernel.
In addition HTTP security (transport & user authentication) is works and everyone understands it, whereas on NFS it's a huge mess and enemy of interoperability.
In practical popularity NFS fares extremely poorly eg on AWS (how many apps use EFS vs S3).
Yes EFS is 30¢ per GB and S3 is 2.3¢.
But S3 also charges $5/million object writes (and 40¢ for reads), but EFS is "free" (factoring burst capacity, per-instance maximum throughput limits, etc).
Couple that with EFS' lifecycle migration allowing you to get storage costs as low as 2.5¢/GB for many write-once-read-(almost)never after 7 day applications, things get a lot more complicated.
Custom protocol over UDP is the fastest, which NFS supports, so NFS is basically the fastest (unless you get into wonky multiplex-streamed custom apps). However, UDP apps do not often work well through firewalls.
I don't think it's a trade-off thing. It's conceptual; FS over HTTP is not bigger than it is because filesystems are a much more stateful concept that often has to support coordinative transactions (like locks) whereas HTTP is a stateless protocol by design, so there's fundamentally a mismatch. That's why HTTP is better matched for an object system like S3 which is capable of being transported over stateless links and gives fewer coordination guarantees and is only eventually consistent.
Widespread adoption of QUIC may make more firewalls become UDP-friendly.