Hacker News new | past | comments | ask | show | jobs | submit login

wow the premium filestore is as good as a single ssd (replicated). that's really cool to use for mysql/postgres databases on gke, way cheaper than using GCP SQL if you already have a GKE cluster.



Whats the advantage of using NFS instead of just attaching a Persistent Disk to a StatefulSet? Wouldn't that be a lot cheaper?


NFS is much faster to attach than PD to a GCE node, which can take minutes at times and lead to crash loops waiting for the storage to be ready. This is especially problematic if the disk needs to be moved from one node to another for some reason.


Isn't running databases on NFS, really bad?


Depends. There's nothing wrong with NFS itself, although v4 is better obviously. There's a performance trade-off with going over the network and sharing the storage with multiple servers, along with the necessary metadata for each file, but if you don't have much contention then it's just like a drive with higher latency.

If that latency is low and your workload can handle disk concurrency well then it works fine. It helps if you use (or configure) a database with more sequential access and buffering for large updates rather than lots of random small writes, as well as spreading the data over several disks.

AWS EFS has latency problems which make it problematic but this product seems to have better performance profile which could work well.


I get the performance issue but I'm more concerned about data integrity.

I did a quick lookup in the MySQL docs (https://dev.mysql.com/doc/refman/8.0/en/disk-issues.html) and was surprised that this isn't really an issue.

Learned something new, thanks!


Databases all use some kind of write-ahead logging so you'll be safe as long as that file is safe, and they're even capable of recovering the file all the way up to any corrupt records that may have been appended at the end.

You shouldn't use multiple servers writing to the same volume for database drives, but other than that it's no different than any other disk that might lose connection. Most VMs "local" disks are still attached over the network anyway, emulating a PCIe bus interface instead of NFS.


That makes a lot of sense, thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: