Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cloud Run: Serverless containers in action

Cloud Run: Serverless containers in action

Guillaume Laforge

October 01, 2019
Tweet

More Decks by Guillaume Laforge

Other Decks in Technology

Transcript

  1. Operational Model Programming Model No Infra Management Managed Security Pay

    only for usage Service-based Event-driven Open What is Serverless
  2. Containers • Any language • Any library • Any binary

    • Ecosystem of base images .js .rb .go .py .sh … 0 1 0 1 0 0 1 1 1
  3. Serverless spectrum Managed by your cloud Container orchestration (k8s) Not

    serverless for programming or ops Container focused Infra managed by you Hosted FaaS/compute Easiest dev experience Code focused Limited runtime options Managed by your team Serverless containers anywhere Knative / Cloud Run on Anthos (GKE) On prem or multi-cloud Code or containers Custom hardware (GPU, TPU, IoT, etc) Offline Infra managed by you Serverless containers Custom languages & runtimes Infra still cloud-managed
  4. Serverless containers, where you want them Cloud Run (fully managed)

    • Fully serverless • No cluster to manage • Pay for what you use Cloud Run on Anthos • Serverless developer experience • Runs in your GKE cluster • Custom machines (GPUs, CPUs, RAM…)
  5. Use cases Public • Website • API endpoint Private •

    Microservices • Asynchronous tasks • Mobile backend • Webhook
  6. Container contract • Listen on 0.0.0.0 on port $PORT (default

    8080) • Binaries compiled for Linux 64-bit (Linux x86_64 ABI format) • HTTP server must start < 4 min (timeout → 504) • Request time < 15 min • Stateless (in-memory file system, don’t store data) • No background activity after request (CPU throttled)
  7. Billable time Instance Billable Time Request 1 Start Request 1

    End Request 2 Start Request 2 End Instance Time Billable Non-billable
  8. Serverless compute options Serverless functions Source-based HTTP and Events Cloud

    Functions Serverless applications Source-based HTTP and async App Engine Serverless HTTP workloads Containers HTTP and async Cloud Run