SlideShare a Scribd company logo
Thibault Charbonnier
Kong Lead Engineer @ Mashape
1
Manage your APIs and
Microservices with an API
Gateway
03/30/2017 - Swagger & Kong meetup @ Mashape HQ
2
Summary
1. Why an API Gateway?
2. Kong
3. Demo
4. Kong 0.10
03/30/2017 - Swagger & Kong meetup @ Mashape HQ
Why an API Gateway?
3
Why an API Gateway?
Building vs Running an API
4
Why an API Gateway?
It’s a reverse proxy, sitting between your clients and your upstream services
5
Why an API Gateway?
6
Monolithic vs Microservices
7
https://github.com/Mashape/kong https://getkong.org/plugins/
Kong Overview
8
9
Kong Overview - Stack
NGINX
lua-nginx-module
Kong
C
Lua
(but really, LuaJIT)
OpenResty(Lua libraries)
Kong PluginsCommunity Plugins
ngx_http_proxy_module
Kong Overview - Datacenter architecture
10
PostgreSQL
K
Microservice A
K
K
Microservice B
Microservice C
Internal API
LBClient
Kong Overview - Multi-datacenter architecture
11
us-west-1 us-east-1
Cassandra Cassandra
K K K K K K
Microservice
A
Microservice
B
Microservice
C
Microservice
A
Microservice
B
Microservice
C
LB LB
Demo
12
13
$ kong version
0.10.1
$ kong start
Demo
1. Start Kong
2. Add an API
3. Apply a plugin on it
4. Make an API call
14
$ curl -i -X POST http://localhost:8001/apis/ 
-d "name=example" 
-d "upstream_url=http://httpbin.org" 
-d "hosts=example.org"
Demo
Step 1: add an API
Here, we are calling the Admin API Server (port 8001)
15
$ curl -i -X POST http://localhost:8001/apis/example/plugins/ 
-d "name=request-transformer" 
-d "config.add.headers=x-new-header:foo"
Demo
Step 2: apply a plugin
Here, we are calling the Admin API Server (port 8001)
16
$ curl -i http://localhost:8000/get 
-H "Host: example.org"
Demo
Step 3: make an API call
Notice how this request is going through the Proxy Server (port 8000)
Kong 0.10
- Dynamic load balancing
- Coupled with DNS resolution (A & SRV records)
- Flexible routing
- AWS Lambda plugin
- Performance improvements
https://github.com/Mashape/kong/releases/tag/0.10.0
17
Demo - 0.10
18
19
$ curl -i -X POST http://localhost:8001/upstreams/ 
-d "name=httpbin.org"
Demo 0.10
Step 1: add an Upstream Object
20
$ curl -i -X POST 
--url http://localhost:8001/upstreams/httpbin.org/targets 
-d "target=<ip>:<port>" 
-d "weight=100" 
Demo 0.10
Step 2: add Targets to the Upstream
21
$ curl -i http://localhost:8000/get 
-H "Host: example.org"
Demo 0.10
Step 3: make an API call with load balancing
Thank you!
22
Questions?
https://getkong.org
https://www.mashape.com
https://github.com/Mashape/kong
03/30/2017 - Swagger & Kong meetup @ Mashape HQ

More Related Content

PDF
Introduction to Kong API Gateway
PPTX
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
PDF
Kong API
PDF
Mastering Microservices with Kong (CodeMotion 2019)
PDF
API Gateway study
PDF
API Gateway report
PDF
Kuberntes Ingress with Kong
Introduction to Kong API Gateway
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
Kong API
Mastering Microservices with Kong (CodeMotion 2019)
API Gateway study
API Gateway report
Kuberntes Ingress with Kong

What's hot (20)

PPTX
API Gateway: Nginx way
ODP
Kong API Gateway
PDF
APIdays Singapore 2019 - Blowing Up the Monolith: Adopting a Modern API Strat...
PDF
Mastering Microservices with Kong (DevoxxUK 2019)
PPTX
Api gateway in microservices
PDF
Flexible, hybrid API-led software architectures with Kong
PPTX
Gatekeeper: API gateway
PPTX
Using an API Gateway for Microservices
PDF
Ambassador Kubernetes-Native API Gateway
PPTX
Kubernetes + netflix oss
PDF
Deploying Kong with Mesosphere DC/OS
PDF
Practical tips and tricks for Apache Kafka messages integration | Francesco T...
PDF
Exposing and Controlling Kafka Event Streaming with Kong Konnect Enterprise |...
PDF
Spring Cloud and Netflix OSS overview v1
PDF
The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...
PDF
Microservices & API Gateways
PPTX
Cloudsolutionday 2016: Docker & FAAS at getvero.com
PPTX
Microservice: starting point
PDF
Kubernetes: The evolution of distributed systems | DevNation Tech Talk
PDF
WTF Do We Need a Service Mesh?
API Gateway: Nginx way
Kong API Gateway
APIdays Singapore 2019 - Blowing Up the Monolith: Adopting a Modern API Strat...
Mastering Microservices with Kong (DevoxxUK 2019)
Api gateway in microservices
Flexible, hybrid API-led software architectures with Kong
Gatekeeper: API gateway
Using an API Gateway for Microservices
Ambassador Kubernetes-Native API Gateway
Kubernetes + netflix oss
Deploying Kong with Mesosphere DC/OS
Practical tips and tricks for Apache Kafka messages integration | Francesco T...
Exposing and Controlling Kafka Event Streaming with Kong Konnect Enterprise |...
Spring Cloud and Netflix OSS overview v1
The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...
Microservices & API Gateways
Cloudsolutionday 2016: Docker & FAAS at getvero.com
Microservice: starting point
Kubernetes: The evolution of distributed systems | DevNation Tech Talk
WTF Do We Need a Service Mesh?
Ad

Similar to Manage your APIs and Microservices with an API Gateway (20)

PDF
Kong API Gateway.pdf
PDF
Kong Workshop.pdf
PDF
Kong 101 - Jumpstart into the world of APIs
PDF
Kong session, CloudNative Days Tokyo 2021
PPTX
KONG-APIGateway.pptx
PDF
Kонструируем микросервисную архитектуру на Symfony и связываем с Kong
PDF
Microservice API Gateways with NGINX
PDF
Proxies, gateways, and meshes cloud connectivity patterns for developers
PDF
APIs: Intelligent Routing, Security, & Management
PDF
WSO2 API microgateway introduction
PDF
AWS Api Gateway by Łukasz Marchewka Scalacc
PPT
Mule esb api layer
PPT
Mule esb api layer
PPT
Api Layer
PPT
Mule esb api layer
PDF
Managing Multi-Platform and Multi-Region APIs with Kong Konnect and AWS
PDF
Deploy and Secure Your API Gateway with NGINX: From Zero to Hero – APCJ
PPTX
AWS Summit Barcelona 2015 - Introducing Amazon API Gateway
PPT
Mule esb api layer
PPT
Mule esb api layer
Kong API Gateway.pdf
Kong Workshop.pdf
Kong 101 - Jumpstart into the world of APIs
Kong session, CloudNative Days Tokyo 2021
KONG-APIGateway.pptx
Kонструируем микросервисную архитектуру на Symfony и связываем с Kong
Microservice API Gateways with NGINX
Proxies, gateways, and meshes cloud connectivity patterns for developers
APIs: Intelligent Routing, Security, & Management
WSO2 API microgateway introduction
AWS Api Gateway by Łukasz Marchewka Scalacc
Mule esb api layer
Mule esb api layer
Api Layer
Mule esb api layer
Managing Multi-Platform and Multi-Region APIs with Kong Konnect and AWS
Deploy and Secure Your API Gateway with NGINX: From Zero to Hero – APCJ
AWS Summit Barcelona 2015 - Introducing Amazon API Gateway
Mule esb api layer
Mule esb api layer
Ad

More from Thibault Charbonnier (6)

PDF
Kong in 1.x Territory
PDF
Layered caching in OpenResty (OpenResty Con 2018)
PDF
Layered Caching in OpenResty
PDF
A Kong retrospective: from 0.10 to 0.13
PDF
Developing a user-friendly OpenResty application
PDF
A Cassandra driver from and for the Lua community
Kong in 1.x Territory
Layered caching in OpenResty (OpenResty Con 2018)
Layered Caching in OpenResty
A Kong retrospective: from 0.10 to 0.13
Developing a user-friendly OpenResty application
A Cassandra driver from and for the Lua community

Recently uploaded (20)

PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
System and Network Administration Chapter 2
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
ai tools demonstartion for schools and inter college
PPTX
Transform Your Business with a Software ERP System
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
L1 - Introduction to python Backend.pptx
PDF
AI in Product Development-omnex systems
PPTX
Online Work Permit System for Fast Permit Processing
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
medical staffing services at VALiNTRY
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
System and Network Administraation Chapter 3
Which alternative to Crystal Reports is best for small or large businesses.pdf
System and Network Administration Chapter 2
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Odoo Companies in India – Driving Business Transformation.pdf
ai tools demonstartion for schools and inter college
Transform Your Business with a Software ERP System
VVF-Customer-Presentation2025-Ver1.9.pptx
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
L1 - Introduction to python Backend.pptx
AI in Product Development-omnex systems
Online Work Permit System for Fast Permit Processing
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Upgrade and Innovation Strategies for SAP ERP Customers
medical staffing services at VALiNTRY
Wondershare Filmora 15 Crack With Activation Key [2025
2025 Textile ERP Trends: SAP, Odoo & Oracle
Operating system designcfffgfgggggggvggggggggg
How to Choose the Right IT Partner for Your Business in Malaysia
System and Network Administraation Chapter 3

Manage your APIs and Microservices with an API Gateway