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

Distributed Microservices: Metrics and Tracing with Istio and OpenCensus

Distributed Microservices: Metrics and Tracing with Istio and OpenCensus

With the adoption of microservices, what was once a single application running on a single server has become hundreds of services running on dozens of servers. Microservices give you more freedom, scalability and agility, but makes understanding what’s going on a lot harder. Things like understanding the lifecycle of a request, finding hotspots in your system, and even getting an alert when something is wrong is now much harder!

In this talk, I’ll demo two open source projects, Istio and OpenCensus, that are based on years of production experience at Google and can significantly help you monitor and trace your distributed microservices. Istio can automatically trace RPC calls between services, and OpenCensus makes it easy to add white-box metrics and tracing to your services so you know what’s going on.

Sandeep Dinesh

February 27, 2018
Tweet

More Decks by Sandeep Dinesh

Other Decks in Programming

Transcript

  1. Distributed Microservices:
    Metrics and Tracing
    with Istio and OpenCensus

    View full-size slide

  2. Confidential & Proprietary
    Business Logic
    Database
    Users

    View full-size slide

  3. Confidential & Proprietary
    Load Balancer
    Users
    SQL Database Cluster
    NoSQL Database Cluster
    ETL Pipeline
    Front End Business Logic
    Back End Business Logic
    Data Warehouse
    Back End Business Logic
    Back End Business Logic

    View full-size slide

  4. Confidential & Proprietary
    Load Balancer
    Users
    SQL Database Cluster
    NoSQL Database
    Cluster
    ETL Pipeline
    Front End Business
    Logic
    Back End Business
    Logic
    Data Warehouse
    Back End Business
    Logic
    Back End Business
    Logic
    Load Balancer
    Users
    SQL Database Cluster
    ETL Pipeline
    Front End Business
    Logic
    Back End Business
    Logic
    Data Warehouse
    Back End Business
    Logic
    Back End Business
    Logic
    Load Balancer
    Users
    SQL Database Cluster
    NoSQL Database
    Cluster
    ETL Pipeline
    Front End Business
    Logic
    Back End Business
    Logic
    Data Warehouse
    Back End Business
    Logic
    Back End Business
    Logic
    Load Balancer
    Users
    SQL Database Cluster
    NoSQL Database
    Cluster
    ETL Pipeline
    Front End Business
    Logic
    Back End Business
    Logic
    Data Warehouse
    Back End Business
    Logic
    Back End Business
    Logic

    View full-size slide

  5. Confidential & Proprietary
    Microservices add network and
    infra complexity to your system.

    View full-size slide

  6. Confidential & Proprietary
    Microservices remove code
    complexity in your system.

    View full-size slide

  7. Code can’t
    Infrastructure can
    be automated

    View full-size slide

  8. Confidential & Proprietary
    Use tools to simplify the network
    and infra complexity in your
    system.

    View full-size slide

  9. Confidential & Proprietary
    Distributed Tracing
    Service B
    Service A Service C
    100ms 90ms

    View full-size slide

  10. Confidential & Proprietary
    Distributed Tracing
    analytics front-end server
    auth billing reporting
    spanner
    blob storage

    View full-size slide

  11. Confidential & Proprietary

    View full-size slide

  12. Confidential & Proprietary

    View full-size slide

  13. Confidential & Proprietary
    Tracing:
    Create trace IDs and tags for incoming requests
    Every service needs to report traces to a collector
    Every service needs to forward headers downstream
    You need to be able to query and search these traces

    View full-size slide

  14. Confidential & Proprietary
    Distributed Stats

    View full-size slide

  15. Confidential & Proprietary
    Stats:
    Every service needs to report meaningful stats to a collector
    You need to be able to query and search these stats

    View full-size slide

  16. Confidential & Proprietary
    Tracing
    Stats &
    Metrics
    - Prometheus
    - Datadog
    - AppDynamics
    - Google Stackdriver
    - Dynatrace
    - Azure App Insights
    - Dapper
    - Zipkin
    - Dynatrace
    - Solarwinds
    - AppDynamics
    - Solarwinds
    - Jaeger
    - AWS X-Ray
    - Google Stackdriver

    View full-size slide

  17. Confidential & Proprietary
    OpenCensus Istio

    View full-size slide

  18. Confidential & Proprietary
    xkcd.com/927

    View full-size slide

  19. Confidential & Proprietary
    Provide great tracing and stats
    for ops while getting out of the
    way of developers

    View full-size slide

  20. Confidential & Proprietary
    ● Request Routing
    ● Load Balancing
    ● Authentication
    ● Failure Management
    ● Fault Injection
    ● Circuit Breaking
    Istio - Cloud Native Service Mesh
    Deep Dive Video:
    sandeepdinesh.com/istio-101

    View full-size slide

  21. Confidential & Proprietary
    Istio
    Service B
    Service A Service C
    100ms 90ms
    Code
    Istio
    Proxy
    Code
    Istio
    Proxy
    Code
    Istio
    Proxy
    Collector

    View full-size slide

  22. Confidential & Proprietary
    OpenCensus
    Service B
    Code
    Collector
    Function 1 Function 2
    Function 2.1 Function 2.2
    Function 3

    View full-size slide

  23. Confidential & Proprietary
    Demo

    View full-size slide

  24. Istio
    istio.io
    OpenCensus
    opencensus.io
    Sandeep Dinesh
    @sandeepdinesh
    Thank You! Special Thanks:
    JBD
    @rakyll
    This Talk:
    sandeepdinesh.com/istio-open-census
    Istio Deep Dive Video:
    sandeepdinesh.com/istio-101

    View full-size slide