NGINX Microservices
Reference Architecture (MRA)
Ask Me Anything (AMA)
Part 6 – Service Mesh Models
Wednesday, November 1, 2017
2
MORE INFORMATION AT NGINX.COM
Who Are We?
Charles Pretzer
Technical Architect
Formerly:
- Software architecture consultant
- Engineering lead at Zinio, StyleHive,
others
Floyd Smith
Technical Marketing Writer
Formerly:
- Apple, Alta Vista, Google, and more
- Author of multiple books on technology
including web, marketing, usability
Job Titles
Analyst
Architect
CEO, CIO, CTO
Consultant
cool guy
Cloud Architect, Engineer
Developer
DevOps
Engineer
IT Lead, Manager
Security Architect
Systems Analyst
Tech Lead
Organization Types
Airlines
Computer technology
Consultancy
Ecommerce
Finance
Freelance
Government
Higher education
Mobile phones
Networking technology
Press
SaaS
Telecoms
Reasons for Attending
“Build ms platforms”
“Client proposals”
“Compare the three models
to our solution”
“Create API Gateway”
“Developing microservices”
“DevOps”
“Microservices strategies”
“Migrate from F5”
“Move from .NET”
“Move from Apache”
“Moving from monolith”
“Playing with
microservices”
Who Attends?
4
1. Introducing NGINX
2. Problems Solved by Using a Service Mesh Model for
Microservices
3. Service Mesh Models in the MRA
4. How the NGINX Kubernetes Ingress Controller works
with Istio, linkerd, and other service mesh models
5. NGINX Professional Services
Agenda
5
Introducing NGINX
6
About NGINX, Inc.
7
• NGINX Open Source project early 2000s
• Company founded in 2011
• NGINX Plus first released in 2013
• VC-backed by enterprise software industry leaders
• Offices in San Francisco, Sunnyvale, Cork, Cambridge, and Moscow
• 1,000+ commercial customers
• 100+ employees
8
50%of the top 100,000
busiest websites
Source: W3Techs Web Technology Survey
>
MORE INFORMATION AT NGINX.COM
9
Where NGINX Plus fits
10
Internet
Web Server
Serve content from disk
Application Gateway
FastCGI, uWSGI, Passenger…
Reverse Proxy
Caching, load balancing…
HTTP traffic
NGINX Plus works in all environments
11
Public/Private/Hybrid
Cloud
Bare Metal Containers
NGINX and Microservices
12
• Two-thirds of surveyed developers using or investigating microservices
• Microservices is #1 topic on our website
• Chris Richardson series, Introduction to Microservices
• Chris Stetson series, NGINX MRA**
• Three Models webinar
• MRA Training
• NGINX Professional Services – creators of the MRA
…and much more
** = backup for this presentation
The Role of a
Service Mesh
13
What is a service mesh?
A service mesh is a dedicated infrastructure layer for making service-to-
service communication safe, fast, and reliable. If you’re building a cloud
native application, you need a service mesh!
- buoyant.io
MORE INFORMATION AT
NGINX.COM
Proxy Model
• Focus on internet traffic
• A shock absorber for your app
• Dynamic connectivity
MORE INFORMATION AT
NGINX.COM
Proxy Model
• Inbound traffic is
managed through a
reverse proxy/load
balancer
• Services are left to
themselves to connect to
each other.
• Often through round-robin
DNS
MORE INFORMATION AT
NGINX.COM
Router Mesh
• Robust service discovery
• Advanced load balancing
• Circuit breaker pattern
MORE INFORMATION AT
NGINX.COM
Router Mesh
Model
• Inbound routing through
reverse proxy
• Centralized load
balancing through a
separate load balancing
service
• Deis Router works like
this
MORE INFORMATION AT
NGINX.COM
Circuit
Breakers
• Active health checks
• Retry
MORE INFORMATION AT
NGINX.COM
Fabric Model
• Robust service discovery
• Advanced load balancing
• Circuit breaker pattern
• Persistent SSL network
MORE INFORMATION AT
NGINX.COM
Inter-Process
Communication
• Routing is done at the
container level
• Services connect to each
other as needed
• NGINX Plus acts as the
forward and reverse
proxy for all requests
MORE INFORMATION AT
NGINX.COM
Kubernetes Load Balancing
• Implemented by Services as internal or external load
balancers
• Ingress and Ingress Controllers are more robust forms of
load balancing in Kubernetes
• The NGINX Ingress Controller provides all the load
balancing features NGINX within Kubernetes
• https://github.com/nginxinc/kubernetes-ingress
MORE INFORMATION AT
NGINX.COM
NGINX Ingress
Controller for
Kubernetes
- Open source
repository on github
MORE INFORMATION AT
NGINX.COM
Istio Load Balancing
• In order to discover services Istio assumes the presence
of a service registry
• NGINX has built the nginxmesh repository which
provides an implementation of a sidecar proxy for Istio
using NGINX
• https://github.com/nginmesh/nginmesh
MORE INFORMATION AT
NGINX.COM
nginmesh
for Istio
- Open source
repository on github
NGINX Professional Services
26
• Developers of the NGINX MRA
• Highlights: NGINX Plus Quick Start and
Microservices Architecture Strategy and
Consultation
• Find the Fabric Model on GitHub
• MRA Training
• Contact NGINX Sales to discuss
Q&A
27
Thank you
28
charles@nginx.com

MRA AMA Part 6: Service Mesh Models

  • 2.
    NGINX Microservices Reference Architecture(MRA) Ask Me Anything (AMA) Part 6 – Service Mesh Models Wednesday, November 1, 2017 2
  • 3.
    MORE INFORMATION ATNGINX.COM Who Are We? Charles Pretzer Technical Architect Formerly: - Software architecture consultant - Engineering lead at Zinio, StyleHive, others Floyd Smith Technical Marketing Writer Formerly: - Apple, Alta Vista, Google, and more - Author of multiple books on technology including web, marketing, usability
  • 4.
    Job Titles Analyst Architect CEO, CIO,CTO Consultant cool guy Cloud Architect, Engineer Developer DevOps Engineer IT Lead, Manager Security Architect Systems Analyst Tech Lead Organization Types Airlines Computer technology Consultancy Ecommerce Finance Freelance Government Higher education Mobile phones Networking technology Press SaaS Telecoms Reasons for Attending “Build ms platforms” “Client proposals” “Compare the three models to our solution” “Create API Gateway” “Developing microservices” “DevOps” “Microservices strategies” “Migrate from F5” “Move from .NET” “Move from Apache” “Moving from monolith” “Playing with microservices” Who Attends? 4
  • 5.
    1. Introducing NGINX 2.Problems Solved by Using a Service Mesh Model for Microservices 3. Service Mesh Models in the MRA 4. How the NGINX Kubernetes Ingress Controller works with Istio, linkerd, and other service mesh models 5. NGINX Professional Services Agenda 5
  • 6.
  • 7.
    About NGINX, Inc. 7 •NGINX Open Source project early 2000s • Company founded in 2011 • NGINX Plus first released in 2013 • VC-backed by enterprise software industry leaders • Offices in San Francisco, Sunnyvale, Cork, Cambridge, and Moscow • 1,000+ commercial customers • 100+ employees
  • 8.
    8 50%of the top100,000 busiest websites Source: W3Techs Web Technology Survey >
  • 9.
  • 10.
    Where NGINX Plusfits 10 Internet Web Server Serve content from disk Application Gateway FastCGI, uWSGI, Passenger… Reverse Proxy Caching, load balancing… HTTP traffic
  • 11.
    NGINX Plus worksin all environments 11 Public/Private/Hybrid Cloud Bare Metal Containers
  • 12.
    NGINX and Microservices 12 •Two-thirds of surveyed developers using or investigating microservices • Microservices is #1 topic on our website • Chris Richardson series, Introduction to Microservices • Chris Stetson series, NGINX MRA** • Three Models webinar • MRA Training • NGINX Professional Services – creators of the MRA …and much more ** = backup for this presentation
  • 13.
    The Role ofa Service Mesh 13
  • 14.
    What is aservice mesh? A service mesh is a dedicated infrastructure layer for making service-to- service communication safe, fast, and reliable. If you’re building a cloud native application, you need a service mesh! - buoyant.io
  • 15.
    MORE INFORMATION AT NGINX.COM ProxyModel • Focus on internet traffic • A shock absorber for your app • Dynamic connectivity
  • 16.
    MORE INFORMATION AT NGINX.COM ProxyModel • Inbound traffic is managed through a reverse proxy/load balancer • Services are left to themselves to connect to each other. • Often through round-robin DNS
  • 17.
    MORE INFORMATION AT NGINX.COM RouterMesh • Robust service discovery • Advanced load balancing • Circuit breaker pattern
  • 18.
    MORE INFORMATION AT NGINX.COM RouterMesh Model • Inbound routing through reverse proxy • Centralized load balancing through a separate load balancing service • Deis Router works like this
  • 19.
  • 20.
    MORE INFORMATION AT NGINX.COM FabricModel • Robust service discovery • Advanced load balancing • Circuit breaker pattern • Persistent SSL network
  • 21.
    MORE INFORMATION AT NGINX.COM Inter-Process Communication •Routing is done at the container level • Services connect to each other as needed • NGINX Plus acts as the forward and reverse proxy for all requests
  • 22.
    MORE INFORMATION AT NGINX.COM KubernetesLoad Balancing • Implemented by Services as internal or external load balancers • Ingress and Ingress Controllers are more robust forms of load balancing in Kubernetes • The NGINX Ingress Controller provides all the load balancing features NGINX within Kubernetes • https://github.com/nginxinc/kubernetes-ingress
  • 23.
    MORE INFORMATION AT NGINX.COM NGINXIngress Controller for Kubernetes - Open source repository on github
  • 24.
    MORE INFORMATION AT NGINX.COM IstioLoad Balancing • In order to discover services Istio assumes the presence of a service registry • NGINX has built the nginxmesh repository which provides an implementation of a sidecar proxy for Istio using NGINX • https://github.com/nginmesh/nginmesh
  • 25.
    MORE INFORMATION AT NGINX.COM nginmesh forIstio - Open source repository on github
  • 26.
    NGINX Professional Services 26 •Developers of the NGINX MRA • Highlights: NGINX Plus Quick Start and Microservices Architecture Strategy and Consultation • Find the Fabric Model on GitHub • MRA Training • Contact NGINX Sales to discuss
  • 27.
  • 28.

Editor's Notes

  • #5 Attendees from recent AMA
  • #9 Half of the top 10,000 We’re now the number one web server for the top 100,000 as well, and climbing fast in every category.
  • #10 NGINX Plus extends NGINX with advanced features such as health monitoring, session persistence, and an advanced monitoring interface. NGINX Plus is a complete application delivery platform.
  • #11 NGINX Plus gives you all the tools you need to deliver your application reliably. Web Server NGINX is a fully featured web server that can directly serve static content. NGINX Plus can scale to handle hundreds of thousands of clients simultaneously, and serve hundreds of thousands of content resources per second. Application Gateway NGINX handles all HTTP traffic, and forwards requests in a smooth, controlled manner to PHP, Ruby, Java, and other application types, using FastCGI, uWSGI, and Linux sockets. Reverse Proxy NGINX is a reverse proxy that you can put in front of your applications. NGINX can cache both static and dynamic content to improve overall performance, as well as load balance traffic enabling you to scale-out.
  • #12 Being software NGINX Plus can operate in any environment, from bare metal to VMs to containers. We don’t need to QA and qualify every environment. If you can run Linux you can run NGINX and it will just work. Not just across infrastructure, but the same NGINX software that runs in production can also run in staging and development environments without incurring additional capital costs. Keeping the different environments in sync as much as possible is an industry best practice and helps to reduce issues where it worked in dev but broke in production. With NGINX Plus enterprises can easily eliminate this potential gap in the deployment process.
  • #16 We have a solution to the network problem that provides Service discovery Robust load balancing Fast encryption at the transmission layer
  • #17 This model focuses entirely on in-bound traffic and ignores the whole inter process communication problem. Basically think of it as putting NGINX on a public facing server and letting the associated services on the private network fend for themselves. The good thing is that: You get all the benefit of HTTP traffic management in this system that you normally get with NGINX SSL termination Traffic shaping and security Caching With NGINX plus you get robust load-balancing and service discovery This model works well for a simple and flat API or a monolith with some basic microservices attached. For Kubernetes we have an open source Ingress Controller that allows you to easily implement this system using our OSS or commercial version NGINX Plus gives you dynamic upstreams, active health checks, and robust monitoring NGINX Plus can also act as a Web Application Firewall using the ModSecurity module
  • #18 The Router mesh architecture adds to the Proxy Model architecture by also providing Service discovery Robust load balancing Fast encryption at the transmission layer As well as Fast failure detection Advanced Load Balancing among services
  • #19 Like the proxy model, it has NGINX running in front of the system to manage in bound traffic and gives you all of the benefits of the proxy model Where it differs is in the introduction of a centralized load balancer between the services When services need to communicate with other services, they route through the this centralized load balancer and the traffic is distributed to other instances The Deis Router with NGINX/NGINX Plus work in this manner Service discovery through DNS and monitoring the service event stream in the registry But it exacerbates the performance problem by adding another hop in the network connection requiring another SSL handshake to make it work So instead of a 9 step SSL handshake, you need to do an 18 step SSL handshake
  • #20 As an added benefit, you can build the Circuit Breaker pattern into your microservices using NGINX Plus active health checks You define an active health check for your service that queries a healthcheck end point You can have a variety of responses that NGINX can evaluate using our regex functionality If the system is marked as unhealthy, we will throttle back traffic to that instance until it has time to recover You can even configure a slow start feature so NGINX will delay sending requests to a service for a specified period of time in order to allow the application to start
  • #21 We have a solution to the network problem that provides Service discovery Robust load balancing Fast encryption at the transmission layer
  • #22 The final model is what we call the fabric model. Like the other two models you have a public proxy in front of the system to handle incoming HTTP traffic Where it differs from other models is that Instead of a centralized router, each container has an instance of NGINX Plus running in the container This system acts as a local reverse and forward proxy for all http traffic Using this system you get service discovery, robust load balancing, and most importantly, high performance, encrypted networking
  • #23 Services default to internal load balancers to pods Services defined as NodePort or LoadBalancer types will act as load balancers for cloud providers that support them: GKE/AWS Ingress and Ingress Controllers are more robust implementations of load balancers for kubernetes NGINX provides an open source Ingress Controller with instructions for building and an example This Ingress Controller uses NGINX Plus upstreams to route requests to different internal services which, in turn, balance requests to the associated podshttps://github.com/nginxinc/kubernetes-ingress
  • #24 Ingress Resource built on NGINX for service discovery Written in go and dynamically updates the NGINX configuration when services are added/scaled Easy routing implementation
  • #25 The service registry required by Istio is usually provided by Kubernetes or Mesos The nginmesh repository plays an integral role in the load balancing within Istio, thereby providing a service mesh
  • #26 nginmesh repository