Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Adapt or Die: A Microservices Story at Google

1,068 views

Published on

Get the inside scoop on how Kubernetes evolved within Google, and why it might be the right container orchestration engine for your enterprise microservices. K8s is one of the most popular production grade container orchestration engines used by large scale systems such as Ebay, viacom, and even Apigee ! Allan will go over specific use cases around web-scale that influenced Kubernetes’ design principles, and delve into the technical merits of using Kubernetes for developers. This session is a must for any developer or architect.

Published in: Software
  • Be the first to comment

Adapt or Die: A Microservices Story at Google

  1. 1. ©2016 Apigee Corp. All Rights Reserved. A Microservice Story at Google Dan Paik Product Manager, Google
  2. 2. ©2016 Apigee Corp. All Rights Reserved. Containers 101 ©2016 Apigee Corp. All Rights Reserved. 2
  3. 3. Application Containers are changing the way people deploy and run applications
  4. 4. Hypervisor Guest environment app code libraries guest kernel This is vanilla virtualization
  5. 5. machine image locked into a platform It has downsides: Not portable & Opaque Hypervisor Guest environment app code libraries guest kernel
  6. 6. It has downsides: No Isolation Hypervisor Guest environment app code libraries guest kernel dependency??? app code
  7. 7. It has downsides: Little Reuse Hypervisor Guest environment app code libraries guest kernel Guest environment app code libraries guest kernel Guest environment app code libraries guest kernelredundant
  8. 8. Containers create a better abstraction layer Hypervisor Guest environment app code libraries guest kernel cut here
  9. 9. Node environment Much better: Portable, isolated, static app environments Hypervisor node kernel app code libraries app code libraries app code libraries container 1 container 2 container 3
  10. 10. Google confidential │ Do not distribute Google has been developing and using containers to manage our applications for over 12 years. Images by Connie Zhou 2B launched per week ● simplifies management ● performance isolation ● efficiency
  11. 11. it hasn’t always been easy
  12. 12. we needed to do better Clustering Declarative app model Agile, decoupled app architecture Smart (ML enhanced) active management Containers Hermetically sealed deployment units Efficient isolation and resource use our Bad Old World: machine images Everything (app and OS) bundled up in machine images Fragile, tightly coupled apps and little resource fungibility Low resource efficiency a Better New World: cloud native computing Radically enhanced developer productivity: snap together systems Radically reduced operations overhead: rely on smart systems Radically simpler deployments: immutable infrastructure
  13. 13. cloud native computing: Google style • container packaged • predictable deployment; efficient resource isolation • dynamically scheduled • radically higher QoS and efficiency; radically lower ops cost • micro-services oriented • radically higher reuse; easier to extend
  14. 14. Separation of concerns = operations specialization Separate infrastructure ops from cluster ops from app ops Deliver common cluster services Radically reduced operations overhead what Google got from this
  15. 15. what Google got from this Deeper automation = fewer bad outcomes Higher abstraction provides more insight into behavior Orchestration made far easier Self-healing and self-managing systems
  16. 16. what Google got from this Radically better physical efficiency Containers offer efficient and fine grained resource isolation Resource aware scheduling Safer, less intrusive overcommitment
  17. 17. but it’s all so different Deployment Management, monitoring Isolation (very complicated!) Updates Discovery Scaling, replication, sets A fundamentally different way of managing applications requires different tooling and abstractions Images by Connie Zhou
  18. 18. kubernetes Greek for “Helmsman”; also the root of the words “governor” and “cybernetic” Manages container clusters Inspired and informed by Google’s experiences and internal systems Supports multiple cloud and bare-metal environments Supports multiple container runtimes 100% Open source, written in Go Manage applications, not machines
  19. 19. Google Cloud Platform Kubernetes at a glance Open source production-grade container scheduling and management ● Top 0.01% of all GitHub projects: 1000+ contributors & 35,000+ commits Run Anywhere: multi-cloud, on-prem, bare-metal, OpenStack, etc. Broad industry adoption Commercial Enterprise Support Kubernetes at a glance
  20. 20. One or more containers co-scheduled, scaled and versioned [Pods] Automated health checking and rolling upgrades [Replication Controller] Decoupling of components and late binding [Labels] Late Binding a service endpoint that can span multiple Pod versions [Services] Kubernetes Design Principles registry containers Service Pods Each pod contains one or more containers Nodes Role: frontend Role: frontend Role: frontend Role: frontend Replication controller Replicas: 3 Env: prod microservice labels Service communication channel Blueprint “pod template” Env: prod Env: prod Env: prod Kubernetes provides the basic building blocks for Microservice patterns by providing a toolbox of primitives for developers to compose a distributed system with pieces that operate independently
  21. 21. Kubernetes provides microservice-centric infrastructure Once specific containers are no longer bound to specific machines/VMs, host-centric infrastructure no longer works Scheduling: Decide where my containers should run Lifecycle and health: Keep my containers running despite failures Scaling: Make sets of containers bigger or smaller Naming and discovery: Find where my containers are now Load balancing: Distribute traffic across a set of containers Storage volumes: Provide data to containers Logging and monitoring: Track what’s happening with my containers Debugging and introspection: Enter or attach to containers Identity and authorization: Control who can do things to my containers
  22. 22. Google Cloud Platform Kubernetes offers choice and flexibility for Hybrid Cloud Setting up and managing a cluster • Choose a cloud: GCE, AWS, Azure, Rackspace, on-premises, ... • Choose a node OS: CoreOS, Atomic, RHEL, Debian, CentOS, Ubuntu, ... • Provision machines: create VMs, install Docker, ... • Configure networking: IP ranges for Pods, Services, SDN, firewalls, ... • Start cluster services: DNS, logging, monitoring, … • Start and configure Kubernetes • Manage nodes: kernel upgrades, OS updates, hardware failures, … GKE is Google hosted and managed Kubernetes • Directly uses upstream open source • Rolls out within 3-5 business days of the latest open source release • Alpha features also now available through ‘alpha clusters’
  23. 23. Google Cloud Platform Google Container Engine (GKE) “It delivers a high-performing, flexible infrastructure that lets us independently scale components for maximum efficiency” ~ Philips (Hue Lights) “Made our engineers more productive and helped us do more work with less staff” ~ CCP Games (EVE Online)
  24. 24. ©2016 Apigee Corp. All Rights Reserved. Apigee Extension of K8s ©2016 Apigee Corp. All Rights Reserved. 24
  25. 25. ©2016 Apigee Corp. All Rights Reserved. Problem 25 Text Customers want to code APIs, not just configure
  26. 26. ©2016 Apigee Corp. All Rights Reserved. Why Apigee Chose K8s 26 Text •Focused and Extensible •Container-native •Language neutral •Cloud neutral
  27. 27. ©2016 Apigee Corp. All Rights Reserved. Multi-tenancy Extension: Namespace & Control Plane Isolation 27 Text
  28. 28. ©2016 Apigee Corp. All Rights Reserved. Vision: Container Native API Management 28 Text
  29. 29. ©2016 Apigee Corp. All Rights Reserved. Key Takeaways 29 Text Apigee & Kubernetes: ● runs anywhere and abstracts away the underlying infrastructure ● patterns provide the building blocks for deploying and managing microservices ● speeds application development by promoting re-use ● enables separation of concerns and allow developers to focus on functionality

×