DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Building Multi-Rail Payment Failover to Stop Latency Spikes and Double Debits
  • GET, POST, PUT, DELETE: Choosing HTTP Verbs in a Real .NET Core Web API, Not Just by the Textbook
  • Delegated Transport, Forked Authorization: Where Chat and AI-Agent Integrations Actually Break
  • A Non-Expiring AKS Deployment Token Could Read Secrets Across Three Namespaces

Trending

  • Should Developers Switch From SQLite to DuckDB?
  • How to Build a Scalable SaaS Product Architecture
  • Diagnosing Test Failures at Scale: Correlating Execution Evidence Across Ephemeral Runners
  • After the AI Commit: What Eight Retrospectives Taught Me About Working With Coding Agents

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Data Engineering
  3. Databases
  4. Istio's Networking API Explained [Video]

Istio's Networking API Explained [Video]

Istio service mesh's version 1.0 comes with a networking API. Learn what it can do and how it's components work together.

By 
Sebastian Daschner
·
Sep. 11, 18 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
5.6K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

Istio version 1.0 comes with a networking API that comprises a lot of features and covers a variety of scenarios. The networking API has evolved in the last couple of months and might not be self-explanatory, right away. What are the concepts and building blocks of this API, and how do we use the individual Istio resource types in order to route traffic through our service mesh?

Although the documentation provides a huge amount of helpful information, I wanted to describe and explain the traffic routing in my own words. I had to struggle quite a bit to grasp what the concepts and motivations are, and especially how to apply the individual building blocks.

The following video aims to explain what the concepts of Istio’s networking (v3alpha) API are, and how the building blocks are typically applied. It shows a visual model of the individual components in a service mesh that hopefully helps you in understanding and using Istio.


When to Use Which

Virtual services: To route traffic for a service that is part of the mesh to a specific destination, or subsets thereof, and/or to annotate HTTP (default) routes with certain behavior, such as timeouts.

Destination rules: To set policies on routed traffic, such as TLS settings, outlier detection, or load balancer settings, and/or to define subsets of services that are part of the mesh.

Service entries: To add additional services to Istio’s internal service registry, which is required to route traffic to external services. The added services can be enhanced with virtual services and destination rules.

Gateways (ingress): To route ingress traffic into the service mesh. The gateway needs to be bound to a virtual service which defines where the ingress traffic will be routed to.

Gateways (egress): To define a single point of exit where all egress traffic that leaves the mesh can be routed through. May be required for scenarios where only particular nodes can or should access external networks.

Insights & "Gotchas"

A few of my own insights that you might want to take into account once you start using Istio’s networking features. Some of them sound obvious but might contain a “gotcha” effect.

  • Virtual services, as well as destination rules, don’t have to match platform (Kubernetes) services 1:1.
  • HTTP and HTTPS/TLS is tread differently, especially in regards to routing rules and other “enhancements,” mostly due to the encrypted nature of the traffic. E.g.
    • HTTPS traffic needs to be routed via TLS rules (using port & SNI), not HTTP rules.
    • Resiliency features are only available for HTTP rules.
    • Monitoring also displays either unencrypted HTTP traffic or just TCP, respectively. The latter naturally contains less information.
  • To make use of all routing features, it makes sense to use unencrypted HTTP inside the service mesh.
    • Istio’s optional mTLS still ensures that mesh-internal traffic is encrypted without requiring application-level HTTPS/TLS.
    • Egress traffic can be encrypted via TLS once it leaves the mesh (see TLS origination).
  • No external traffic is allowed to (undefined) services outside the mesh per default. Service entries are required.
  • Ingress or egress gateway can be responsible for multiple platform (Kubernetes) services but needs to be bound to a single virtual service definition.
  • Multiple ingress gateways can be deployed that use the same port number with different hostnames if the port name (label) differs.
  • It’s possible to control or “enhance” egress traffic via both virtual services or destination rules that are defined for the external hostnames.
  • Traffic to hosts specified in service entries can be re-routed to internal services.
  • External service entries are monitored as individual services, as long as the entry isn’t redirected to another, internal service.
  • Istio doesn’t perform DNS resolution, however, proxies will route traffic according to hostnames.
    • Istio proxies regard hostnames as well as SNI names and can re-route traffic to internal or external services.
    • It might make sense to define external services via platform (Kubernetes) external services, to resolve external service names via DNS. Especially TCP hostnames are typically resolved by the application.

I hope this clarifies Istio’s networking features a bit more. I’d be happy to receive your feedback!

API

Published at DZone with permission of Sebastian Daschner. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Building Multi-Rail Payment Failover to Stop Latency Spikes and Double Debits
  • GET, POST, PUT, DELETE: Choosing HTTP Verbs in a Real .NET Core Web API, Not Just by the Textbook
  • Delegated Transport, Forked Authorization: Where Chat and AI-Agent Integrations Actually Break
  • A Non-Expiring AKS Deployment Token Could Read Secrets Across Three Namespaces

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook