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

Serverless Containers with Cloud Run

Mete Atamel
November 07, 2019

Serverless Containers with Cloud Run

Mete Atamel

November 07, 2019
Tweet

More Decks by Mete Atamel

Other Decks in Programming

Transcript

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

    only for usage Service-based Event-driven Stateless 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. Container to production in seconds Natively Serverless One experience, where

    you want it Cloud Run Bringing serverless to containers
  4. Natively serverless Focus on writing code Scale up fast Scale

    down to zero Pay for exact usage No servers to manage
  5. Cloud Run Fully managed, deploy your workloads and don’t see

    the cluster. Cloud Run on Anthos Deploy into Anthos, run serverless side-by-side with your existing workloads. Knative Everywhere Use the same APIs and tooling anywhere you run Kubernetes with Knative. One experience, where you want it
  6. HTTPS Endpoint Public • Website • API endpoint Private •

    Internal services • Async tasks • Mobile backend • Webhook
  7. Container contract Listen on 0.0.0.0 on port $PORT (default 8080)

    HTTP server must start < 4 min (timeout → 504) Request time < 15 min (default → 5 min) Stateless (in-memory file system, doesn’t persist) Computation only within request (No background activity)
  8. Container resources 1 vCPU per container instance (non-configurable) 256 MiB

    of memory up to a max of 2 GiB (configurable) 80 concurrent requests per container (configurable 1-80) 1000 max containers by default (configurable 1-1000) Access to a Metadata Server Sandboxed by gVisor
  9. Billable time Instance Billable Time Request 1 Start Request 1

    End Request 2 Start Request 2 End Instance Time Billable Non-billable
  10. Services part of async tasks Cloud Tasks user_registration user_levelcompleted user_inapppurchase

    user_statechange Daily activity metrics service User profile service Payment processing service Game state service
  11. Confidential & Proprietary Cloud Storage to Cloud Run via Cloud

    PubSub Cloud Storage Bucket Cloud PubSub Topic Cloud Run