GCP - Anton-L-GitHub/Learning GitHub Wiki
Compute
Cloud functions
- Uses a one container exclusively for a single request.
Good use cases:
- Highly intensive workloads (uses a lot of CPU).
- A function runs a virus scan on user-uploaded files.
- A function that automatically creates tickets in your support system when monitoring alarms are triggered.
- A function cleans up old data periodically.
- When a file is uploaded to a Cloud Storage bucket, it triggers a Cloud Function to read the file metadata and save it in a database.
- At the end of the day, a scheduled Cloud Function scales down all clusters in your development environment.
Bad use cases:
- Highly concurrent workloads, like web-apps or APIs.
- Does not support traffic splitting or revision management to roll back versions.
App engine
Cloud run
Think about when building apps on cloud run
- Lets you invoke your container on a HTTPS endpoint.
- It automatically adds and removes instances of your container, scaling up and down to handle all requests.
- You can oly perform meaningful work while handling an HTTP request _ cloud run will throttle the CUP of containers that are not handling requests.
- While you can save a limited amount of data on disk and in memory, you should only use it for transient data that can be easily rebuilt.
- If you carefully tune the concurrent request limit, you can unlock better performance.
Storage