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

An overview of Google Cloud serverless compute and orchestration

An overview of Google Cloud serverless compute and orchestration

After a brief introduction to the characteristics of serverless solutions, and a panorama of the existing serverless compute products of Google Cloud (with a focus on Cloud Run and Cloud Functions), we’ll have a closer look at serverless orchestration, thanks to Google Cloud Workflows. With Workflows, developers and architects can orchestrate existing APIs and microservices, crystallise and version the business process of the enterprise, and bring more coherence in the chaos of microservices.

Guillaume Laforge

June 23, 2022
Tweet

More Decks by Guillaume Laforge

Other Decks in Technology

Transcript

  1. Proprietary + Confidential An overview of serverless compute & orchestration

    on Google Cloud Guillaume Laforge Cloud Developer Advocate @glaforge
  2. 3 Serverless Compute Develop, deploy and scale applications fast and

    securely in a fully managed environment Fully Managed Speed to Market Auto-scaling
  3. Proprietary + Confidential What is the benefit of Serverless? Cloud

    Physical Servers Network Hardware Physical Security Internet Connectivity On Prem Application Development Performance Monitoring Serverless Scaling VM Provisioning Ops & Security Management
  4. 5 Proprietary + Confidential Are you looking for a custom

    house or move-in ready? Custom House = On-Prem Control and selection of • Site plan • Floorplan • Appliance and Fixture locations • Appliances, fixtures, finishes • Furniture and Small appliances • What to cook for dinner and watch on TV Fully Furnished = Serverless Control and selection of: • Site plan • Floorplan • Appliance and Fixture locations • Appliances, fixtures, finishes • Furniture and Small appliances • What to cook for dinner and watch on TV
  5. Fully Managed Infrastructure Rapid Auto-scaling Fault-tolerant (N+1) Self-healing Built-in services

    (APM, identity & security) Pre-provisioned Abstraction (Dev. Experience) Connectivity HTTPS / gRPC Events VPC App 2008 Function 2017 Container 2019 Serverless Compute
  6. Proprietary + Confidential Serverless Use Cases App Engine Cloud Run

    Cloud Functions Build a web or mobile app — HTTP web app ✅ ✅ Developing APIs — Web & mobile backends ✅ ✅ — Internal APIs and services ✅ ✅ Data Processing ✅ Automation — Event driven reactive automation ✅ ✅ Application Integration Services ✅ ✅ Common use cases for Serverless compute products
  7. Proprietary + Confidential Why choose... Cloud Functions Connect and extend

    GCP services Single-purpose, reusable code Triggered by an event Retries Node.js, Python, Go, Java, PHP, Ruby, .NET
  8. Cloud Functions as Cloud Glue! Access Google services Cloud Storage

    Cloud Pub/Sub HTTPS Firebase Cloud Scheduler Cloud Tasks
  9. Container Managed by Google Serverless container infrastructure Managed by you

    Function code & dependencies Functions Framework Runtime (Node.js) Operating System (Ubuntu) index.js exports.helloWorld = (req, res) => { res.send("Hello, Cloud Next!"); } package.json ... Manages your function's lifecycle What is a Function?
  10. Functions Framework Curated by Google Local Development Managed by you

    Function code & dependencies 7 Languages Functions Frameworks
  11. Languages and versions supported • Node.js — 10, 12, 14,

    16 • Python — 3.7, 3.8, 3.9 • Go — 1.13, 1.16 • Java — 11, 17 preview • .NET Core — 3.1 • PHP — 7.4, 8.1 preview • Ruby — 2.6, 2.7, 3.0
  12. What’s new? Developer Experience • Develop and run locally Expand

    supported workloads • Minimum instances • Private pools Security • Secret Manager integration • Customer Managed Encryption Keys Networking • VPC connectors: Shared VPC support • VPC-SC New
  13. Developer Experience • Develop and run locally Security • Secret

    Manager integration • Customer Managed Encryption Keys • Binary Authorization Networking • VPC connectors: Shared VPC support • VPC-SC Cloud Functions 2nd generation Expand supported workloads • Larger instances • Concurrency > 1 • BigQuery remote functions • Traffic splitting • Longer processing time • 90+ event sources via Eventarc New
  14. Proprietary + Confidential Why choose... Cloud Run Run your code

    and deploy in seconds to a container Automatic HTTPS/SSL, Custom domains Any language, any library Portability No cluster management
  15. Any language Any library Any binary Ecosystem of base images

    .js .rb .go .py .sh … 0 1 0 1 0 0 1 1 1 Containers
  16. 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. Serverless Containers with Knative and Anthos
  17. Container to production in seconds Natively Serverless One experience, where

    you want it Cloud Run Bringing serverless to containers
  18. Public • Website • API endpoint Private • Internal services

    • Async tasks • Mobile backend • Webhook HTTPS endpoint
  19. Listen on 0.0.0.0 on port $PORT (default 8080) HTTP server

    must start < 4 min (timeout → 504) Request time < 60 min (default → 5 min) Stateless (in-memory file system, doesn’t persist) Computation only within request (No background activity) Container contract
  20. 1 vCPU per container instance (configurable to 8 vCPU) 512

    MiB of memory up to a max of 8 GiB (256MB-32GB preview) 80 concurrent requests per container (configurable 1-1000) 100 max containers by default (configurable 1-1000) Sandboxed by gVisor Container resources
  21. Billable time Instance Billable Time Request 1 Start Request 1

    End Request 2 Start Request 2 End Instance Time Billable Non-billable
  22. What’s new? Developer Experience • Develop and run locally •

    Deploy from local source (no Dockerfile needed) Expand supported workloads • CPU allocation (always allocated) • Better performance and file system support • gRPC streaming, WebSockets, HTTP/2 • 60min request timeout Security • Secret Manager integration • Customer Managed Encryption Keys • Binary Authorization Networking • VPC connectors: Shared VPC support • VPC-SC Committed use discounts New
  23. Cloud Workflows Declarative service orchestration Cloud Tasks Asynchronous task execution

    Eventarc Asynchronous event delivery Cloud Build Serverless CI/CD Cloud Pub/Sub Serverless messaging Cloud Scheduler Cron in the cloud API Gateway Declarative API management VPC Access Serverless networking Build and persist Orchestrate Connect Cloud Firestore Serverless NoSQL database AI Platform Serverless data science and ML BigQuery Serverless data warehouse Portfolio of Serverless capabilities on Google Cloud
  24. Workflows at a glance • Easiest way to connect •

    Zero maintenance • Durable and reliable • Observable • Self documenting • Event & scheduled triggers • Long-running operations • Callbacks • Connectors • Low-latency, fast deploys • Scale from 0 → ∞ Compute External API’s Cloud Services etc... SaaS API’s Private API’s Other Clouds Triggers Workflows - orchestrate & integrate
  25. The Workflow definition The syntax is in YAML or JSON,

    and is automatically visualized as a flow chart.
  26. Use cases • Service orchestration • Batch jobs • Business

    processes • Data and ML pipelines • Infrastructure automation
  27. Parallel steps! What’s new? Preview - <namedStep>: parallel: … for:

    value: <v> … steps: ... - <parallelStepName>: parallel: ... branches: - <branchName1>: steps: ... ... - <branchNameN>: steps: ...