Interview › Istio & Service Mesh
What is SNI-based routing, and how does the ingress gateway use it?
Istio & Service Mesh · Advanced level
Answer
SNI-based routing uses the Server Name Indication value in the TLS ClientHello to route encrypted traffic before HTTP is decrypted. An Istio ingress gateway can match hosts in TLS PASSTHROUGH mode and send traffic to the correct backend based on SNI.
Technical explanation
SNI routing is useful when the gateway should not terminate TLS, such as when backend services own their certificates.
Because the gateway does not decrypt traffic in PASSTHROUGH mode, it cannot route based on HTTP path or headers.
For HTTP path routing, terminate TLS at the gateway or use another design that exposes HTTP metadata to the proxy.
Hands-on example
PASSTHROUGH sketch:
Gateway server:
port: 443 HTTPS
tls:
mode: PASSTHROUGH
hosts: [secure.example.com]VirtualService tls match:
- sniHosts: [secure.example.com]
route:
- destination:
host: secure-backend
port:
number: 443Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Istio & Service Mesh interview questions
- How would you implement rate limiting in Istio (local and global)?
- How do you integrate an external authorization service with Istio?
- How do you decide whether a service should be in the mesh or not?
- How does Istio interact with NetworkPolicies — do you need both?
- What is the difference between L4 and L7 policy enforcement in the mesh?
- How do you observe and reduce the error rate of a specific service via the mesh?
- How do you test an AuthorizationPolicy before enforcing it (dry-run)?
- How do you handle gradual migration of services into mTLS STRICT mode?