Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 36 ยท Getting Started

What Are Istio and a Service Mesh?

Learn what a service mesh is, what Istio adds to Kubernetes, and when a mesh is worth its cost, with a runnable model of a proxy that adds retries.

When an application is split into many small services, the network becomes part of your program. Every call between services can be slow, fail, or reach the wrong place, and every team ends up writing the same retry, timeout, encryption and logging code in its own language. A service mesh moves that repeated work out of the applications and into the infrastructure.

Istio is the most widely used open-source service mesh. It runs on Kubernetes (and can reach virtual machines), puts a small proxy next to your workloads, and lets you control traffic, security and telemetry with configuration instead of code. This track teaches it from first install to production operation.

Istio cannot run on this site: it needs a Kubernetes cluster. Commands and YAML in this track are shown as read-only snippets, and I never invent the output of a command I cannot run. Where an idea can be demonstrated, the lesson gives a clearly labelled Python stand-in that you can run in the page. A stand-in teaches the idea; it is not Istio.

A mesh is a network layer for services

Traffic Routing, retries, timeouts.
Security mTLS and access rules.
Telemetry Metrics, logs, traces.

No changes to application code.

1 / 2

The problem in plain words

Imagine a shop made of three services: web calls catalog, and catalog calls inventory. Without a mesh, each team must decide:

  • How long to wait before giving up on a call.
  • Whether to retry, and how many times.
  • How to encrypt traffic and prove who is calling.
  • What to log so that a slow request can be traced.

If web is written in Node, catalog in Java and inventory in Go, you write and maintain that logic three times, and a bug fix needs three releases. A mesh handles it once, in the same way for all of them.

How a mesh works

In the classic Istio design, every pod gets a second container: a proxy called Envoy. Traffic into and out of your application container is redirected through it. The application still thinks it is talking directly to http://catalog; the proxy does the real work.

flowchart LR
    subgraph A["Pod: web"]
      WA["web app"] --> PA["Envoy proxy"]
    end
    subgraph B["Pod: catalog"]
      PB["Envoy proxy"] --> WB["catalog app"]
    end
    PA -- "mTLS, retries, metrics" --> PB
    I["istiod (control plane)"] -. "pushes config" .-> PA
    I -. "pushes config" .-> PB

The proxies form the data plane; istiod is the control plane that configures them.

The proxies carry the traffic (the data plane). A separate program, istiod, tells every proxy what to do (the control plane). You never configure proxies by hand: you create Kubernetes resources such as VirtualService or AuthorizationPolicy, and istiod translates them into proxy configuration.

What Istio gives you

  • Traffic management. Send 5% of requests to a new version, mirror traffic to a test copy, inject faults on purpose, add timeouts and retries. See Virtual Services and Destination Rules.
  • Security. Automatic mutual TLS between workloads, and policies like "only web may call catalog". See mTLS and Peer Authentication.
  • Observability. Golden-signal metrics, access logs and distributed traces for every service without touching code.
  • Policy at the edge. A gateway that accepts traffic from outside and applies the same rules.

Retries without touching the app

Here is a stand-in for the idea. The first block is an application that calls a flaky dependency and fails whenever the dependency does. The second wraps the call in a "proxy" that retries, the way a mesh would on your behalf.

Python Stand-in: a flaky call without a proxy

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Python Stand-in: the same call through a retrying proxy

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

In Istio the same policy is a few lines of YAML on a VirtualService; the application code is identical in both runs of a real mesh.

When is a mesh worth it?

A mesh is not free. It adds proxies that use CPU and memory, adds latency (usually a few milliseconds per hop), and adds new things to learn and operate. It pays off when you have many services, several languages, a need for encryption between services, or a platform team that wants consistent policy. For two services and one team, a library or plain Kubernetes may be enough.

Ask: "Which of traffic control, zero-trust security and uniform telemetry do I need across many services?" If the answer is none, wait.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the main idea of a service mesh?

    A mesh handles service-to-service networking in a layer next to the app, uniformly for every language.
  2. 2. Which part of Istio configures the proxies?

    istiod turns your Istio resources into proxy configuration and pushes it to every Envoy.
  3. 3. Which is a realistic cost of adopting a mesh?

    Proxies use CPU and memory, add a small delay per hop, and add operational surface.
  4. 4. In the stand-in, why did the second run succeed?

    The wrapper retried; the app code was unchanged, which is what a mesh does with real proxies.

Summary

  • A service mesh is a dedicated layer for service-to-service traffic, security and telemetry.
  • Istio uses Envoy proxies (data plane) configured by istiod (control plane).
  • You configure it with Kubernetes resources, not application code.
  • It adds cost: resources, latency, and operational complexity.
  • Python snippets in this track are stand-ins, labelled as such.

Next: Istio Architecture: istiod and Envoy