SlideShare a Scribd company logo
Building a Service Mesh with NGINX Owen Garrett.pptx
Building a Service Mesh
with NGINX
Owen Garrett, Faisal Memon
Products & Engineering, NGINX
Operating a distributed application is hard
Static, Predictable Monolith: Dynamic, Distributed App:
Fast, reliable function calls
Local debugging
Local profiling
Calendared, big-bang upgrades
‘Integration hell’ contained in dev
Slow, unreliable API calls
Distributed fault finding
Distributed tracing
In-place dynamic updates
‘Continuous integration’ live in prod
More things can go wrong, it’s harder to find the faults, everything happens live
FrontEnd
RecommendEng
InventoryDB
ImageRender
AdminConnector
UserState
PricingEng
API-fe
N
• Security
• Instrumentation
• Tracing
• Traffic Control
Precursors to Service Mesh
1
NGINX per-Pod Proxy
Use NGINX Per-Pod Proxy:
• To intercept traffic to a single pod
• Implement access control, metrics and
tracing, web app firewall for that
service
Complexity: Simple
• Single point of configuration, simple
• Fully integrated into pod – easy build,
test and deployment
Each Pod in Service B has a
dedicated proxy.
We rely on K8s (kubeproxy) to
load-balance traffic to Service B
B
A kubeproxy
What about egress traffic?
• Why might this be a problem?
1. Cannot automatically perform mTLS. Need to rely on application to make
TLS requests, or rely on overlay network and K8s Network Policies for
encryption and authorization
2. Metrics and traces are generated on server-side, not client-side, so do not
measure latency effect of K8s network
No control of egress traffic, exiting pod Full control of ingress traffic, entering pod
Simple Mesh
Use NGINX Simple Mesh:
• When the application only needs to talk
to a small, well-known set of external
services
Complexity: Not very simple!
• Need to know all egress targets in
advance
• Fully integrated into pod – easy build,
test and deployment
Ingress Traffic – exactly as
the per-Pod proxy
configuration.
Egress Traffic – application
talks to local NGINX IP
address, achieved by e.g. DNS
manipulation or IP tables.
NGINX needs a virtual server
for each egress service.
Service Mesh Use a Service Mesh (Istio, Linkerd):
• When you don’t know the topology of the
application
• When you want an off-the-shelf solution
• When the specific service mesh capabilities
match your requirements
Complexity: Medium-High
Service Mesh technology is not fully mature, so
operating, troubleshooting and debugging it
requires considerable technical expertise.
Control Plane
e.g. Istio’s Pilot/Mixer/Citadel
Sidecar Proxy
Service A
Sidecar Proxy
Service B
Sidecar Proxy
Service C
Sidecar Proxy
Service D
NGINX Service Mesh
2
Why is NGINX building a Service
Mesh?
What are the attributes of modern
applications?
• Hybrid (microservice and legacy)
• Web and API
• Multiple technology stacks
What is needed to deliver these
applications?
• Load Balancer / App Delivery
• Specialized API management
• Internal Service Mesh
NGINX Features and Principles
Initial Features
• Mutual TLS
• Instrumentation
• Tracing
• Traffic Control
Core Principles
• Hybrid Applications first
• Lightweight and Performant
• Architectural Simplicity
• Use CNCF etc. projects
whenever possible
What is NGINX building?
Data Plane
East/West traffic
Control
Plane
Management
Plane
Infrastructure
Kubernetes VMware AWS Bare Metal
SVC SVC
SVC
SVC
SVC SVC
Conf Db
Kubernetes Service Registry Inventory VMware, AWS… Inventory
What is NGINX building?
Data Plane
East/West traffic
Control
Plane
Management
Plane
Infrastructure
Kubernetes VMware AWS Bare Metal
SVC SVC
SVC
SVC
SVC SVC
Conf Db
Kubernetes Service Registry Inventory VMware, AWS… Inventory
What is NGINX building?
Data Plane
East/West traffic
Control
Plane
Management
Plane
Infrastructure
Kubernetes VMware AWS Bare Metal
NGINX Service Mesh control plane
SVC SVC
SVC
SVC
SVC SVC
Topology Policies
Conf Db
CLI / API
$>_
Kubernetes Service Registry Inventory VMware, AWS… Inventory
What is NGINX building?
Data Plane
East/West traffic
Control
Plane
Management
Plane
Infrastructure
Kubernetes VMware AWS Bare Metal
NGINX Service Mesh control plane
SVC SVC
SVC
SVC
SVC SVC
Topology Policies
Conf Db
CLI / API
$>_
Kubernetes Service Registry Inventory VMware, AWS… Inventory
SPIRE
What is NGINX building?
Data Plane
East/West traffic
Control
Plane
Management
Plane
Infrastructure
Kubernetes VMware AWS Bare Metal
NGINX Service Mesh control plane
SVC SVC
SVC
SVC
SVC SVC
Topology Policies
Conf Db
CLI / API
$>_
Kubernetes Service Registry Inventory VMware, AWS… Inventory
SPIRE Grafana OpenTracing
What’s in the dataplane?
• NGINX
◦ OpenTracing module (3rd party, open source)
◦ Prometheus module (open sourced)
◦ SPIFFE support (to-be-open sourced)
◦ NGINX Plus
◦ Sophisticated configuration for fully-hitless reloads
SVC
Walkthrough
3
19
Concluding Points
4
20
Find the balance
Cost
to
operate
Complexity, Interdependencies, Speed of Change
Single simple app Many complex, interdependent apps
Using native Kubernetes
and other services
Using
service mesh
As service meshes mature,
their cost will go down
Solve today’s problem, today
• Identify the problem
◦ Security? Visualization? Tracing? Advanced traffic control?
• Identify the solution with the minimum technology to solve
the problem
◦ Vanilla Kubernetes with Ingress Controller
◦ Per-Service or per-Pod load balancer
◦ “Full-fat” Service Mesh
Owen Garrett, Faisal Memon
owen@nginx.com / faisal@nginx.com
Thank you

More Related Content

PDF
Relevez les défis Kubernetes avec NGINX
PDF
Introducing ONAP for OpenStack St Louis Meetup
PDF
Nils Rhode - Does it always have to be k8s - TeC Day 2019
PDF
Securing Your Apps & APIs in the Cloud
PDF
VMworld 2013: Moving Beyond Infrastructure: Meeting Demands on App Lifecycle ...
PDF
Banv meetup-contrail
PDF
TechWiseTV Workshop: Enterprise NFV
PDF
Data Plane Matters! A Deep Dive and Demo on NGINX Service Mesh
Relevez les défis Kubernetes avec NGINX
Introducing ONAP for OpenStack St Louis Meetup
Nils Rhode - Does it always have to be k8s - TeC Day 2019
Securing Your Apps & APIs in the Cloud
VMworld 2013: Moving Beyond Infrastructure: Meeting Demands on App Lifecycle ...
Banv meetup-contrail
TechWiseTV Workshop: Enterprise NFV
Data Plane Matters! A Deep Dive and Demo on NGINX Service Mesh

Similar to Building a Service Mesh with NGINX Owen Garrett.pptx (20)

PDF
Patterns and Pains of Migrating Legacy Applications to Kubernetes
PDF
Patterns and Pains of Migrating Legacy Applications to Kubernetes
PPTX
Designing microservices
PDF
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with K...
PDF
Deep Dive: Automating the Application and Security Pipeline with NGINX and An...
PDF
[OpenStack Day in Korea 2015] Track 2-3 - 오픈스택 클라우드에 최적화된 네트워크 가상화 '누아지(Nuage)'
PPTX
Accélérez vos déploiements applicatifs avec NGINX Controller
PDF
Openshift serverless Solution
PDF
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
PDF
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
PDF
Pivotal Container Service (PKS) at SF Cloud Foundry Meetup
PDF
Mini-Track: Lessons from Public Cloud
PDF
Embracing SDN in the Next Gen Network
PDF
Reference architectures shows a microservices deployed to Kubernetes
PDF
Netflix Massively Scalable, Highly Available, Immutable Infrastructure
PDF
Platform as a Runtime - PaaR QCON 2024 - Final
PDF
Cisco Connect 2018 Singapore - Easing the Transition
PDF
Get the Most Out of Kubernetes with NGINX
PDF
Resilient Microservices with Spring Cloud
PPTX
Netflix Cloud Architecture and Open Source
Patterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to Kubernetes
Designing microservices
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with K...
Deep Dive: Automating the Application and Security Pipeline with NGINX and An...
[OpenStack Day in Korea 2015] Track 2-3 - 오픈스택 클라우드에 최적화된 네트워크 가상화 '누아지(Nuage)'
Accélérez vos déploiements applicatifs avec NGINX Controller
Openshift serverless Solution
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Pivotal Container Service (PKS) at SF Cloud Foundry Meetup
Mini-Track: Lessons from Public Cloud
Embracing SDN in the Next Gen Network
Reference architectures shows a microservices deployed to Kubernetes
Netflix Massively Scalable, Highly Available, Immutable Infrastructure
Platform as a Runtime - PaaR QCON 2024 - Final
Cisco Connect 2018 Singapore - Easing the Transition
Get the Most Out of Kubernetes with NGINX
Resilient Microservices with Spring Cloud
Netflix Cloud Architecture and Open Source
Ad

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Approach and Philosophy of On baking technology
PPTX
Cloud computing and distributed systems.
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
A Presentation on Artificial Intelligence
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Machine learning based COVID-19 study performance prediction
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Understanding_Digital_Forensics_Presentation.pptx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Mobile App Security Testing_ A Comprehensive Guide.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Dropbox Q2 2025 Financial Results & Investor Presentation
20250228 LYD VKU AI Blended-Learning.pptx
Approach and Philosophy of On baking technology
Cloud computing and distributed systems.
Chapter 3 Spatial Domain Image Processing.pdf
Encapsulation theory and applications.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Big Data Technologies - Introduction.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
A Presentation on Artificial Intelligence
Reach Out and Touch Someone: Haptics and Empathic Computing
Machine learning based COVID-19 study performance prediction
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Ad

Building a Service Mesh with NGINX Owen Garrett.pptx

  • 2. Building a Service Mesh with NGINX Owen Garrett, Faisal Memon Products & Engineering, NGINX
  • 3. Operating a distributed application is hard Static, Predictable Monolith: Dynamic, Distributed App: Fast, reliable function calls Local debugging Local profiling Calendared, big-bang upgrades ‘Integration hell’ contained in dev Slow, unreliable API calls Distributed fault finding Distributed tracing In-place dynamic updates ‘Continuous integration’ live in prod More things can go wrong, it’s harder to find the faults, everything happens live
  • 6. NGINX per-Pod Proxy Use NGINX Per-Pod Proxy: • To intercept traffic to a single pod • Implement access control, metrics and tracing, web app firewall for that service Complexity: Simple • Single point of configuration, simple • Fully integrated into pod – easy build, test and deployment Each Pod in Service B has a dedicated proxy. We rely on K8s (kubeproxy) to load-balance traffic to Service B B A kubeproxy
  • 7. What about egress traffic? • Why might this be a problem? 1. Cannot automatically perform mTLS. Need to rely on application to make TLS requests, or rely on overlay network and K8s Network Policies for encryption and authorization 2. Metrics and traces are generated on server-side, not client-side, so do not measure latency effect of K8s network No control of egress traffic, exiting pod Full control of ingress traffic, entering pod
  • 8. Simple Mesh Use NGINX Simple Mesh: • When the application only needs to talk to a small, well-known set of external services Complexity: Not very simple! • Need to know all egress targets in advance • Fully integrated into pod – easy build, test and deployment Ingress Traffic – exactly as the per-Pod proxy configuration. Egress Traffic – application talks to local NGINX IP address, achieved by e.g. DNS manipulation or IP tables. NGINX needs a virtual server for each egress service.
  • 9. Service Mesh Use a Service Mesh (Istio, Linkerd): • When you don’t know the topology of the application • When you want an off-the-shelf solution • When the specific service mesh capabilities match your requirements Complexity: Medium-High Service Mesh technology is not fully mature, so operating, troubleshooting and debugging it requires considerable technical expertise. Control Plane e.g. Istio’s Pilot/Mixer/Citadel Sidecar Proxy Service A Sidecar Proxy Service B Sidecar Proxy Service C Sidecar Proxy Service D
  • 11. Why is NGINX building a Service Mesh? What are the attributes of modern applications? • Hybrid (microservice and legacy) • Web and API • Multiple technology stacks What is needed to deliver these applications? • Load Balancer / App Delivery • Specialized API management • Internal Service Mesh
  • 12. NGINX Features and Principles Initial Features • Mutual TLS • Instrumentation • Tracing • Traffic Control Core Principles • Hybrid Applications first • Lightweight and Performant • Architectural Simplicity • Use CNCF etc. projects whenever possible
  • 13. What is NGINX building? Data Plane East/West traffic Control Plane Management Plane Infrastructure Kubernetes VMware AWS Bare Metal SVC SVC SVC SVC SVC SVC Conf Db Kubernetes Service Registry Inventory VMware, AWS… Inventory
  • 14. What is NGINX building? Data Plane East/West traffic Control Plane Management Plane Infrastructure Kubernetes VMware AWS Bare Metal SVC SVC SVC SVC SVC SVC Conf Db Kubernetes Service Registry Inventory VMware, AWS… Inventory
  • 15. What is NGINX building? Data Plane East/West traffic Control Plane Management Plane Infrastructure Kubernetes VMware AWS Bare Metal NGINX Service Mesh control plane SVC SVC SVC SVC SVC SVC Topology Policies Conf Db CLI / API $>_ Kubernetes Service Registry Inventory VMware, AWS… Inventory
  • 16. What is NGINX building? Data Plane East/West traffic Control Plane Management Plane Infrastructure Kubernetes VMware AWS Bare Metal NGINX Service Mesh control plane SVC SVC SVC SVC SVC SVC Topology Policies Conf Db CLI / API $>_ Kubernetes Service Registry Inventory VMware, AWS… Inventory SPIRE
  • 17. What is NGINX building? Data Plane East/West traffic Control Plane Management Plane Infrastructure Kubernetes VMware AWS Bare Metal NGINX Service Mesh control plane SVC SVC SVC SVC SVC SVC Topology Policies Conf Db CLI / API $>_ Kubernetes Service Registry Inventory VMware, AWS… Inventory SPIRE Grafana OpenTracing
  • 18. What’s in the dataplane? • NGINX ◦ OpenTracing module (3rd party, open source) ◦ Prometheus module (open sourced) ◦ SPIFFE support (to-be-open sourced) ◦ NGINX Plus ◦ Sophisticated configuration for fully-hitless reloads SVC
  • 21. Find the balance Cost to operate Complexity, Interdependencies, Speed of Change Single simple app Many complex, interdependent apps Using native Kubernetes and other services Using service mesh As service meshes mature, their cost will go down
  • 22. Solve today’s problem, today • Identify the problem ◦ Security? Visualization? Tracing? Advanced traffic control? • Identify the solution with the minimum technology to solve the problem ◦ Vanilla Kubernetes with Ingress Controller ◦ Per-Service or per-Pod load balancer ◦ “Full-fat” Service Mesh
  • 23. Owen Garrett, Faisal Memon owen@nginx.com / faisal@nginx.com Thank you

Editor's Notes

  • #7: Traffic to pod is terminated by NGINX NGINX forwards traffic to other microservices in Pod Apply policies to traffic Very common when Application does not handle HTTP or HTTPS well, e.g. php-fpm Candidate Implementation: Embed NGINX instance in each pod and expose NGINX port. Simple NGINX virtual server manages traffic and proxy_pass to local app instance Does not intercept egress traffic, from pod to outside Attributes Embeds additional (lightweight 2Mb) process in each pod Very simple to configure and test. Configuration generated at pod build time Manages traffic to pod. Can’t implement advanced load balancing, retries or blue-green; can’t process egress traffic This solution is typically developed by the App team and is ‘invisible’ to operations.
  • #8: In additional, load advanced load balancing done by per-Service proxy
  • #9: Not appropriate for a general application where you do not know the topology, as it’s too difficult to manage the NGINX configuration Some NGINX users have created a sidecar proxy using the simple mesh approach. This requires manual configuration for the app. Provided as “Fabric Model” Issues Tooling to deploy is complex No control plane No easy, automated update of credentials No live management of policies or routing Usability is a challenge