Home > Mobile >  Is google cloud filesystem ephemerial?
Is google cloud filesystem ephemerial?

Time:11-02

Is Google cloud Engine App filesystem ephemerial such as heroku (this link is another stackoverflow question that explains how the ephemerial filesystem works) ? l would like to deploy a python-django project there and to know if I could use the built-in django database file.

CodePudding user response:

Heroku’s filesystem is both ephemeral and dyno-local, for e.g. if you try to view a saved file via heroku run bash you won't see it (that runs on a one-off dyno, not a running web dyno) and it will be lost within 24 hours due to automatic dyno restarts. You just need a database Heroku has a PostgreSQL service with a free tier that should do more than you need, or pick another data persistence addon.

Coming to App Engine,

  • App Engine Flexible (Managed VMs), is ephemeral (disk initialized on each VM startup). It scales across many containers so there's no promise that a file you write to one will be accessible later. You can get away with dealing with some writing to some /tmp files but not much more. You will be much better off writing any data to something like Cloud Datastore, Cloud SQL, Memcache, or Cloud Storage.
  • The App Engine Standard filesystem is not ephemeral but it is read-only. You cannot write to the filesystem. Python 2.7 and PHP 5.5 don't have write access to the disk whereas Java 8, Java 11, Node.js,Python 3, PHP 7, Ruby, Go 1.11, and Go 1.12 only have read and write access to the /tmp directory.
  • You could use Google App Engine Blobstore or BlobProperty in Datastore to store blobs/files. For using Blobstore (up to 2GB) see this For using Datastore blobs (only up to 1MB) see this
  • Related