Scaling an application from one server to two sounds easy until you realise each server has its own disk. A file uploaded through server A does not exist on server B.
Three ways to share files
- Object storage: the best choice for user uploads in modern applications that speak S3.
- Replication: copying files between servers; workable, but adds delay and complexity.
- Shared network storage (NFS): one volume mounted on every server, appearing as a normal folder.
When NFS fits well
- Applications that expect a normal file system and cannot easily be changed to use S3.
- Several web servers behind a load balancer sharing uploads, sessions or generated files.
- Shared working folders for build servers, rendering or processing jobs.
- Central storage for configuration and assets used by many machines.
Things to know
- Network matters: NFS performance depends on the private network between servers and storage. Keep them in the same location.
- Not for databases: run databases on local, fast storage, not on shared network volumes.
- Locking and caching: applications that write the same files from several servers at once need care.
- Backups still apply: shared storage is one copy; back it up like anything else.
At IDX
IDX drive storage provides NFS volumes you can mount across multiple servers, with unlimited mounts. Combined with our cloud VPS and dedicated servers, it is a straightforward way to scale applications that rely on shared files. Ask our engineers whether it suits your setup.
IDX on digital infrastructure
Back to blog →