SlideShare ist ein Scribd-Unternehmen logo
1 von 35
1
API gateway for microservices
environments - the NGINX way
microservices
paris
30-Nov-2017 Liam Crilly
liam@nginx.com
@liamcrilly
We empower creators
of the new digital
world
Source: Source information goes here.Source: Source information goes here.
#1for the busiest sites
The busiest sites choose NGINX
4
Source: W3Techs Web server ranking 20-Nov-2017
Innovators powered by NGINX
5
• NGINX v0.1 published in 2004
• NGINX, Inc. founded in 2011
• NGINX Plus released in 2013
• Offices in San Francisco, Cambridge, Cork, Moscow and Singapore
• 300M+ websites
• 1,200+ commercial customers
• 180+ employees across engineering, support, sales and marketing
Our Products
NGINX Plus
The only all-in-one load balancer, web server, application firewall and content cache.
Simplify your architecture while reducing costs.
NGINX Controller
Centralized monitoring and management for
NGINX Plus. Deploy and automate virtual
load balancers with a beautiful interface and
API.
NGINX Unit
The new, open source application server
from NGINX, Inc. Lightweight, with multi-
language support and an API-driven
configuration.
NGINX
Industry-defining, open source webserver, reverse proxy and web accelerator
NGINX Amplify
NGINX Monitoring Made Easy: out-of-the-box graphs for NGINX and OS metrics, static analyzer and
automated alerts
Microservices
If beer
was a
web
app…
Monoliths are complex
11
• Tightly coupled to the
underlying infrastructure
• Nobody knows how it all
works
• Hard to maintain
• Impossible to debug
Microservices are minimal
12
• Easily separated from
underlying infrastructure
• Independently managed
• Easily
replaced/replenished
• Consistent interface
Photos
http://www.thedieline.com/blog/2017/1/26/a-fresh-look-at-craft-beer-cans
https://www.threadless.com/product/3314/ring_pull
Microservices do one thing
13
• One function
• Easy to test
• Easy to scale
Photo http://www.thedieline.com/blog/2017/1/26/a-fresh-look-at-craft-beer-cans
Microservices do one thing
14
• Avoid duplicating
functionality
◦ Crypto
◦ Authentication
◦ Access Control
◦ Analytics
Microservices do one thing
15
• Microservice?
• Miniservice?
• Mini-monolith?
But singular services can go bad
16
So deploy with redundancy
17
• Plan for failure
• At least 2 per service
• Scale independently
• Scale on demand
Photo:
https://twitter.com/clinkbeer/status/812324082809180161
Choose complexity carefully
19
Proxy Model Fabric Model (Service
Mesh)
The Goldilocks principle
20
Suitability
Low
High
“Just right”Too simple Too complex
Router Mesh Architecture
21
Secure Proxy API Gateway
Separation of duties
22
Secure proxy
• North-South traffic
• TLS termination
• Client authentication
• Centralized logging for all
client-initiated requests
• Request tracing injection
API gateway
• East-West and N-S traffic
• API routing
• Fine-grained access
control
• Rate limiting
• Propagate request ID
Everyone needs an
API gateway!
API Management products look a lot like
monoliths
Docker
#1 stars
#1 pulls
API gateway functions
26
Things you need
• Fast proxying
• API routing
• Overload protection
• Authentication of clients
• TLS support (termination or
end-to-end encryption)
Things you don’t need
• Digital strategy alignment
• API design tools
• Monetization metrics
• Business value measures
• Developer portals
API routing
(URI mapping)
27
# conf.d/routing_map.conf
map $request_uri $upstream_api {
{
# Pricing API
"^/api/prices/.*$" pricing_api;
"^/v1/pricing/.*$" pricing_api;
"^/item/.*/price/.*$" pricing_api;
# Partcodes API
"^/api/partcodes/.*$" partcodes_api;
"^/v1/partno/.*$" partcodes_api;
"^/item/.*/sku/.*$" partcodes_api;
# More APIs
# ...
}
API routing
Overload protection
28
# conf.d/api_gateway.conf
upstream pricing_api {
server 172.16.0.1:80 max_conns=500;
server 172.16.0.2:80 max_conns=500;
}
upstream partcodes_api {
server partcodes.app.example.com resolve;
}
server {
listen 80;
location / {
proxy_pass http://$upstream_api;
limit_conn clientip 20;
limit_req zone=10persec;
}
}
Authentication
(API keys)
29
# conf.d/apikeys_map.conf
map $http_apikey $client_name {
{
rL0Y20zC-Fzt72VPzMSk2A client_foo;
N7UdGUp1E-RbVvZSTy1R8g client_bar;
c_7_pLf2u2jkTPmEyF9uiA client_baz;
OiHNcxfhRFvomZn11_YqUw client_pub;
# ...
}
Authentication
(API keys)
30
# conf.d/api_gateway.conf
#[upstreams here]
server {
listen 80;
location / {
if ($client_name = "") {
return 401;
}
proxy_pass http://$upstream_api;
proxy_set_header API-Client $client_name;
limit_conn clientip 20;
limit_req zone=10persec;
}
}
Authentication
(JSON Web Token)
31
# conf.d/api_gateway.conf
#[upstreams here]
server {
listen 80;
auth_jwt "private API";
auth_jwt_key_file jwk.json;
location / {
proxy_pass http://$upstream_api;
proxy_set_header APIclient $jwt_claim_sub;
limit_conn clientip 20;
limit_req zone=10persec;
}
}
Request tracing
32
# conf.d/api_gateway.conf
#[upstreams here]
server {
listen 80;
location / {
proxy_pass http://$upstream_api;
proxy_set_header RequestID $http_requestid;
}
}
# Secure Proxy
server {
listen 443 ssl;
#ssl_* # TLS configuration
proxy_set_header RequestID $request_id;
proxy_pass http://api_gateway;
}
If beer
was a
web
app…
If beer was a web app…
nginx.com | @nginxnginx.com | @nginx
liam@nginx.com
@liamcrilly
Thank you
Merci

Weitere ähnliche Inhalte

Was ist angesagt?

Manage your APIs and Microservices with an API Gateway
Manage your APIs and Microservices with an API GatewayManage your APIs and Microservices with an API Gateway
Manage your APIs and Microservices with an API GatewayThibault Charbonnier
 
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...ScyllaDB
 
Using an API Gateway for Microservices (APAC Webinar)
Using an API Gateway for Microservices (APAC Webinar)Using an API Gateway for Microservices (APAC Webinar)
Using an API Gateway for Microservices (APAC Webinar)NGINX, Inc.
 
APIdays Singapore 2019 - API Gateway in a Nutshell, Allan Chua, Solution and ...
APIdays Singapore 2019 - API Gateway in a Nutshell, Allan Chua, Solution and ...APIdays Singapore 2019 - API Gateway in a Nutshell, Allan Chua, Solution and ...
APIdays Singapore 2019 - API Gateway in a Nutshell, Allan Chua, Solution and ...apidays
 
NGINX, Istio, and the Move to Microservices and Service Mesh
NGINX, Istio, and the Move to Microservices and Service MeshNGINX, Istio, and the Move to Microservices and Service Mesh
NGINX, Istio, and the Move to Microservices and Service MeshNGINX, Inc.
 
Kong API Gateway
Kong API Gateway Kong API Gateway
Kong API Gateway Chris Mague
 
Clean up this mess - API Gateway & Service Discovery in .NET
Clean up this mess - API Gateway & Service Discovery in .NETClean up this mess - API Gateway & Service Discovery in .NET
Clean up this mess - API Gateway & Service Discovery in .NETMarcin Tyborowski
 
Flexible, hybrid API-led software architectures with Kong
Flexible, hybrid API-led software architectures with KongFlexible, hybrid API-led software architectures with Kong
Flexible, hybrid API-led software architectures with KongSven Bernhardt
 
APIs: Intelligent Routing, Security, & Management
APIs: Intelligent Routing, Security, & ManagementAPIs: Intelligent Routing, Security, & Management
APIs: Intelligent Routing, Security, & ManagementNGINX, Inc.
 
APIdays Singapore 2019 - Blowing Up the Monolith: Adopting a Modern API Strat...
APIdays Singapore 2019 - Blowing Up the Monolith: Adopting a Modern API Strat...APIdays Singapore 2019 - Blowing Up the Monolith: Adopting a Modern API Strat...
APIdays Singapore 2019 - Blowing Up the Monolith: Adopting a Modern API Strat...apidays
 
WTF Do We Need a Service Mesh?
WTF Do We Need a Service Mesh? WTF Do We Need a Service Mesh?
WTF Do We Need a Service Mesh? Anton Weiss
 
Do You Need A Service Mesh?
Do You Need A Service Mesh?Do You Need A Service Mesh?
Do You Need A Service Mesh?NGINX, Inc.
 
NGINX Controller: Configuration, Management, and Troubleshooting at Scale
NGINX Controller: Configuration, Management, and Troubleshooting at Scale NGINX Controller: Configuration, Management, and Troubleshooting at Scale
NGINX Controller: Configuration, Management, and Troubleshooting at Scale NGINX, Inc.
 
Simplify Microservices with the NGINX Application Platform
Simplify Microservices with the NGINX Application PlatformSimplify Microservices with the NGINX Application Platform
Simplify Microservices with the NGINX Application PlatformNGINX, Inc.
 
Integration Microservices
Integration MicroservicesIntegration Microservices
Integration MicroservicesKasun Indrasiri
 
Achieve Full API Lifecycle Management Using NGINX Controller
Achieve Full API Lifecycle Management Using NGINX ControllerAchieve Full API Lifecycle Management Using NGINX Controller
Achieve Full API Lifecycle Management Using NGINX ControllerNGINX, Inc.
 
Navigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and LinkerdNavigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and LinkerdChristian Posta
 
Simplify Microservices with the NGINX Application Platform - EMEA
Simplify Microservices with the NGINX Application Platform - EMEASimplify Microservices with the NGINX Application Platform - EMEA
Simplify Microservices with the NGINX Application Platform - EMEANGINX, Inc.
 
Exposing GraphQLs as Managed APIs
Exposing GraphQLs as Managed APIsExposing GraphQLs as Managed APIs
Exposing GraphQLs as Managed APIsWSO2
 

Was ist angesagt? (20)

Manage your APIs and Microservices with an API Gateway
Manage your APIs and Microservices with an API GatewayManage your APIs and Microservices with an API Gateway
Manage your APIs and Microservices with an API Gateway
 
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
 
API Gateway report
API Gateway reportAPI Gateway report
API Gateway report
 
Using an API Gateway for Microservices (APAC Webinar)
Using an API Gateway for Microservices (APAC Webinar)Using an API Gateway for Microservices (APAC Webinar)
Using an API Gateway for Microservices (APAC Webinar)
 
APIdays Singapore 2019 - API Gateway in a Nutshell, Allan Chua, Solution and ...
APIdays Singapore 2019 - API Gateway in a Nutshell, Allan Chua, Solution and ...APIdays Singapore 2019 - API Gateway in a Nutshell, Allan Chua, Solution and ...
APIdays Singapore 2019 - API Gateway in a Nutshell, Allan Chua, Solution and ...
 
NGINX, Istio, and the Move to Microservices and Service Mesh
NGINX, Istio, and the Move to Microservices and Service MeshNGINX, Istio, and the Move to Microservices and Service Mesh
NGINX, Istio, and the Move to Microservices and Service Mesh
 
Kong API Gateway
Kong API Gateway Kong API Gateway
Kong API Gateway
 
Clean up this mess - API Gateway & Service Discovery in .NET
Clean up this mess - API Gateway & Service Discovery in .NETClean up this mess - API Gateway & Service Discovery in .NET
Clean up this mess - API Gateway & Service Discovery in .NET
 
Flexible, hybrid API-led software architectures with Kong
Flexible, hybrid API-led software architectures with KongFlexible, hybrid API-led software architectures with Kong
Flexible, hybrid API-led software architectures with Kong
 
APIs: Intelligent Routing, Security, & Management
APIs: Intelligent Routing, Security, & ManagementAPIs: Intelligent Routing, Security, & Management
APIs: Intelligent Routing, Security, & Management
 
APIdays Singapore 2019 - Blowing Up the Monolith: Adopting a Modern API Strat...
APIdays Singapore 2019 - Blowing Up the Monolith: Adopting a Modern API Strat...APIdays Singapore 2019 - Blowing Up the Monolith: Adopting a Modern API Strat...
APIdays Singapore 2019 - Blowing Up the Monolith: Adopting a Modern API Strat...
 
WTF Do We Need a Service Mesh?
WTF Do We Need a Service Mesh? WTF Do We Need a Service Mesh?
WTF Do We Need a Service Mesh?
 
Do You Need A Service Mesh?
Do You Need A Service Mesh?Do You Need A Service Mesh?
Do You Need A Service Mesh?
 
NGINX Controller: Configuration, Management, and Troubleshooting at Scale
NGINX Controller: Configuration, Management, and Troubleshooting at Scale NGINX Controller: Configuration, Management, and Troubleshooting at Scale
NGINX Controller: Configuration, Management, and Troubleshooting at Scale
 
Simplify Microservices with the NGINX Application Platform
Simplify Microservices with the NGINX Application PlatformSimplify Microservices with the NGINX Application Platform
Simplify Microservices with the NGINX Application Platform
 
Integration Microservices
Integration MicroservicesIntegration Microservices
Integration Microservices
 
Achieve Full API Lifecycle Management Using NGINX Controller
Achieve Full API Lifecycle Management Using NGINX ControllerAchieve Full API Lifecycle Management Using NGINX Controller
Achieve Full API Lifecycle Management Using NGINX Controller
 
Navigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and LinkerdNavigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and Linkerd
 
Simplify Microservices with the NGINX Application Platform - EMEA
Simplify Microservices with the NGINX Application Platform - EMEASimplify Microservices with the NGINX Application Platform - EMEA
Simplify Microservices with the NGINX Application Platform - EMEA
 
Exposing GraphQLs as Managed APIs
Exposing GraphQLs as Managed APIsExposing GraphQLs as Managed APIs
Exposing GraphQLs as Managed APIs
 

Ähnlich wie API gateway for microservices environments - the NGINX way

Using NGINX and NGINX Plus as a Kubernetes Ingress
Using NGINX and NGINX Plus as a Kubernetes IngressUsing NGINX and NGINX Plus as a Kubernetes Ingress
Using NGINX and NGINX Plus as a Kubernetes IngressKevin Jones
 
NGINX Basics: Ask Me Anything – EMEA
NGINX Basics: Ask Me Anything – EMEANGINX Basics: Ask Me Anything – EMEA
NGINX Basics: Ask Me Anything – EMEANGINX, Inc.
 
Achieve Full API Lifecycle Management Using NGINX Controller – EMEA
Achieve Full API Lifecycle Management Using NGINX Controller – EMEAAchieve Full API Lifecycle Management Using NGINX Controller – EMEA
Achieve Full API Lifecycle Management Using NGINX Controller – EMEANGINX, Inc.
 
Kubernetes and the NGINX Plus Ingress Controller
Kubernetes and the NGINX Plus Ingress ControllerKubernetes and the NGINX Plus Ingress Controller
Kubernetes and the NGINX Plus Ingress ControllerKatherine Bagood
 
NGINX: The Past, Present and Future of the Modern Web
NGINX: The Past, Present and Future of the Modern WebNGINX: The Past, Present and Future of the Modern Web
NGINX: The Past, Present and Future of the Modern WebKevin Jones
 
How api management supports the digital transformation process
How api management supports the digital transformation processHow api management supports the digital transformation process
How api management supports the digital transformation processSmartWave
 
Driving success in the cloud with NGINX
Driving success in the cloud with NGINXDriving success in the cloud with NGINX
Driving success in the cloud with NGINXNGINX, Inc.
 
The 3 Models in the NGINX Microservices Reference Architecture
The 3 Models in the NGINX Microservices Reference ArchitectureThe 3 Models in the NGINX Microservices Reference Architecture
The 3 Models in the NGINX Microservices Reference ArchitectureNGINX, Inc.
 
Dutch Oracle Architects Platform - Reviewing Oracle OpenWorld 2017 and New Tr...
Dutch Oracle Architects Platform - Reviewing Oracle OpenWorld 2017 and New Tr...Dutch Oracle Architects Platform - Reviewing Oracle OpenWorld 2017 and New Tr...
Dutch Oracle Architects Platform - Reviewing Oracle OpenWorld 2017 and New Tr...Lucas Jellema
 
Deep Dive: Automating the Application and Security Pipeline with NGINX and An...
Deep Dive: Automating the Application and Security Pipeline with NGINX and An...Deep Dive: Automating the Application and Security Pipeline with NGINX and An...
Deep Dive: Automating the Application and Security Pipeline with NGINX and An...NGINX, Inc.
 
Automate NGINX with DevOps Tools
Automate NGINX with DevOps ToolsAutomate NGINX with DevOps Tools
Automate NGINX with DevOps ToolsSupachai Jaturaprom
 
Accélérez vos déploiements applicatifs avec NGINX Controller
Accélérez vos déploiements applicatifs avec NGINX ControllerAccélérez vos déploiements applicatifs avec NGINX Controller
Accélérez vos déploiements applicatifs avec NGINX ControllerNGINX, Inc.
 
Amazon Web Services Architecture - An Overview
Amazon Web Services Architecture - An OverviewAmazon Web Services Architecture - An Overview
Amazon Web Services Architecture - An OverviewScott Weber
 
Microservices and Container Management with NGINX Plus and Mesosphere DC/OS
Microservices and Container Management with NGINX Plus and Mesosphere DC/OSMicroservices and Container Management with NGINX Plus and Mesosphere DC/OS
Microservices and Container Management with NGINX Plus and Mesosphere DC/OSNGINX, Inc.
 
Brocade Software Networking Presentation at Interface 2016
Brocade Software Networking Presentation at Interface 2016Brocade Software Networking Presentation at Interface 2016
Brocade Software Networking Presentation at Interface 2016Scott Sims
 
MongoDB World 2019: Wipro Software Defined Everything Powered by MongoDB
MongoDB World 2019: Wipro Software Defined Everything Powered by MongoDBMongoDB World 2019: Wipro Software Defined Everything Powered by MongoDB
MongoDB World 2019: Wipro Software Defined Everything Powered by MongoDBMongoDB
 
Flawless Application Delivery with NGINX Plus
Flawless Application Delivery with NGINX PlusFlawless Application Delivery with NGINX Plus
Flawless Application Delivery with NGINX PlusPeter Guagenti
 
AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil...
AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil...AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil...
AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil...Amazon Web Services
 
Gain multi-cloud versatility with software load balancing designed for cloud-...
Gain multi-cloud versatility with software load balancing designed for cloud-...Gain multi-cloud versatility with software load balancing designed for cloud-...
Gain multi-cloud versatility with software load balancing designed for cloud-...Ashnikbiz
 

Ähnlich wie API gateway for microservices environments - the NGINX way (20)

Using NGINX and NGINX Plus as a Kubernetes Ingress
Using NGINX and NGINX Plus as a Kubernetes IngressUsing NGINX and NGINX Plus as a Kubernetes Ingress
Using NGINX and NGINX Plus as a Kubernetes Ingress
 
NGINX Basics: Ask Me Anything – EMEA
NGINX Basics: Ask Me Anything – EMEANGINX Basics: Ask Me Anything – EMEA
NGINX Basics: Ask Me Anything – EMEA
 
Achieve Full API Lifecycle Management Using NGINX Controller – EMEA
Achieve Full API Lifecycle Management Using NGINX Controller – EMEAAchieve Full API Lifecycle Management Using NGINX Controller – EMEA
Achieve Full API Lifecycle Management Using NGINX Controller – EMEA
 
Kubernetes and the NGINX Plus Ingress Controller
Kubernetes and the NGINX Plus Ingress ControllerKubernetes and the NGINX Plus Ingress Controller
Kubernetes and the NGINX Plus Ingress Controller
 
ITB2017 - Nginx ppf intothebox_2017
ITB2017 - Nginx ppf intothebox_2017ITB2017 - Nginx ppf intothebox_2017
ITB2017 - Nginx ppf intothebox_2017
 
NGINX: The Past, Present and Future of the Modern Web
NGINX: The Past, Present and Future of the Modern WebNGINX: The Past, Present and Future of the Modern Web
NGINX: The Past, Present and Future of the Modern Web
 
How api management supports the digital transformation process
How api management supports the digital transformation processHow api management supports the digital transformation process
How api management supports the digital transformation process
 
Driving success in the cloud with NGINX
Driving success in the cloud with NGINXDriving success in the cloud with NGINX
Driving success in the cloud with NGINX
 
The 3 Models in the NGINX Microservices Reference Architecture
The 3 Models in the NGINX Microservices Reference ArchitectureThe 3 Models in the NGINX Microservices Reference Architecture
The 3 Models in the NGINX Microservices Reference Architecture
 
Dutch Oracle Architects Platform - Reviewing Oracle OpenWorld 2017 and New Tr...
Dutch Oracle Architects Platform - Reviewing Oracle OpenWorld 2017 and New Tr...Dutch Oracle Architects Platform - Reviewing Oracle OpenWorld 2017 and New Tr...
Dutch Oracle Architects Platform - Reviewing Oracle OpenWorld 2017 and New Tr...
 
Deep Dive: Automating the Application and Security Pipeline with NGINX and An...
Deep Dive: Automating the Application and Security Pipeline with NGINX and An...Deep Dive: Automating the Application and Security Pipeline with NGINX and An...
Deep Dive: Automating the Application and Security Pipeline with NGINX and An...
 
Automate NGINX with DevOps Tools
Automate NGINX with DevOps ToolsAutomate NGINX with DevOps Tools
Automate NGINX with DevOps Tools
 
Accélérez vos déploiements applicatifs avec NGINX Controller
Accélérez vos déploiements applicatifs avec NGINX ControllerAccélérez vos déploiements applicatifs avec NGINX Controller
Accélérez vos déploiements applicatifs avec NGINX Controller
 
Amazon Web Services Architecture - An Overview
Amazon Web Services Architecture - An OverviewAmazon Web Services Architecture - An Overview
Amazon Web Services Architecture - An Overview
 
Microservices and Container Management with NGINX Plus and Mesosphere DC/OS
Microservices and Container Management with NGINX Plus and Mesosphere DC/OSMicroservices and Container Management with NGINX Plus and Mesosphere DC/OS
Microservices and Container Management with NGINX Plus and Mesosphere DC/OS
 
Brocade Software Networking Presentation at Interface 2016
Brocade Software Networking Presentation at Interface 2016Brocade Software Networking Presentation at Interface 2016
Brocade Software Networking Presentation at Interface 2016
 
MongoDB World 2019: Wipro Software Defined Everything Powered by MongoDB
MongoDB World 2019: Wipro Software Defined Everything Powered by MongoDBMongoDB World 2019: Wipro Software Defined Everything Powered by MongoDB
MongoDB World 2019: Wipro Software Defined Everything Powered by MongoDB
 
Flawless Application Delivery with NGINX Plus
Flawless Application Delivery with NGINX PlusFlawless Application Delivery with NGINX Plus
Flawless Application Delivery with NGINX Plus
 
AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil...
AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil...AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil...
AWS re:Invent 2016: 6 Million New Registrations in 30 Days: How the Chick-fil...
 
Gain multi-cloud versatility with software load balancing designed for cloud-...
Gain multi-cloud versatility with software load balancing designed for cloud-...Gain multi-cloud versatility with software load balancing designed for cloud-...
Gain multi-cloud versatility with software load balancing designed for cloud-...
 

Mehr von inovia

10 tips for Redux at scale
10 tips for Redux at scale10 tips for Redux at scale
10 tips for Redux at scaleinovia
 
10 essentials steps for kafka streaming services
10 essentials steps for kafka streaming services10 essentials steps for kafka streaming services
10 essentials steps for kafka streaming servicesinovia
 
Redux at scale
Redux at scaleRedux at scale
Redux at scaleinovia
 
DocuSign's Road to react
DocuSign's Road to reactDocuSign's Road to react
DocuSign's Road to reactinovia
 
Kafka: meetup microservice
Kafka: meetup microserviceKafka: meetup microservice
Kafka: meetup microserviceinovia
 
Correlation id (tid)
Correlation id (tid)Correlation id (tid)
Correlation id (tid)inovia
 
Meetic back end redesign - Meetup microservices
Meetic back end redesign - Meetup microservicesMeetic back end redesign - Meetup microservices
Meetic back end redesign - Meetup microservicesinovia
 
Security in microservices architectures
Security in microservices architecturesSecurity in microservices architectures
Security in microservices architecturesinovia
 
Building a Secure, Performant Network Fabric for Microservice Applications
Building a Secure, Performant Network Fabric for Microservice ApplicationsBuilding a Secure, Performant Network Fabric for Microservice Applications
Building a Secure, Performant Network Fabric for Microservice Applicationsinovia
 
Microservices vs SOA
Microservices vs SOAMicroservices vs SOA
Microservices vs SOAinovia
 
CQRS, an introduction by JC Bohin
CQRS, an introduction by JC BohinCQRS, an introduction by JC Bohin
CQRS, an introduction by JC Bohininovia
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Designinovia
 
Oauth2, open-id connect with microservices
Oauth2, open-id connect with microservicesOauth2, open-id connect with microservices
Oauth2, open-id connect with microservicesinovia
 
You probably don't need microservices
You probably don't need microservicesYou probably don't need microservices
You probably don't need microservicesinovia
 
Api Gateway - What's the use of an api gateway?
Api Gateway - What's the use of an api gateway?Api Gateway - What's the use of an api gateway?
Api Gateway - What's the use of an api gateway?inovia
 
Steam Learn: An introduction to Redis
Steam Learn: An introduction to RedisSteam Learn: An introduction to Redis
Steam Learn: An introduction to Redisinovia
 
Steam Learn: Speedrun et TAS
Steam Learn: Speedrun et TASSteam Learn: Speedrun et TAS
Steam Learn: Speedrun et TASinovia
 
Steam Learn: Asynchronous Javascript
Steam Learn: Asynchronous JavascriptSteam Learn: Asynchronous Javascript
Steam Learn: Asynchronous Javascriptinovia
 
Steam Learn: Cheat sheet for Vim
Steam Learn: Cheat sheet for VimSteam Learn: Cheat sheet for Vim
Steam Learn: Cheat sheet for Viminovia
 
Steam Learn: REST Good practices
Steam Learn: REST Good practicesSteam Learn: REST Good practices
Steam Learn: REST Good practicesinovia
 

Mehr von inovia (20)

10 tips for Redux at scale
10 tips for Redux at scale10 tips for Redux at scale
10 tips for Redux at scale
 
10 essentials steps for kafka streaming services
10 essentials steps for kafka streaming services10 essentials steps for kafka streaming services
10 essentials steps for kafka streaming services
 
Redux at scale
Redux at scaleRedux at scale
Redux at scale
 
DocuSign's Road to react
DocuSign's Road to reactDocuSign's Road to react
DocuSign's Road to react
 
Kafka: meetup microservice
Kafka: meetup microserviceKafka: meetup microservice
Kafka: meetup microservice
 
Correlation id (tid)
Correlation id (tid)Correlation id (tid)
Correlation id (tid)
 
Meetic back end redesign - Meetup microservices
Meetic back end redesign - Meetup microservicesMeetic back end redesign - Meetup microservices
Meetic back end redesign - Meetup microservices
 
Security in microservices architectures
Security in microservices architecturesSecurity in microservices architectures
Security in microservices architectures
 
Building a Secure, Performant Network Fabric for Microservice Applications
Building a Secure, Performant Network Fabric for Microservice ApplicationsBuilding a Secure, Performant Network Fabric for Microservice Applications
Building a Secure, Performant Network Fabric for Microservice Applications
 
Microservices vs SOA
Microservices vs SOAMicroservices vs SOA
Microservices vs SOA
 
CQRS, an introduction by JC Bohin
CQRS, an introduction by JC BohinCQRS, an introduction by JC Bohin
CQRS, an introduction by JC Bohin
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Oauth2, open-id connect with microservices
Oauth2, open-id connect with microservicesOauth2, open-id connect with microservices
Oauth2, open-id connect with microservices
 
You probably don't need microservices
You probably don't need microservicesYou probably don't need microservices
You probably don't need microservices
 
Api Gateway - What's the use of an api gateway?
Api Gateway - What's the use of an api gateway?Api Gateway - What's the use of an api gateway?
Api Gateway - What's the use of an api gateway?
 
Steam Learn: An introduction to Redis
Steam Learn: An introduction to RedisSteam Learn: An introduction to Redis
Steam Learn: An introduction to Redis
 
Steam Learn: Speedrun et TAS
Steam Learn: Speedrun et TASSteam Learn: Speedrun et TAS
Steam Learn: Speedrun et TAS
 
Steam Learn: Asynchronous Javascript
Steam Learn: Asynchronous JavascriptSteam Learn: Asynchronous Javascript
Steam Learn: Asynchronous Javascript
 
Steam Learn: Cheat sheet for Vim
Steam Learn: Cheat sheet for VimSteam Learn: Cheat sheet for Vim
Steam Learn: Cheat sheet for Vim
 
Steam Learn: REST Good practices
Steam Learn: REST Good practicesSteam Learn: REST Good practices
Steam Learn: REST Good practices
 

Kürzlich hochgeladen

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Kürzlich hochgeladen (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

API gateway for microservices environments - the NGINX way

  • 1. 1
  • 2. API gateway for microservices environments - the NGINX way microservices paris 30-Nov-2017 Liam Crilly liam@nginx.com @liamcrilly
  • 3. We empower creators of the new digital world
  • 4. Source: Source information goes here.Source: Source information goes here. #1for the busiest sites The busiest sites choose NGINX 4 Source: W3Techs Web server ranking 20-Nov-2017
  • 6. • NGINX v0.1 published in 2004 • NGINX, Inc. founded in 2011 • NGINX Plus released in 2013 • Offices in San Francisco, Cambridge, Cork, Moscow and Singapore • 300M+ websites • 1,200+ commercial customers • 180+ employees across engineering, support, sales and marketing
  • 7. Our Products NGINX Plus The only all-in-one load balancer, web server, application firewall and content cache. Simplify your architecture while reducing costs. NGINX Controller Centralized monitoring and management for NGINX Plus. Deploy and automate virtual load balancers with a beautiful interface and API. NGINX Unit The new, open source application server from NGINX, Inc. Lightweight, with multi- language support and an API-driven configuration. NGINX Industry-defining, open source webserver, reverse proxy and web accelerator NGINX Amplify NGINX Monitoring Made Easy: out-of-the-box graphs for NGINX and OS metrics, static analyzer and automated alerts
  • 9.
  • 11. Monoliths are complex 11 • Tightly coupled to the underlying infrastructure • Nobody knows how it all works • Hard to maintain • Impossible to debug
  • 12. Microservices are minimal 12 • Easily separated from underlying infrastructure • Independently managed • Easily replaced/replenished • Consistent interface Photos http://www.thedieline.com/blog/2017/1/26/a-fresh-look-at-craft-beer-cans https://www.threadless.com/product/3314/ring_pull
  • 13. Microservices do one thing 13 • One function • Easy to test • Easy to scale Photo http://www.thedieline.com/blog/2017/1/26/a-fresh-look-at-craft-beer-cans
  • 14. Microservices do one thing 14 • Avoid duplicating functionality ◦ Crypto ◦ Authentication ◦ Access Control ◦ Analytics
  • 15. Microservices do one thing 15 • Microservice? • Miniservice? • Mini-monolith?
  • 16. But singular services can go bad 16
  • 17. So deploy with redundancy 17 • Plan for failure • At least 2 per service • Scale independently • Scale on demand Photo: https://twitter.com/clinkbeer/status/812324082809180161
  • 18.
  • 19. Choose complexity carefully 19 Proxy Model Fabric Model (Service Mesh)
  • 22. Separation of duties 22 Secure proxy • North-South traffic • TLS termination • Client authentication • Centralized logging for all client-initiated requests • Request tracing injection API gateway • East-West and N-S traffic • API routing • Fine-grained access control • Rate limiting • Propagate request ID
  • 24. API Management products look a lot like monoliths
  • 26. API gateway functions 26 Things you need • Fast proxying • API routing • Overload protection • Authentication of clients • TLS support (termination or end-to-end encryption) Things you don’t need • Digital strategy alignment • API design tools • Monetization metrics • Business value measures • Developer portals
  • 27. API routing (URI mapping) 27 # conf.d/routing_map.conf map $request_uri $upstream_api { { # Pricing API "^/api/prices/.*$" pricing_api; "^/v1/pricing/.*$" pricing_api; "^/item/.*/price/.*$" pricing_api; # Partcodes API "^/api/partcodes/.*$" partcodes_api; "^/v1/partno/.*$" partcodes_api; "^/item/.*/sku/.*$" partcodes_api; # More APIs # ... }
  • 28. API routing Overload protection 28 # conf.d/api_gateway.conf upstream pricing_api { server 172.16.0.1:80 max_conns=500; server 172.16.0.2:80 max_conns=500; } upstream partcodes_api { server partcodes.app.example.com resolve; } server { listen 80; location / { proxy_pass http://$upstream_api; limit_conn clientip 20; limit_req zone=10persec; } }
  • 29. Authentication (API keys) 29 # conf.d/apikeys_map.conf map $http_apikey $client_name { { rL0Y20zC-Fzt72VPzMSk2A client_foo; N7UdGUp1E-RbVvZSTy1R8g client_bar; c_7_pLf2u2jkTPmEyF9uiA client_baz; OiHNcxfhRFvomZn11_YqUw client_pub; # ... }
  • 30. Authentication (API keys) 30 # conf.d/api_gateway.conf #[upstreams here] server { listen 80; location / { if ($client_name = "") { return 401; } proxy_pass http://$upstream_api; proxy_set_header API-Client $client_name; limit_conn clientip 20; limit_req zone=10persec; } }
  • 31. Authentication (JSON Web Token) 31 # conf.d/api_gateway.conf #[upstreams here] server { listen 80; auth_jwt "private API"; auth_jwt_key_file jwk.json; location / { proxy_pass http://$upstream_api; proxy_set_header APIclient $jwt_claim_sub; limit_conn clientip 20; limit_req zone=10persec; } }
  • 32. Request tracing 32 # conf.d/api_gateway.conf #[upstreams here] server { listen 80; location / { proxy_pass http://$upstream_api; proxy_set_header RequestID $http_requestid; } } # Secure Proxy server { listen 443 ssl; #ssl_* # TLS configuration proxy_set_header RequestID $request_id; proxy_pass http://api_gateway; }
  • 34. If beer was a web app…
  • 35. nginx.com | @nginxnginx.com | @nginx liam@nginx.com @liamcrilly Thank you Merci