top of page

IStio & Service Discovery

  • Writer: Anand Nerurkar
    Anand Nerurkar
  • Sep 6
  • 2 min read

.

šŸŽÆ First, the Context: Service Discovery Problem

In a microservices architecture, services are dynamic — pods get created/destroyed, IPs change.We need:

  • A way to register servicesĀ (so they are discoverable).

  • A way for clients to discover them reliablyĀ (even if pods move).

  • A way to secure & observeĀ that communication.

Traditionally, we’d use Eureka, Consul, or API Gateway for this.With Istio service mesh, this is handled differently.

āœ… Solution with Istio

1ļøāƒ£ Service Registration

Istio relies on Kubernetes service registryĀ (or VM registration if hybrid).Here’s how it works in production:

  • Every microservice is deployed as a Kubernetes ServiceĀ + Deployment (or StatefulSet).

    apiVersion: v1 kind: Service metadata: name: loan-service namespace: lending spec: selector: app: loan-service ports: - port: 8080 targetPort: 8080

  • When this Service is created, Kubernetes automatically registers it in the kube-apiserverĀ as a service endpoint.

  • Istio’s PilotĀ component watches the Kubernetes API and updates the service registryĀ inside Istio’s control plane (xDS).This registry is then pushed to all Envoy sidecars.

āœ… So, you don’t manually register services with Istio.You just deploy them as K8s Services — Istio auto-discovers them.

2ļøāƒ£ Service Discovery (how other services find it)

When another microservice (say, kyc-service) wants to call loan-service:

  • It resolves loan-service.lending.svc.cluster.localĀ using Kubernetes DNS.

  • The request is intercepted by the Envoy sidecarĀ injected by Istio.

  • Envoy consults its config (pushed by Istio Pilot) to know:

    • Service endpoints (load-balanced).

    • Policies (mTLS, retries, timeouts).

    • Routing rules (canary, traffic split).

Envoy then:

  • Establishes mTLS connectionĀ (service identity via Istio Citadel certs).

  • Routes to the correct pod (load balanced).

  • Collects telemetry (metrics, tracing).

3ļøāƒ£ Service-to-Service Security (mTLS)

  • Istio issues SPIFFE identitiesĀ to each service (spiffe://cluster.local/ns/lending/sa/loan-sa).

  • Envoy uses these to encrypt and authenticate traffic → no need to handle TLS inside microservice code.

4ļøāƒ£ Advanced Discovery & Routing (Istio Features)

You can create Istio VirtualServicesĀ & DestinationRulesĀ for:

  • Canary deployments (route 10% to v2, 90% to v1).

  • Failover (if region A is down, route to region B).

  • Timeouts/retries/circuit breakers.

  • Fault injection for chaos testing.

Example VirtualServiceĀ for loan-service:

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: loan-service
spec:
  hosts:
  - loan-service.lending.svc.cluster.local
  http:
  - route:
    - destination:
        host: loan-service.lending.svc.cluster.local
        subset: v1
      weight: 90
    - destination:
        host: loan-service.lending.svc.cluster.local
        subset: v2
      weight: 10

šŸ¦ BFSI Production Considerations

  • Zero-trust network:Ā Istio + mTLS ensures even internal service calls are encrypted — critical for SEBI/RBI compliance.

  • Audit:Ā Envoy sidecars produce logs for every request → integrate with ELK/Prometheus for compliance evidence.

  • Service discovery across regions:Ā If multi-cluster, use Istio multi-clusterĀ or service mesh federationĀ (shared root CA).

šŸ’” Interview-ready Answer

ā€œWith Istio, we don’t manually register services — registration is automatic via Kubernetes service registry. Istio Pilot keeps a dynamic service registry and pushes it to Envoy sidecars.For discovery, services simply call each other by DNS name (<service>.<namespace>.svc.cluster.local), Envoy sidecar resolves endpoints, applies load balancing, security (mTLS), and routing policies.This gives us zero-trust communication, observability, retries, and advanced traffic management out-of-the-box — which is critical in BFSI workloads for compliance and resilience.ā€

Ā 
Ā 
Ā 

Recent Posts

See All
How to replan- No outcome after 6 month

⭐ ā€œA transformation program is running for 6 months. Business says it is not delivering the value they expected. What will you do?ā€ ā€œWhen business says a 6-month transformation isn’t delivering value,

Ā 
Ā 
Ā 
EA Strategy in case of Merger

⭐ EA Strategy in Case of a Merger (M&A) My EA strategy for a merger focuses on four pillars: discover, decide, integrate, and optimize.The goal is business continuity + synergy + tech consolidation. āœ…

Ā 
Ā 
Ā 

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
  • Facebook
  • Twitter
  • LinkedIn

©2024 by AeeroTech. Proudly created with Wix.com

bottom of page