Features

  • Add additional containers in Cloud Run instances—up to 10
    • Complement main container
  • In-memory shared volumes
  • Healthchecks
  • Startup/shutdown ordering

Use Cases

  • Proxy
  • Data connections e.g. AlloyDB
  • Logging agents
  • Authentication/authorization

APM

cloud_run_sidecar_apm

Migrate Existing Workloads to Cloud Run

  • Logic run in proxy before main app
    • e.g. NGINX, Envoy
  • Let code specializing in specific job handle task, e.g. use Envoy to transform HTTP/1.1 to HTTP/2

Serverless Gateway

  • Perform action on traffic before sending on to backend
    • e.g. Analysis
  • Service mesh

cloud_run_sidecar_gateway

Proxy to Backend Database

  • Enforce secure connections
  • No need to reconfigure main application
  • Accelerated performance e.g. by using Cloud SQL proxy
  • Startup order important—proxy needs to start before app

cloud_run_sidecar_db_proxy

Multiple Sidecars

  • e.g. Envoy + Open Policy Agent
  • Can separate responsibilities e.g. between teams

cloud_run_sidecar_multi


Graph View