-
Cloud Functions
- Serverless environments for running Node.js, PHP, Go, and Python function
- Just upload the code
- Microservice architecture where each function performs one job
- Each invocation creates a new instance of the runtime
- Environments are cached for lower latency across multiple invocations of the function
- Cloud functions are useful for building microservice style applications
- Each Cloud Function typically performs a specific task in an application
- Cloud Functions are event driven
- Common use cases include responds to Cloud Storage changes, Pub/Sub messages, or web requests
- Incredibly fast and scalable
- Very inexpensive with free tier
-
App Engine
-
Standard
- Google Cloud application platform
- Supports Python, Java, PHP, Go, Node.js
- Fast scale-up time (seconds)
- Free tier, very low cost
- If no traffic, no hot instance
-
Flexible
- More customizable, more management overhead
- Any application in a docker container
- Gradual scale up/down
- VPC access (including VPN connections)
-
Memcache
- In-memory storage of commonly cached queries
- Shared and dedicated service levels
- Shared is the free and default option
- Best effort basis on caching query operations
- Fixed cache capacity assigned to application
- Dedicate memcache capacity improves query times to Cloud SQL backend
-
Versions
- Split traffic by percentage between versions of application
- Slowly direct traffic to risky update as canary deployment
- --no-promote flag prevents new version from serving traffic
-
Database
- Use VPN to connect App Engine app to on-premises database
- Use on-premises firewall to restrict traffic to App Engine app
- Use Flexible Environment to deploy to VPC
-
Cloud Run
- Cloud Run is a managed service serverless platform
- Automatically scales stateless containers
- Can run any language, library, and binary
- Users only pay when their application is running
- To run applications, create a docker image, and deploy to Cloud Run