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

Seeking Observability, Getting Started with Ser...

Seeking Observability, Getting Started with Service Mesh

sakajunquality

November 16, 2019
Tweet

More Decks by sakajunquality

Other Decks in Technology

Transcript

  1. Seeking Observability: Getting Started with Service Mesh on GCP 16

    November 2019 #DevFestLondon Jun Sakata @sakajunquality Google Developers Expert, Cloud
  2. The Speaker - Jun Sakata - Google Developers Expert, Cloud

    - SRE at Ubie, Inc. - Social Media: @sakajunquality - First time
  3. Wikipedia says... In control theory, observability is a measure of

    how well internal states of a system can be inferred from knowledge of its external outputs. https://en.wikipedia.org/wiki/Observability
  4. Wikipedia says... In control theory, observability is a measure of

    how well internal states of a system can be inferred from knowledge of its external outputs. https://en.wikipedia.org/wiki/Observability
  5. In Software Engineering ... Observability: collecting diagnostics data all across

    the stack to identify and debug production problems and also to provide critical signals about usage to our highly adaptive and scalable environment. Jaana B. Dogan, Google https://medium.com/observability/googles-approach-to-observability-frameworks-c89fc1f0e058
  6. In Software Engineering ... Observability: collecting diagnostics data all across

    the stack to identify and debug production problems and also to provide critical signals about usage to our highly adaptive and scalable environment. Jaana B. Dogan, Google https://medium.com/observability/googles-approach-to-observability-frameworks-c89fc1f0e058
  7. Microservices (Generally speaking) Several, could be thousands of, services might

    be - written in Different Languages / Frameworks / Library - using Many Protocols - having Distributed system calls
  8. Microservices Observability Think what happens - when starting a new

    service in a new language - when communicating with a new procol - when making a breaking change to network and infrastructure
  9. Microservices Observability We want to implement something that - is

    decoupled from languages, frameworks and libraries - supports many protocols or other procedures - decouples applications and the whole infrastructure
  10. Microservices Observability We want to implement something that - is

    decoupled from languages, frameworks and libraries - supports many protocols or other procedures - decouples applications and the whole infrastructure
  11. Service Mesh - is a transparent network between services -

    Decoupled from application - Language independent - provides automated applications network functions - Observability - Service Discovery - Policy Enforcement - etc...
  12. Here’s what’s happening Let’s say we have two services written

    in different languages Service A (Java w/ Spring Boot) Service B (Python w/ Flask)
  13. Here’s what’s happening Without Service Mesh, one call the other

    directly Service A (Java w/ Spring Boot) Service B (Python w/ Flask)
  14. Here’s what’s happening For the observability, each services must implement

    things Service A (Java w/ Spring Boot) Service B (Python w/ Flask) Metrics / Logs Service Metcics / Tracing Codes Metcics / Tracing Codes
  15. Here’s what’s happening What if another service is deployed...? and

    with new runtime or new protocol...? Service A (Java w/ Spring Boot) Service B (Python w/ Flask) Service C (Go w/o Framework) Metrics / Logs Service Metcics / Tracing Codes Metcics / Tracing Codes Metcics / Tracing Codes
  16. Here’s what’s happening Next thing you see might be ...

    Service A (Java w/ Spring Boot) Service B (Python w/ Flask) Service C (Go w/o Framework) Service D (Scala w/ Play Framework) Service E (Python w/ Django) Service F (Python w/ own Framework) Metcics / Tracing Codes Metcics / Tracing Codes Metcics / Tracing Codes Metcics / Tracing Codes Metcics / Tracing Codes Metcics / Tracing Codes
  17. Here’s what’s happening Next thing you see might be ...

    Service A (Java w/ Spring Boot) Service B (Python w/ Flask) Service C (Go w/o Framework) Service D (Scala w/ Play Framework) Service E (Python w/ Django) Service F (Python w/ own Framework) Service (Go Service (C++ Service (Go Servic (Kotlin Metcics / Tracing Codes Metcics / Tracing Codes Metcics / Tracing Codes Metcics / Tracing Codes Metcics / Tracing Codes Metcics / Tracing Codes
  18. Here’s what’s happening Can you update all of them? Hopefully

    in a short time of period? Service A (Java w/ Spring Boot) Service B (Python w/ Flask) Service C (Go w/o Framework) Service D (Scala w/ Play Framework) Service E (Python w/ Django) Service F (Python w/ own Framework) Service (Go Service (C++ Service (Go Servic (Kotlin Metcics / Tracing Codes Metcics / Tracing Codes Metcics / Tracing Codes Metcics / Tracing Codes Metcics / Tracing Codes Metcics / Tracing Codes
  19. Here’s what’s happening Instead of implementing those networking features in

    service applications, sidecar proxies are deployed along with them Service A (Java w/ Spring Boot) Service B (Python w/ Flask) Metcics / Tracing Codes Metcics / Tracing Codes Sidecar Proxy Sidecar Proxy
  20. Here’s what’s happening Services, both internal and external, are called

    each other through sidecars Service A (Java w/ Spring Boot) Service B (Python w/ Flask) Sidecar Proxy Sidecar Proxy
  21. Here’s what’s happening That way, we can let sidecar proxies,

    instead of applications, do what we need for observability! Service A (Java w/ Spring Boot) Service B (Python w/ Flask) Sidecar Proxy Sidecar Proxy Metrics / Logs Service
  22. Envoy - L7 proxy - Originally from Lyft - Configurable

    via API w/o restart - 100% OSS! No Premium Version - High Performance / High Reliability - Widely used in service to service proxy
  23. Envoy! Service A (Java w/ Spring Boot) Service B (Python

    w/ Flask) * envoy is not only the proxy for service mesh Universal dataplane proxy!
  24. Envoy “The network should be transparent to applications. When network

    and application problems do occur it should be easy to determine the source of the problem.” Matt Klein, Lyft https://www.envoyproxy.io/docs/envoy/latest/intro/what_is_envoy
  25. Istio - Open source Service Mesh - Originally from Google,

    Lyft and etc… - (Lyft is not using Istio) - Envoy is used as sidecar
  26. Istio in functionality Connect - Service Discovery Secure - Authentication

    - Authorization - Encryption Control - Policy like circuit breaker - A/B testing, Canary Release Observe - Monitor Traffic by telemetries 1 2 3 4 https://istio.io/
  27. How to start - Do the official “Getting Starter” -

    https://istio.io/docs/setup/getting-started/ - Install Istio - Install demo app: guest book - Do some “Tasks” - https://istio.io/docs/tasks/
  28. Try on GKE? - Try “Istio on GKE” w/ mTLS

    permissive - https://cloud.google.com/istio/docs/istio-on-gke /overview - Just one click - Not recommended for production yet!
  29. Istio 1.3 https://istio.io/news/2019/announcing-1.3/ - Performance Improvements - CLI Improvements -

    Dashboard Improvements - Intelligent Protocol Detection - Mixer-less HTTP Telemetry - Deployment Models Docs
  30. Save access log to BigQuery - Enable envoy access log

    w/ json, export to /dev/stdout --set global.proxy.accessLogFile="/dev/stdout" --set global.proxy.accessLogEncoding="JSON" - That way logs are collected to Stackdriver Logging - and you can sync logs to BigQuery
  31. Try in-proxy telemetry to stackdriver - In 1.4 mixerless telemetry

    is implemented for stackdriver - https://github.com/istio/proxy/blob/release-1.4/extensions/stackdriver/README.md
  32. Wait for Anthos Service Mesh - Formally called “Cloud Service

    Mesh” - To be a Fully-Managed for Istio-based service mesh platform
  33. Anthos Service Mesh Increase Observability With the Stackdriver Query Notation

    (Cloud Next '19) https://www.youtube.com/watch?v=NGFpGW8aQS8&t=2034s
  34. Anthos Service Mesh Increase Observability With the Stackdriver Query Notation

    (Cloud Next '19) https://www.youtube.com/watch?v=NGFpGW8aQS8&t=2034s
  35. Think Carefully ... - If you’re running a single monolith

    application, apparently you don’t - If you’re running services with a single technology stack, maybe you don’t - e.g. Java ecosystem - If public cloud provides, complete availability and observability of network, we don’t! - (Speaking of Istio) If you don’t plan to use most of its functions, consider creating controlplane on you own!
  36. Takeaways - With Service Mesh you can get a consistent

    function for observability, along with other functions, between languages and frameworks - Service Mesh decouples network and infrastructure functionality from applications - Service Mesh uses sidecar proxy for this - Istio is an all-in-one solution for Service Mesh
  37. Takeaways - Think if Service Mesh is a solution for

    you - So many ways to do this - Istio is not only option for Service Mesh