What's the default storage for Google Cloud Run?

前端 未结 2 658
暗喜
暗喜 2021-01-12 19:20

There is not documentation that I can find about the storage that Google Cloud Run has. For example, does it contains few Gigabyte storage as we create a VM? If not, is ther

相关标签:
2条回答
  • 2021-01-12 20:12

    The writable disk storage is an in-memory filesystem, which limited by instance memory to a maximum of 2GB. Anything written to the filesystem is not persisted between instances.

    See:

    • https://cloud.google.com/run/quotas
    • https://cloud.google.com/run/docs/reference/container-contract#filesystem
    0 讨论(0)
  • 2021-01-12 20:14

    Cloud Run is a stateless service platform, and does not have any built-in storage mechanism.

    Files can be temporarily stored for processing in a container instance, but this storage comes out of the available memory for the service as described in the runtime contract. Maximum memory available to a service is 2 GB.

    For persistent storage the recommendation is to integrate with other GCP services that provide storage or databases.

    The top services for this are Cloud Storage and Cloud Firestore.

    These two are a particularly good match for Cloud Run because they have the most "serverless" compatibility: horizontal scaling to matching the scaling capacity of Cloud Run and the ability to trigger events on state changes to plug into asynchronous, serverless architectures via Cloud Pub/Sub and Cloud Storage's Registering Object Changes and Cloud Functions with Cloud Function Events & Triggers.

    0 讨论(0)
提交回复
热议问题