Introduction to Istio. What is Istio? It is just one example…
By: Ishan Liyanage
Tags: Introduction, Cluster Management, Kubernetes, Istio, Service Mesh

What is Istio?

It is just one example of what has become known as a service mesh. In other words, Istio is a service mesh :)

What is a service mesh?

A Service Mesh is a n extra layer of software you deploy alongside your cluster e.g Kubernetes or in short K8s.

Lets think about a standard micro service architecture that you are running on Kubernetes. As you know we are going to have a many Kubernetes pods and each pod typically (not necessarily) contains a container. As you know we can have multiple containers inside a pod.

Now these containers are all network together as we can use service discovery mechanism inside Kubernetes to make network calls from any container to any other container.

container make network calls from any container to any other container

While Kubernetes is good at handling and managing the pods, For example if we do not need any pod, we can use kubectl command or any other mean to remove it from the cluster. However when we do so, we do not have visibility at all or the interconnections between pods.

This is where a service mesh can help.

In other words, we can think of in a way that network traffic that’s running through our cluster is going to be routed through this service mesh.

This looks quite inefficient. The point is the service mesh can implement some logic even before the call is routed to microservice or after the call well-received (HTTP 200) by the microservice.

What is this mesh logic?

Well it can be anything but for example it can be used to gather metrics. As you are familiar with Kubernetes, you know that we can use Prometheus and grafana to gather metrics about the overall health of the cluster. This is somewhat same thing but here we gather metrics about individual network requests like how much time it took to call or the response code etc and save them in database. So over time, we can inspect the result. Things like we can find out if particular service is returning too many errors.

There are many other features that we can embark on, but above is one just example. Something like tracing which would allow us to trace chain of calls and find exactly what happened there (distributed tracing). Also traffic management, security are few other things.

How Istio implements the Service Mesh?

Istio will inject its own container into the pods in the cluster which is know as a proxy. This is where we can inject mesh logic in to that proxy. Now lets take the previous example where one microservice will call the other.

Proxy container will intercept calls and gather metrics etc. based on the mesh logic

Above is very simple explanation how it works. We have Istiod (or Istio Daemon) underneath. Each proxy is aware about it and going to call these daemon pods in order to implement their logic.

daemon pods are there inside Istio system to implement different mesh logic

Important terms in Istio

Data Plane -All of the proxies that we are running in our architecture. In other words proxies that Istio has injected into our system.

Control Plane -All of those pods that are running inside Istio system or the pods are really implementing Istio’s functionality.

This is very high level explanation and I am planning to write few more articles with specific implementations and features in Istio. Best thing is we have to play with it :). Lets get our hands dirty.