Pro Yearly is on sale from $80 to $50! »

Cloud Run: Serverless containers in action

Cloud Run: Serverless containers in action

137d3908243acfc30e126615d59d4e6d?s=128

Guillaume Laforge

October 01, 2019
Tweet

Transcript

  1. Guillaume Laforge Google Cloud, Developer Advocate Serverless containers with Cloud

    Run @glaforge
  2. Operational Model Programming Model No Infra Management Managed Security Pay

    only for usage Service-based Event-driven Open What is Serverless
  3. 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
  4. Containers: an industry standard 100 75 50 25 Note Apr

    13, 2017 Sep 24, 2017
  5. Introducing Cloud Run

  6. Cloud Run Container to production in seconds Natively Serverless One

    experience, where you want it
  7. 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
  8. https://knative.dev/

  9. 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…)
  10. Use cases Public • Website • API endpoint Private •

    Microservices • Asynchronous tasks • Mobile backend • Webhook
  11. 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)
  12. Code, Build, Deploy & Run! Demo Time!

  13. Cloud Run: Pay-per-use CPU / Memory / Requests 100ms

  14. Concurrency: up to 80 concurrent requests concurrency = 1 concurrency

    = 80
  15. Billable time Instance Billable Time Request 1 Start Request 1

    End Request 2 Start Request 2 End Instance Time Billable Non-billable
  16. 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
  17. Thank you! • • Qwiklab • • • StackOveonlow google-cloud-run

    @glaforge