3 ms·
If you need stateful files in a microservice, just mount a network filesystem. Yes, it's slow. Yes, it's buggy. Yes, it's not very portable. Yes, there are lock
by 0xbadcafebee 4y ago
If you need stateful files in a microservice, just mount a network filesystem. Yes, it's slow. Yes, it's buggy. Yes, it's not very portable. Yes, there are locking issues. But if you really need stateful files in a microservice, something is already fucked up. Network filesystems are a simple and cheap way to add that functionality and more. You get 'infinite' storage, redundancy, persistence, shared volumes, intra-cluster data availability, centralized data lifecycle management, etc, and no need for more custom Kubernetes logic just to persist some files. It's a shitty solution that is actually good enough.
- mjg235 4y agoI actually think k8s is (or can be) a decent solve for non-critical, low cost databases if you're confident about navigating the toolchain. The one big gap is storage resizing, which is part of why we're pointing it out.
- spmurrayzzz 4y agoI'd double down even more on your latter comment of "just dont use k8s" for stateful needs as its a minefield. But mounting a network fs is just gonna create a whole host of headaches when they decide to use the mount with anything that doesn't have native io fencing etc.
- oceanplexian 4y agoNFS doesn't have to be slow and buggy, its just that people try to set it up on a buggy cloud provider, and get burned. Tons of massive, mission-critical bare metal VMWare infra is backed by NFS and something like a NetApp. The one I used to admin years ago was connected via redundant 40Gb ethernet and it could easily push many GB/s at very consistent and low latency, and would fail over instantly without interruption.