Microservices at Scale: Next Steps with Kubernetes and Service Mesh

A presentation at Chicago Kubernetes Meetup in March 2019 in Chicago, IL, USA by Jesse Butler

Slide 1

Slide 1

ive Microservices at Scale Next Steps in Kubernetes with Service Mesh Jesse Butler Cloud Native Advocate, Oracle Cloud Infrastructure. cloudnative.oracle.com @jlb13

Slide 2

Slide 2

Level Set • Microservices • Kubernetes • Service Mesh Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2

Slide 3

Slide 3

Let’s Talk About Service Mesh A service mesh that allows us to connect, secure, control and observe services at scale, often requiring no service code modification Though other options exist, Linkerd and Istio are the two contenders to choose from Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 3

Slide 4

Slide 4

Docker • Docker changed the way we build and ship software • Application and host are decoupled, making application services portable • Containers are an implementation detail, but a critical one Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 4

Slide 5

Slide 5

Docker Is a Start But, once we abstract the host away by using containers, we no longer have our hands on an organized platform. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 5

Slide 6

Slide 6

Kubernetes Kubernetes to the rescue. It provides the abstractions and organization we need for deploying containers at scale Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 6

Slide 7

Slide 7

Migration from the Old World… Users Application Database Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 7

Slide 8

Slide 8

…to Cloud Native Kubernetes Hotness • Microservices running in orchestrated containers • Everybody’s happy • What happens now? Load balancer Service Service Service Database Queue Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 8

Slide 9

Slide 9

Day Two Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 9

Slide 10

Slide 10

Table Stakes for Services at Cloud Scale • We require a method to simply and repeatably deploy software, and simply and recoverably modify deployments • We require telemetry, observability, and diagnosability for our software if we hope to run at cloud scale Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 10

Slide 11

Slide 11

Day 2 Solutions • Ingress and Traffic Management • Tracing and Observability • Metrics and Analytics • Identity and Security Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 11

Slide 12

Slide 12

Abstract Requirements • Traffic Management • Observability • Security • Policy Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 12

Slide 13

Slide 13

Hard Things are Hard These are Hard Problems™, and some software may address one of them well. Service mesh attempts to address them all. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 13

Slide 14

Slide 14

What Is a Service Mesh? • Infrastructure layer for controlling and monitoring service-to-service traffic • Greatly simplifies service implementation via service discovery, automated retries, timeouts and more • A data plane deployed alongside application services, and a control plane used to manage the mesh Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 14

Slide 15

Slide 15

Service Mesh is Not an API Gateway API Gateways deal with north-south traffic, inbound to your cluster Service Mesh is concerned with east-west traffic, between your services within your cluster Though Istio does have an ingress gateway… Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 15

Slide 16

Slide 16

Service Mesh Architecture • Both Istio and Linkerd use a proxy on the data plane to create the mesh • Each service you add to the mesh has a proxy injected into its pod • This vantagepoint is what gives a service mesh its power – it sees and knows all Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 16

Slide 17

Slide 17

Sidecar Proxy Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 17

Slide 18

Slide 18

Sidecar Proxy Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 18

Slide 19

Slide 19

Sidecar Proxy HTTP/1.1, HTTP/2 gRPC or TPC With or without mTLS Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 19

Slide 20

Slide 20

Let’s Look at Linkerd Linkerd is an ultralight service mesh for Kubernetes and other orchestration platforms Linkerd2 has a wholly reimplemented proxy and is built for low latency and massive scaling Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 20

Slide 21

Slide 21

Linkerd Features • Deep runtime diagnostics – Comprehensive suite of diagnostic tools, including automatic service dependency maps and live traffic samples • Actionable service metrics – Allows you to monitor golden metrics—success rate, request volume, and latency— for every service and define response Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 21

Slide 22

Slide 22

Linkerd Features • Simple, minimalist design – No complex APIs or configuration. For most applications, Linkerd will “just work” out of the box • Ultralight and ultra fast – Built in Rust, Linkerd’s data plane proxies are incredibly small (<10 mb) and blazing fast (p99 < 1ms) Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 22

Slide 23

Slide 23

Linkerd Components Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 23

Slide 24

Slide 24

Using Linkerd • Linkerd CLI utilities – Routes, stats, tap, profiles • Unified dashboard • Configure services with typical Kubernetes workflows - CRDs • Automated sidecar injection is possible Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 24

Slide 25

Slide 25

Let’s Look at Istio Istio a service mesh for Kubernetes that allows us to connect, secure, control and observe services at scale, often requiring no service code modification. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 25

Slide 26

Slide 26

Istio Features • Traffic Management – Fine-grained control with rich routing rules, retries, failovers, and fault injection • Observability – Automatic metrics, logs, and traces for all traffic within a cluster, including cluster ingress and egress Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 26

Slide 27

Slide 27

Istio Features • Security – Strong identity-based AuthN and AuthZ layer, secure by default for ingress, egress and service-to-service traffic • Policy – Extensible policy engine supporting access controls, rate limits and quotas Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 27

Slide 28

Slide 28

Using Istio • istioctl, cli for mesh admin • Kiali – dashboard BUI • Configure services with typical Kubernetes workflows - CRDs • Sidecare auto-injection is optional on a per-namespace basis Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 28

Slide 29

Slide 29

Istio Components • Envoy – Sidecar proxy • Pilot – Propagates rules to sidecars • Mixer – Enforces access control, collects telemetry data • Citadel – Service-to-service and end-user AuthN and AuthZ Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 29

Slide 30

Slide 30

Envoy High performance proxy which mediates inbound and outbound traffic. • Dynamic service discovery • Load balancing • TLS termination • HTTP/2 and gRPC proxies • Circuit breakers • Health checks • Split traffic • Fault injection • Rich metrics Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 30

Slide 31

Slide 31

Istio Architecture Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 31

Slide 32

Slide 32

Linkerd or Istio • Superficially speaking… – Istio for depth and features – Linkerd for simplicity and ease-of-use • Your mileage may vary J Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 32

Slide 33

Slide 33

Thanks! Twitter: @jlb13 cloudnative.oracle.com $500 OCI trial: bit.ly/ChiK8sOC