Istio to the rescue
Techorama 2021�Ricardo Castro
https://mccricardo.com
@mccricardo
Agenda
https://mccricardo.com
@mccricardo
The great transition
Big ball of things
Certainly, some storage
Small thingy
Small thingy
Small thingy
Flashy storage
Flashy storage
Flashy storage
The monolith
The microservices
https://mccricardo.com
@mccricardo
Why do we do it?
https://mccricardo.com
@mccricardo
Is it all sunshine and rainbows?
https://mccricardo.com
@mccricardo
Mesh what?
A mesh network is a local network topology in which the infrastructure nodes (i.e. bridges, switches and other infrastructure devices) connect directly, dynamically and non-hierarchically to as many other nodes as possible and cooperate with one another to efficiently route data from/to clients.
https://mccricardo.com
@mccricardo
Service Mesh
A service mesh is the connective tissue between our services that adds additional capabilities like traffic control, service discovery, load balancing, resilience, observability, security, and so on.
A service mesh allows applications to offload these capabilities from application-level libraries and allow developers to focus on differentiating business logic.
https://mccricardo.com
@mccricardo
Service Mesh
Service proxy
A service proxy is a proxy on which an application service relies for additional capabilities. The service calls through the service proxy any time it needs to communicate with the outside world (i.e., over the network). The proxy acts as an intermediary or interceptor that can add capabilities like automatic retries, timeouts, circuit breaker, service discovery, security, and more.
Sidecar
A service that is attached to a parent application and provides supporting features for the application. The sidecar also shares the same lifecycle as the parent application, being created and retired alongside the parent. The sidecar pattern is sometimes referred to as the sidekick pattern and is a decomposition pattern.
https://mccricardo.com
@mccricardo
Service Mesh
Image source: https://bit.ly/2HczDpq
https://mccricardo.com
@mccricardo
Istio
Istio provides behavioral insights and operational control over the service mesh as a whole, offering a complete solution to satisfy the diverse requirements of microservice applications.
Istio makes it easy to create a network of deployed services with load balancing, service-to-service authentication, monitoring, and more, with few or no code changes in service code. We add Istio support to services by deploying a special sidecar proxy throughout our environment that intercepts all network communication between microservices, then configure and manage Istio using its control plane functionality.
Istio is designed for extensibility and meets diverse deployment needs.
https://mccricardo.com
@mccricardo
Istio Architecture
Image source: https://bit.ly/3efLlhI
https://mccricardo.com
@mccricardo
Envoy
High-performance proxy developed in C++ to mediate all inbound and outbound traffic for all services in the service mesh.
It’s deployed as a sidecar to the relevant service in the same Kubernetes pod. This deployment allows Istio to extract a wealth of signals about traffic behavior as attributes. Istio can, in turn, use these attributes to enforce policy decisions, and send them to monitoring systems to provide information about the behavior of the entire mesh.
The sidecar proxy model also allows us to add Istio capabilities to an existing deployment with no need to rearchitect or rewrite code.
https://mccricardo.com
@mccricardo
Istiod
Istio control plane.
Istiod provides service discovery, configuration and certificate management.
Istiod converts high level routing rules that control traffic behavior into Envoy-specific configurations, and propagates them to the sidecars at runtime.
https://mccricardo.com
@mccricardo
Traffic Management
Istio has support for traffic rules that allow us to easily control the flow of traffic and API requests between services.
With these type of features there are some traffic-control patterns that can be taken advantage like, canary deployments, dark launches or A/B tests.
Big internet companies like Netflix, Amazon, or Facebook use these patterns frequently.
Concepts: virtual services, destination rules, gateways, service Entries, and network resilience and fault injection.
https://mccricardo.com
@mccricardo
Traffic Management: Virtual Service
https://mccricardo.com
@mccricardo
Traffic Management: Virtual Service
https://mccricardo.com
@mccricardo
Traffic Management: Destination Rule
https://mccricardo.com
@mccricardo
Traffic Management: Gateway
https://mccricardo.com
@mccricardo
Traffic Management: Service Entry
https://mccricardo.com
@mccricardo
Traffic Management: Network Resilience
https://mccricardo.com
@mccricardo
Traffic Management: Fault Injection
https://mccricardo.com
@mccricardo
Security
Image source: https://bit.ly/3nPo0GO
https://mccricardo.com
@mccricardo
Security: Architecture
Image source: https://bit.ly/3nPo0GO
https://mccricardo.com
@mccricardo
Security: Authentication
Istio provides two types of authentication:
https://mccricardo.com
@mccricardo
Security: Peer Authentication
https://mccricardo.com
@mccricardo
Security: Request Authentication
https://mccricardo.com
@mccricardo
Security: Authorization
Image source: https://bit.ly/3xKhd5I
https://mccricardo.com
@mccricardo
Security: Authorization Policies
https://mccricardo.com
@mccricardo
Security: Authorization Policies
https://mccricardo.com
@mccricardo
Security: Authorization Policies
https://mccricardo.com
@mccricardo
Observability
Istio generates detailed telemetry for all service communications within a mesh.
It provides observability of service behavior, empowering operators to troubleshoot, maintain, and optimize their applications – without imposing any additional burdens on service developers.
Operators gain a deeper understanding of how services are interacting, both with other services and with the Istio components themselves.
https://mccricardo.com
@mccricardo
Observability: Metrics
Types of metrics:
https://mccricardo.com
@mccricardo
Observability: Distributed traces
Image source: https://bit.ly/3efAd4c
https://mccricardo.com
@mccricardo
Observability: Logs
https://mccricardo.com
@mccricardo
And much more...
https://mccricardo.com
@mccricardo
Thank you!
https://mccricardo.com
@mccricardo