It allows you to use kubernetes manifest to centrally control policies such as: - Canary load balancing (pushing a certain percentage of the traffic to a canary release) - TLS Mutual Authentication - Retries with exponential backoff - Circuit breakers - Instrumenting your traffic for distributed tracing (e.g. with Jaeger) - Adding your own custom HTTP headers
All of that is transparent to your microservice. This comes instead of having to repeat the service mesh logic that does everything above in each microservice. From the microservice 's perspective they're just sending simple traffic without implementing retries, circuit breakers, HTTPS or instrumentation. Istio takes care of all the rest using sidecars and and ingress controllers.
- they're moving "legacy" infrastructure off EC2 or similar onto Kubernetes and their service discovery stack is already in place. They end up bypassing cluster IPs and dealing directly with pod IPs. - they're starting with Istio or something similar from the get go because the native service discovery is hard to grok and leaves out a lot of the nice things that Istio gets you for free (once you've set it up)
There's lots of overlap, but I've not heard of anyone making a strong argument for the native service discovery.
Native service discovery works a lot better than using pod IPs, which are intended to be transient.
A standard ClusterIp service includes DNS records by default and it's good enough for simple use cases.
I've seen plenty of those from smaller startups.
If you need pod-direct accessibility, the StatefulSet headless service feature will give each pod a unique DNS name and auto-update it when the pod IPs change.
That said, legacy migration into Kubernetes was WAY Oversold by some.
Why the heck are they even using Kubernetes then? Just deploy a bunch of docker containers with the autorestart flag.
This is terrible design.
It does this by using little out-of-process agents (Envoy) to sit next to your application as a sidecar. All application network flows go through the sidecars (which are localhost).
Istio is the config engine for all these sidecars, and for the overall gateway to your clusters. They call this a service mesh.
Istio in theory has little to do with Kubernetes or Mesos, except that it intitially assumed everyone will be running apps in Kubernetes (because Istio is from google). But It is designed to be independent of k8s as it can run with Mesos or Cloud Foundry.
Some example use cases:
1. Configuring (mutual) TLS for apps so each app doesn’t have to. This is huge, as keypair handling is a major point of risk and annoyance.
2. Auto-renewing/installing (mutual) TLS certificates across an entire set of apps
3. Intercepting and re-routing network flows for A/B testing , traffic shedding, or failure tolerance (circuit breaking)
4. Global load balancing with more ability to tweak the algorithm (beyond just DNS)
5. Tracing / visibility of application network flows across a WAN for debugging
Is it necessary? No. Is it useful? Yeah, it can be.
What Istio does is replace all that with several components. The foundation is the Envoy proxy which runs as a sidecar to all of your pods and handles all the network traffic, providing much better performance, more load-balancing algorithms, advanced routing, retries, rate limiting, observability and tracing (at protocol level), grpc/http2 in both directions, TLS management, traffic shadowing, and custom filters that you can use to do whatever you want with the traffic.
There are also several "control plane" components which actually do the wiring and config management and work in the background. There are several alternatives in this space like Linkerd, Consul Connect, Kong, and even Nginx and Haproxy getting into it. Some are focused only on Kubernetes while others let you communicate across clusters and standalone VMs.
"Istio is the control plane and Envoy is the data plane"
"Ultimately, the goal of a control plane is to set policy that will eventually be enacted by the data plane."
With Istio - 1st pod takes 60% of traffic, second takes 30%, and last two take 5% each
With Istio - 1st pod takes users from /foo, second from /baz, third with user-agent forby and fourth with user agent kirby
Just some very simple examples. Istio has many more capabilities
In practice, Istio is pretty complex and not for the faint of heart. You can think of Istio and its cousins (Linkerd, Consul Connect, etc) as the spiritual successors of the original Netflix OSS stack and Finagle.
I'd highly recommend reading the docs if you haven't already to get a better overview.
0. https://github.com/nginxinc/nginmesh#important-project-notic...
I see that it hooks into micro/services communication, but why do we need that? isnt policies enforced by cni plugins? and can microservices communicate already with k8s and mesos default setups?
is istio an network abstraction layer for k8s and mesos? why would anyone want that, is there anybody who changes scheduling runtimes often?