Prompt
Google Cloud Storage vs Cloud Filestore for app files
Latest observation
If you’re choosing between Google Cloud Storage (GCS) and Cloud Filestore for “app files,” the right answer mostly depends on how your app accesses those files.
Short version
-
Use Cloud Storage if the files are:
- objects/documents/media/uploads
- accessed over HTTP/API
- shared by many services
- need cheap, durable, scalable storage
-
Use Cloud Filestore if the files are:
- traditional filesystem files
- accessed via POSIX file paths
- expected by an app that needs a mounted network drive
- used for shared app state, caches, or legacy software
Key difference
Google Cloud Storage
Object storage, not a filesystem.
You store and retrieve files as objects in buckets.
Best for:
- user uploads
- images, videos, backups
- logs, exports
- static website assets
- data lakes / analytics input
Characteristics:
- extremely durable
- highly scalable
- cheaper for storage
- accessible via API/SDK/HTTP
- not mounted like a normal disk
Cloud Filestore
Managed NFS file storage.
It acts like a shared network filesystem that you mount on VMs or GKE.
Best for:
- apps that need
read/writefile paths - shared directories across multiple instances
- legacy apps that expect local filesystem semantics
- home directories, scratch space, content management systems
Characteristics:
- mounted as a filesystem
- supports file locking and POSIX-style access
- more expensive than GCS
- less ideal for massive internet-scale object storage
Which one for app files?
Choose Cloud Storage if your app:
- uploads/downloads files
- serves files to users
- stores static assets
- processes images/videos/docs
- doesn’t need filesystem semantics like rename/lock/etc.
Example:
- A web app where users upload PDFs and images → Cloud Storage
Choose Filestore if your app:
- saves files using normal OS file operations
- expects a path like
/data/uploads/file1.txt - needs shared storage across multiple app instances
- uses software that cannot easily be changed to object storage
Example:
- A PHP/WordPress app on GCE that expects a shared
wp-content/uploadsfolder → Filestore can work well
Practical comparison
| Feature | Cloud Storage | Cloud Filestore |
|---|---|---|
| Storage model | Object storage | Network file system |
| Access method | API/SDK/HTTP | Mounted filesystem (NFS) |
| Scalability | Very high | Moderate |
| Cost | Lower | Higher |
| POSIX semantics | No | Yes |
| Good for uploads/media | Yes | Sometimes |
| Good for legacy apps | Not usually | Yes |
| Shared files across instances | Yes, via API | Yes, naturally |
| Best for static assets | Yes | Not ideal |
Common patterns
Pattern 1: Web app uploads
- App uploads user files to Cloud Storage
- App stores metadata/URLs in database
- Serve files through signed URLs or CDN
Recommended
Pattern 2: Legacy app needs shared folder
- App writes to
/mnt/shared - Multiple app servers need the same files
- App depends on filesystem behavior
Recommended: Cloud Filestore
Pattern 3: App needs temporary processing space
- Use local disk or ephemeral SSD on VM/GKE
- Use GCS for final stored output
Often better than Filestore unless shared persistence is required
Rule of thumb
Ask:
-
Does the app need a mounted folder?
- Yes → Filestore
- No → GCS
-
Are the files mostly objects/documents/media, not “live files”?
- Yes → GCS
-
Do you need multiple servers to read/write the same directory like a normal filesystem?
- Yes → Filestore
Recommendation for most modern apps
For most new apps, Cloud Storage is the better default for app files because it’s cheaper, simpler to scale, and a better fit for uploads and static content.
Use Cloud Filestore only when you specifically need filesystem semantics or have a legacy workload.
If you want, I can also give you:
- a decision tree
- a cost comparison
- or a recommended architecture for your specific app type (Node.js, Django, WordPress, etc.).