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

DevFest Hanoi 2019: Container Once, Serverless ...

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →

DevFest Hanoi 2019: Container Once, Serverless Anywhere

In this talk, Quyen (Vince) will deep dive into Google Cloud's newest compute solution - Cloud Run & Knative and how its enable developers to run serverless containers on a fully managed environment, in your own Google Kubernetes Engine clusters or in your own Data Centre with Anthos; and how this allows teams to focus on code and pay only for runtime usage.

Avatar for Vincent Nguyen

Vincent Nguyen

November 22, 2019

Other Decks in Technology

Transcript

  1. “We can’t be locked in.” “How can we use existing

    binaries?” “Why do I have to choose between containers and serverless?” “Can you support language ____ ?” Serverless wasn’t accessible to everyone...
  2. What is Serverless? Operational Model Programming Model No Infra Management

    Managed Security Pay only for usage Serviceful Event-driven Open
  3. • Gmail, Web Search, Maps • MapReduce, batch • GFS,

    Colossus • Even Google’s Cloud Platform our VMs run in containers We launch over 4 billion containers per week Everything at Google runs in containers
  4. 15+ years experience in containers July 15 K8s 1.0 Jun

    14 First Github commit for Kube Public Beta of Solaris Containers Birth of Borg, 3-4 Google Engineers working to automate cluster management. 2018 2009 2015 2012 Work begins to opensource Google’s Borg as Kubernetes Process Containers launched by Google now known as cgroups and merged with Linux Kernel. LXC launched, complete Linux container manager 2013 Docker launched GKE on Prem Announced Gvisor Knative Istio 1.0 Istio 0.1 Envoy 1.0 Aug 15 GKE GA Nov 14 GKE Alpha 2019 Anthos 2003 2006 2009 2012 2015 2018 2019
  5. What Knative is • An open source project • Set

    of building blocks to construct your own FaaS/PaaS ◦ abstracts common tasks through custom Kubernetes API objects • An abstraction on top of Kubernetes ◦ It's still Kubernetes: Runs containers at the end of the day.
  6. Buid / Tekton Serving Kubernetes Platform Products Primitives Events ...

    Cloud Run Cloud Run on GKE SAP Kyma Pivotal Function Service IBM Cloud Functions Red Hat Cloud Functions Pivotal riff OpenFaaS T-mobile Jazz Knative enabled Tekton Kubernetes-native [build] pipeline, industry leading CI/CD partners
  7. Cloud Run Container to production in seconds Any language, library,

    stateless container Pay for exact usage Run fully managed or on GKE cluster Consistent developer experience Portable via Knative GA!
  8. Public • Website • API endpoint • Mobile backend •

    Webhook Private • Microservices • Asynchronous tasks Use cases
  9. Containers .js .rb .go .sh .py ... Any language Any

    library Any binary Ecosystem of base images Industry standard
  10. Cloud Run is Serverless • Focus on your code •

    No infrastructure to manage • Managed URLs and TLS certificates • Redundant, automatic failover • Simple developer experience • Scales with you • Pay per use
  11. >1,000 Stores Countries 14 62,000 employees 6 customer contacts daily

    Mio. 21 Bn. € revenues, Bn. € online revenues 2.6
  12. Use-Case We want to have a real time sales omni

    channel dashboard to enable our stores to react as fast as possible on customer behaviour and needs
  13. Other Cloud Run Setup Compute Core Infra Load Balancing Service

    Mesh Specify Volumes 1 2 NAT Shared VPC Shared VPC Getting Started Setup Compute
  14. Other Cloud Run Deploy Time Test 1 2 Workload YAML

    Image Rep. Source Version Control Auto-Scale YAML Cloud Build YAML Deploy Time & Test Source Version Control Image Rep. Cloud Build YAML 3 Getting Started Setup Compute CICD
  15. Other Cloud Run 1 2 Run Run 3 4 Getting

    Started Setup Compute CICD Run
  16. Stability: No incidents so far! Cost: ~40% cheaper due to

    scale to zero! Efforts reduced by 80% Complexity significantly reduced! Cloud Run is changing the game: Focus on your app, the rest is done by GCP!
  17. We love Cloud Run! Some nerdy facts. • Over 5.5m

    requests per day • Peak of 8000 requests/s • ~500€ per month for Cloud Run • Average latency of ~700 ms • This solution was built by 2 Data Engineers in 3 days! Instance time of billable containers Requests per day
  18. Cloud Run for Anthos Same great Cloud Run, but on

    Kubernetes More flexibility and control, operator required. Integrates with k8s-based policy, control & mgmt Custom nodes, hardware accelerators, VPC Build on your existing investment in Kubernetes
  19. Docs, Quick Starts cloud.run Useful resources: https://github.com/steren/awesome-cloudrun Questions FAQ https://github.com/ahmetb/cloud-run-faq

    StackOverflow tag google-cloud-run Source & Samples knative.dev Anything else Twitter @vincengocnguyen LinkedIn quyenngocnguyen
  20. Q&A Cloud Run Life at Google Life in the UK

    Applying for Google Google Cloud Stadia, Play, Ads...