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

Making Microservices Micro with Istio Service Mesh

Ray Tsang
November 09, 2017

Making Microservices Micro with Istio Service Mesh

Presented at Devoxx Belgium 2017
Video: https://youtu.be/AGztKw580yQ
Microservices are here to stay. When applied properly, microservices techniques and culture ultimately help us continuously improve business at a faster pace than traditional architecture. However, microservices architecture itself can be complex to configure. All of a sudden, we are faced with the need for a service discovery server, how do we store service metadata, make decisions on whether to use client side load balancing or server side load balancing, deal with network resiliency, think how do we enforce service policies and audit, trace nested services calls.... The list goes on.

In this talk, Ray will introduce Istio, an open source service mesh framework created by Google, IBM, and Lyft. We'll see how the service mesh work, the technology behind it, and how it addresses aforementioned concerns.

Ray Tsang

November 09, 2017
Tweet

More Decks by Ray Tsang

Other Decks in Technology

Transcript

  1. with Istio
    Making Microservices Micro

    View Slide

  2. 2
    @saturnism @googlecloud @istiomesh @kubernetesio
    Ray Tsang
    Developer Advocate
    Google Cloud Platform
    @saturnism | +RayTsang

    View Slide

  3. 3
    @saturnism @googlecloud @istiomesh @kubernetesio
    Ray Tsang
    Developer
    Architect
    Traveler
    Photographer
    flickr.com/saturnism

    View Slide

  4. 4
    @saturnism @googlecloud @istiomesh @kubernetesio
    Microservices?
    You probably heard a lot already!
    No theories here - just a how to solve problems

    View Slide

  5. 5
    @saturnism @googlecloud @istiomesh @kubernetesio
    A B
    C D

    View Slide

  6. 6
    @saturnism @googlecloud @istiomesh @kubernetesio
    A B
    C
    D

    View Slide

  7. 7
    @saturnism @googlecloud @istiomesh @kubernetesio
    A B
    C
    D

    View Slide

  8. 8
    @saturnism @googlecloud @istiomesh @kubernetesio
    So many instances…
    Deployment
    Resource Isolation & Utilization
    Resilliency
    Networking

    View Slide

  9. 9
    @saturnism @googlecloud @istiomesh @kubernetesio
    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
    name: work-server-v1
    ...
    spec:
    replicas: 2
    template:
    ...
    spec:
    containers:
    - name: work-server
    image: saturnism/work-server-istio:v1

    View Slide

  10. 10
    @saturnism @googlecloud @istiomesh @kubernetesio
    web browsers
    Scheduler
    kubectl web browsers
    scheduler
    Kubelet Kubelet Kubelet Kubelet
    Config
    file
    Kubernetes Master
    Container
    Image

    View Slide

  11. 11
    @saturnism @googlecloud @istiomesh @kubernetesio
    Control Plane
    Cluster of machines as one
    Well-defined API & types
    Abstraction of infrastructure

    View Slide

  12. 12
    @saturnism @googlecloud @istiomesh @kubernetesio
    Let's see it...

    View Slide

  13. 13
    @saturnism @googlecloud @istiomesh @kubernetesio
    A B
    C
    D
    How?

    View Slide

  14. 14
    @saturnism @googlecloud @istiomesh @kubernetesio
    Beyond Deployment
    Load Balancing
    Fault Tolerance
    Observability & Insight
    Monitoring & Tracing
    Circuit Breaking

    View Slide

  15. 15
    @saturnism @googlecloud @istiomesh @kubernetesio
    Popular Open Source Tools
    Eureka - Service Registry
    Ribbon - Client Side LB
    Hystrix - Circuit Breaker
    Zipkin - Distributed Tracing
    Prometheus - Monitoring
    Grafana - Data Visualization

    View Slide

  16. 16
    @saturnism @googlecloud @istiomesh @kubernetesio
    Eureka
    Service Registry
    Zuul
    API Gateway
    Zipkin
    Distributed Trace
    Prometheus
    Metrics Store
    Grafana
    Visualization
    Microservice A
    Ribbon
    Hystrix
    Tracer
    Metrics
    Archaius
    Centralized Config

    View Slide

  17. 17
    @saturnism @googlecloud @istiomesh @kubernetesio
    Microservice A
    Ribbon
    Hystrix
    Tracer
    Metrics
    Microservice A
    Ribbon
    Hystrix
    Tracer
    Metrics
    Microservice A
    Ribbon
    Hystrix
    Tracer
    Metrics
    Microservice B
    Ribbon
    Hystrix
    Tracer
    Metrics
    Eureka
    Service Registry

    View Slide

  18. 18
    @saturnism @googlecloud @istiomesh @kubernetesio
    This is easy when...
    Single stack
    Framework w/ Spring Boot

    View Slide

  19. 19
    @saturnism @googlecloud @istiomesh @kubernetesio
    This becomes more difficult...
    Multiple stack
    Multiple frameworks
    Polyglot
    Legacy

    View Slide

  20. 20
    @saturnism @googlecloud @istiomesh @kubernetesio
    At the end of the day...
    Let Microservice A talk to Microservice B!

    View Slide

  21. 21
    @saturnism @googlecloud @istiomesh @kubernetesio
    As simple as...
    Making a HTTP request?

    View Slide

  22. 22
    @saturnism @googlecloud @istiomesh @kubernetesio
    Enter Istio, a Service Mesh!

    View Slide

  23. 23
    @saturnism @googlecloud @istiomesh @kubernetesio
    What Where When How
    A complete framework for connecting, securing,
    managing and monitoring services
    Secure and monitor traffic for microservices and
    legacy services
    An open platform with key contributions from
    Google, IBM, Lyft and others
    Multi-environment and multi-platform, but
    Kubernetes first

    View Slide

  24. 24
    @saturnism @googlecloud @istiomesh @kubernetesio
    Control Plane
    Service to Service Communication
    Routing Rules
    Retries
    Circuit Breaker
    Performance Monitoring
    Tracing

    View Slide

  25. 25
    @saturnism @googlecloud @istiomesh @kubernetesio
    Eureka
    Service Registry
    Zuul
    API Gateway
    Zipkin
    Distributed Trace
    Prometheus
    Metrics Store
    Grafana
    Visualization
    Microservice A
    Ribbon
    Hystrix
    Tracer
    Metrics
    Archaius
    Centralized Config

    View Slide

  26. 26
    @saturnism @googlecloud @istiomesh @kubernetesio
    Eureka
    Service Registry
    Zuul
    API Gateway
    Zipkin
    Distributed Trace
    Prometheus
    Metrics Store
    Grafana
    Visualization
    Microservice A
    Ribbon
    Hystrix
    Tracer
    Metrics
    Archaius
    Centralized Config

    View Slide

  27. 27
    @saturnism @googlecloud @istiomesh @kubernetesio
    Eureka
    Service Registry
    Zuul
    API Gateway
    Zipkin
    Distributed Trace
    Prometheus
    Metrics Store
    Grafana
    Visualization
    Microservice A
    Ribbon
    Hystrix
    Tracer
    Metrics
    Archaius
    Centralized Config

    View Slide

  28. 28
    @saturnism @googlecloud @istiomesh @kubernetesio
    Microservice A
    Ribbon
    Hystrix
    Tracer
    Metrics Proxy
    Microservice A

    View Slide

  29. 29
    @saturnism @googlecloud @istiomesh @kubernetesio
    A C++ based L4/L7 proxy
    Low memory footprint
    Battle-tested @ Lyft
    100+ services
    10,000+ VMs
    2M req/s
    An awesome team willing to work with the
    community!

    View Slide

  30. 30
    @saturnism @googlecloud @istiomesh @kubernetesio
    Dynamic service discovery
    Load balancing
    TLS termination
    HTTP/2
    gRPC proxying
    Circuit breakers
    Health checks
    Traffic split
    Fault injection
    ...

    View Slide

  31. 31
    @saturnism @googlecloud @istiomesh @kubernetesio
    Proxy
    Microservice A
    Proxy
    Microservice B
    Istio Pilot
    Configure proxies
    Kubernetes

    View Slide

  32. 32
    @saturnism @googlecloud @istiomesh @kubernetesio
    Proxy
    Microservice A
    Proxy
    Microservice B
    Service calls http://service-b/

    View Slide

  33. 33
    @saturnism @googlecloud @istiomesh @kubernetesio
    Proxy
    Microservice A
    Proxy
    Microservice B
    Service calls http://service-b/
    Service Mesh transparently intercepts request, forwards to local proxy

    View Slide

  34. 34
    @saturnism @googlecloud @istiomesh @kubernetesio
    Proxy
    Microservice A
    Proxy
    Microservice B
    Service calls http://service-b/
    Service Mesh transparently intercepts request, forwards to local proxy
    Proxy has a list of destinations, load balances the request to a destination proxy

    View Slide

  35. 35
    @saturnism @googlecloud @istiomesh @kubernetesio
    Proxy
    Microservice A
    Proxy
    Microservice B
    Service calls http://service-b/
    Service Mesh transparently intercepts request, forwards to local proxy
    Proxy has a list of destinations, load balances the request to a destination proxy
    If allowed, destination proxy forwards the request to Service B instance

    View Slide

  36. 36
    @saturnism @googlecloud @istiomesh @kubernetesio
    Proxy
    Microservice A
    Proxy
    Microservice B
    Service calls http://service-b/
    Service Mesh transparently intercepts request, forwards to local proxy
    Proxy has a list of destinations, load balances the request to a destination proxy
    Destination proxy checks with a mixer to enforce policy, quota, ACL, etc
    Service B response goes back to the caller

    View Slide

  37. 37
    @saturnism @googlecloud @istiomesh @kubernetesio
    Proxy
    Microservice A
    Proxy
    Microservice B
    Service calls http://service-b/
    Service Mesh transparently intercepts request, forwards to local proxy
    Proxy has a list of destinations, load balances the request to a destination proxy
    Destination proxy checks with a mixer to enforce policy, quota, ACL, etc
    If allowed, destination proxy forwards the request to Service B instance
    Service B response goes back to the caller

    View Slide

  38. 38
    @saturnism @googlecloud @istiomesh @kubernetesio
    Proxy
    Microservice A
    Proxy
    Microservice B
    Through the Proxy
    - Traffic Control - enforce routing rules & policies
    - Resiliency - Circuit Breaker, Retries
    - Monitoring - Record metrics
    - Observability - Record traces
    - Security - Mutual TLS! Encryption

    View Slide

  39. 39
    @saturnism @googlecloud @istiomesh @kubernetesio
    Platform Services
    Proxy
    Microservice A
    Proxy
    Microservice B
    Zipkin
    Prometheus
    Grafana
    Istio Mixer

    View Slide

  40. 40
    @saturnism @googlecloud @istiomesh @kubernetesio
    or Cloud Platform Services
    Proxy
    Microservice A
    Proxy
    Microservice B
    ...
    BlueMix
    Google Cloud
    Istio Mixer

    View Slide

  41. 41
    @saturnism @googlecloud @istiomesh @kubernetesio
    Let's see it...

    View Slide

  42. 42
    @saturnism @googlecloud @istiomesh @kubernetesio
    Pod
    Istio Proxy
    Service A
    Istio CA
    istio:*.myorg.com
    SAN: “Istio:foo.prod.myorg.com”
    - Service account: foo
    - Namespace: prod
    Service B
    Istio Proxy
    Pod
    SAN: “Istio:bar.prod.myorg.com”
    - Service account: bar
    - Namespace: prod
    istio:*.myorg.com
    istio:*.myorg.com
    Issue & mount as k8s secrets
    Orchestrate Key & Certificate:
    - Generation
    - Deployment
    - Rotation
    - Revocation

    View Slide

  43. 43
    @saturnism @googlecloud @istiomesh @kubernetesio
    Visibility
    Resiliency & Efficiency
    Traffic Control
    Security
    Policy Enforcement

    View Slide

  44. 44
    @saturnism @googlecloud @istiomesh @kubernetesio
    ● 0.1: a single Kubernetes namespace
    ● 0.2 (just launched): a single Kubernetes
    cluster and external VMs
    ● 0.3 (by end of year): production readiness
    within a single cluster
    ● 1.0: (2018): complete mesh across all
    environments

    View Slide

  45. 45
    @saturnism @googlecloud @istiomesh @kubernetesio
    ● Install Kubernetes (v1.7+ for Initializers)
    ○ Google Container Engine Alpha clusters
    ● istio.io quickstart
    ● Helm chart
    ○ helm install incubator/istio
    ● Take a lab!
    Getting started

    View Slide

  46. 46
    @saturnism @googlecloud @istiomesh @kubernetesio 46
    Learn more on istio.io
    Let us know on [email protected]
    Examples on github.com/saturnism/istio-by-example-java
    Try our Code Labs g.co/codelabs/cloud!
    Thank you!

    View Slide