SlideShare a Scribd company logo
1
Kong API Gateway
Chris Mague / Shokunin
04/12/2017
2
Today's Talk

The Problems

The Solution

The Technical Solution

The Caveats

The Improvements
3
The Problems
We need to get an handle on the API consumers
4
The Problems
We need to stop bad consumers from DOSing our API
5
The Problems
We need to better visibility into API usage
6
The Problems
We need real time information
7
Solution
Add a proxy in front of our APIs
8
Technical Solution
9
Features - Authentication
- Basic Auth
- KeyAuth
- Oauth/Oauth2
- LDAP
- JWT
10
Features - Security
- ACLs
- CORS
- Dynamic SSL
- IP Blacklists
- Bot Detection
11
Features - Control
- Rate Limiting
- Response Rate Limiting
- Request size limiting
12
Features - Transforms
- Request Transformer
- Response Transformer
- Correlation ID
13
Features - Visibility
- Logs over TCP/UDP/HTTP
- Syslog
- StatsD
- DataDog
- Runscope (Perf/Mon)
- Galileo (BI for API)
14
Considerations
- Open source
- Built on trusted technology
- Easy to extend
- No licensing costs
- Clusters
- Caches
- Easy to automate
15
Architecture
16
Internal
17
Cluster Architecture
18
Let’s Get Started
19
Spin Up testing environment
git clone https://github.com/shokunin/postgres-kong.git
20
Setup an Example API
curl -i -X POST 
--url http://localhost:8001/apis/ 
--data 'name=example-api' 
--data 'hosts=example.com' 
--data 'upstream_url=http://httpbin.org'
21
Test It
$ curl -s -v -o /dev/null -H "Host: example.com" localhost:8000
> Host: example.com
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 200 OK
<
< Via: kong/0.10.1
< X-Kong-Upstream-Latency: 330
< X-Kong-Proxy-Latency: 0
22
Setup the Authentication using Key-Auth plugin
curl -X POST http://localhost:8001/apis/example-api/plugins 
--data "name=key-auth" 
--data "config.hide_credentials=false"
23
Setup a Consumer
curl -X POST http://localhost:8001/consumers/ 
--data "username=customera" 
--data "custom_id=customer1"
24
Create an API Key for that Consumer
$ curl -s -X POST http://localhost:8001/consumers/customera/key-auth -d '' |jq
{
"created_at": 1491969396000,
"consumer_id": "a3cf9a17-99d4-4ba4-9a9e-7deef5a92565",
"key": "9e6e653339d2491fa8783d562f727c86",
"id": "71720951-0fe8-4ceb-b7fc-a80948198e32"
}
25
Test It
$ curl -s -v -H "Host: example.com" localhost:8000
> GET / HTTP/1.1
> Host: example.com
>
< HTTP/1.1 401 Unauthorized
< Server: kong/0.10.1
<
{"message":"No API key found in headers or querystring"}
26
Our API now requires a key
27
Test it with a key
$ curl -s -o /dev/null -v -H "apikey: 2a71fe89200d47f18dbd19790c9245d1"
-H "Host: example.com" localhost:8000
> GET / HTTP/1.1
> Host: example.com
> apikey: 2a71fe89200d47f18dbd19790c9245d1
>
< HTTP/1.1 200 OK
< Via: kong/0.10.1
< X-Kong-Upstream-Latency: 193
< X-Kong-Proxy-Latency: 50
28
Upstream Gets This Information
29
Get information about consumer
$ curl -s localhost:8001/consumers/customera |jq
{
"custom_id": "customer1",
"username": "customera",
"created_at": 1491969689000,
"id": "01ef7f1b-e8c6-4551-8564-c43d7cd91081"
}
30
Revoke a Consumer
$ curl -s -X DELETE localhost:8001/consumers/customera
$ curl -s localhost:8001/consumers/customera |jq
{
"message": "Not found"
}
31
Re-Test
$ curl -s -o /dev/null -v -H "apikey:
2a71fe89200d47f18dbd19790c9245d1" -H "Host: example.com"
localhost:8000
> GET / HTTP/1.1
> Host: example.com
> apikey: 2a71fe89200d47f18dbd19790c9245d1
>
< HTTP/1.1 403 Forbidden
< Server: kong/0.10.1
32
Rate Limiting
2 Ways to Rate Limit
- Rate Limiting
- Response Rate Limiting
33
Enable Rate Limiting
curl -X POST http://localhost:8001/apis/example-api/plugins 
--data "name=rate-limiting" 
--data "config.second=1" 
--data "config.minute=10" 
--data "config.limit_by=consumer" 
--data "config.policy=redis" 
--data "config.redis_host=redis" 
--data "config.redis_port=6380"
34
Rate Limiting
If the limit_by cannot be determined
Kong falls back to the IP address
WARNING
35
Test it
$ curl -s -o /dev/null -v -H "apikey: `cat /tmp/key`" -H "Host: example.com"
localhost:8000
*
> GET / HTTP/1.1
> Host: example.com
> apikey: 7abe611da2a640bb9492571568e1066f
>
< HTTP/1.1 200 OK
< X-RateLimit-Limit-second: 1
< X-RateLimit-Remaining-second: 0
< X-RateLimit-Limit-minute: 10
< X-RateLimit-Remaining-minute: 9
< Via: kong/0.10.1
< X-Kong-Upstream-Latency: 215
< X-Kong-Proxy-Latency: 300
36
Test it
$ curl -s -o /dev/null -v -H "apikey: `cat /tmp/key`" -H "Host:
example.com" localhost:8000
)
> GET / HTTP/1.1
> Host: example.com
> apikey: 7abe611da2a640bb9492571568e1066f
>
< HTTP/1.1 429
< X-RateLimit-Limit-second: 1
< X-RateLimit-Remaining-second: 0
< X-RateLimit-Limit-minute: 10
< X-RateLimit-Remaining-minute: 3
< Server: kong/0.10.1
37
What’s Actually Stored in Redis?
127.0.0.1:6380> keys "*"
1) "ratelimit:API_ID:CONSUMER_ID:1492038000000:hour"
2) "ratelimit:API_ID:CONSUMER_ID:1483228800000:year"
3) "ratelimit:API_ID:CONSUMER_ID:1491004800000:month"
4) "ratelimit:API_ID:CONSUMER_ID:1491955200000:day"
38
Rate Limit
127.0.0.1:6380> GET
"ratelimit:API_ID:CONSUMER_ID:1492041300000:minute"
"4"
127.0.0.1:6380> TTL
"ratelimit:API_ID:CONSUMER_ID:1492041300000:minute"
(integer) 10
39
Visibility
Who is doing what on my API?
40
Kong Feature – Custom NGINX config
41
Detailed Log Information
42
Real Time Stats Using Statsd
$ curl -X POST http://localhost:8001/apis/example-api/plugins 
--data "name=statsd" 
--data "config.host=192.168.0.220" 
--data "config.port=8125" 
--data "config.timeout=1000"
43
Dashboard Example
44
45
The Caveats
- Extra moving parts
- Learning Lua is a good idea
- Extra latency
- GUIs available but need work
46
The Improvements
- More custom plugins for better visibility
- Better monitoring (latency spikes/DB usage/Redis Usage)
- Move more to Response Rate Limiting
47
Thanks
- Mashape, Inc
- Zillow Group
- Jason Smith
- Zane Williamson

More Related Content

What's hot (20)

PPTX
Api gateway in microservices
Kunal Hire
 
PDF
Api presentation
Tiago Cardoso
 
PDF
Open API and API Management - Introduction and Comparison of Products: TIBCO ...
Kai Wähner
 
PDF
Introduction to CICD
Knoldus Inc.
 
PDF
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Edureka!
 
PDF
Designing APIs with OpenAPI Spec
Adam Paxton
 
PPTX
Introduction to Spring Framework
Serhat Can
 
PPTX
Azure API Management
Daniel Toomey
 
PDF
Building an API Security Strategy
SmartBear
 
PPTX
AWS - Lambda Fundamentals
Piyush Agrawal
 
PPTX
Rest API Security - A quick understanding of Rest API Security
Mohammed Fazuluddin
 
PDF
API Management - Why it matters!
Sven Bernhardt
 
PPTX
02 api gateway
Janani Velmurugan
 
PPTX
Fleet and elastic agent
Ismaeel Enjreny
 
PDF
AWS 상의 컨테이너 서비스 소개 ECS, EKS - 이종립 / Principle Enterprise Evangelist @베스핀글로벌
BESPIN GLOBAL
 
PDF
Container Network Interface: Network Plugins for Kubernetes and beyond
KubeAcademy
 
PPSX
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Araf Karsh Hamid
 
PDF
Amazon EKS로 간단한 웹 애플리케이션 구축하기 - 김주영 (AWS) :: AWS Community Day Online 2021
AWSKRUG - AWS한국사용자모임
 
PDF
Microservices & API Gateways
Kong Inc.
 
PPTX
What is an API Gateway?
LunchBadger
 
Api gateway in microservices
Kunal Hire
 
Api presentation
Tiago Cardoso
 
Open API and API Management - Introduction and Comparison of Products: TIBCO ...
Kai Wähner
 
Introduction to CICD
Knoldus Inc.
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Edureka!
 
Designing APIs with OpenAPI Spec
Adam Paxton
 
Introduction to Spring Framework
Serhat Can
 
Azure API Management
Daniel Toomey
 
Building an API Security Strategy
SmartBear
 
AWS - Lambda Fundamentals
Piyush Agrawal
 
Rest API Security - A quick understanding of Rest API Security
Mohammed Fazuluddin
 
API Management - Why it matters!
Sven Bernhardt
 
02 api gateway
Janani Velmurugan
 
Fleet and elastic agent
Ismaeel Enjreny
 
AWS 상의 컨테이너 서비스 소개 ECS, EKS - 이종립 / Principle Enterprise Evangelist @베스핀글로벌
BESPIN GLOBAL
 
Container Network Interface: Network Plugins for Kubernetes and beyond
KubeAcademy
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Araf Karsh Hamid
 
Amazon EKS로 간단한 웹 애플리케이션 구축하기 - 김주영 (AWS) :: AWS Community Day Online 2021
AWSKRUG - AWS한국사용자모임
 
Microservices & API Gateways
Kong Inc.
 
What is an API Gateway?
LunchBadger
 

Similar to Kong API Gateway (20)

PPTX
Fully Automate Application Delivery with Puppet and F5 - PuppetConf 2014
Puppet
 
PDF
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Ontico
 
PPTX
Oracle GoldenGate 18c - REST API Examples
Bobby Curtis
 
PDF
L’odyssée d’une requête HTTP chez Scaleway
Scaleway
 
PDF
Introduction to CloudStack API
Krunal Jain
 
PPTX
Working with PowerVC via its REST APIs
Joe Cropper
 
PPTX
ececloud Architecture for GWU\'s ECE 289 Class
Robert Daniel
 
PPTX
ececloud Architecture for GWU's ECE 289 Class
Robert Daniel
 
PDF
Bootstrapping multidc observability stack
Bram Vogelaar
 
PPTX
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
NGINX, Inc.
 
PDF
Manage your APIs and Microservices with an API Gateway
Thibault Charbonnier
 
PDF
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
Aman Kohli
 
PDF
Introduction to the Archivematica API (September 2018)
Artefactual Systems - Archivematica
 
PDF
MesosCon - Be a microservices hero
Dragos Dascalita Haut
 
PDF
Behavior Driven Development and Automation Testing Using Cucumber
KMS Technology
 
PDF
(Re)discover your AEM
Jakub Wadolowski
 
PPTX
API gateway setup
sivachandra mandalapu
 
PDF
Php version 7
RANVIJAY GAUR
 
PDF
[MBF2] Webinar API Orange Partner #1
BeMyApp
 
PPTX
Altitude San Francisco 2018: Programming the Edge
Fastly
 
Fully Automate Application Delivery with Puppet and F5 - PuppetConf 2014
Puppet
 
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Ontico
 
Oracle GoldenGate 18c - REST API Examples
Bobby Curtis
 
L’odyssée d’une requête HTTP chez Scaleway
Scaleway
 
Introduction to CloudStack API
Krunal Jain
 
Working with PowerVC via its REST APIs
Joe Cropper
 
ececloud Architecture for GWU\'s ECE 289 Class
Robert Daniel
 
ececloud Architecture for GWU's ECE 289 Class
Robert Daniel
 
Bootstrapping multidc observability stack
Bram Vogelaar
 
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
NGINX, Inc.
 
Manage your APIs and Microservices with an API Gateway
Thibault Charbonnier
 
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
Aman Kohli
 
Introduction to the Archivematica API (September 2018)
Artefactual Systems - Archivematica
 
MesosCon - Be a microservices hero
Dragos Dascalita Haut
 
Behavior Driven Development and Automation Testing Using Cucumber
KMS Technology
 
(Re)discover your AEM
Jakub Wadolowski
 
API gateway setup
sivachandra mandalapu
 
Php version 7
RANVIJAY GAUR
 
[MBF2] Webinar API Orange Partner #1
BeMyApp
 
Altitude San Francisco 2018: Programming the Edge
Fastly
 
Ad

Recently uploaded (20)

PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Biography of Daniel Podor.pdf
Daniel Podor
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Ad

Kong API Gateway

  • 1. 1 Kong API Gateway Chris Mague / Shokunin 04/12/2017
  • 2. 2 Today's Talk  The Problems  The Solution  The Technical Solution  The Caveats  The Improvements
  • 3. 3 The Problems We need to get an handle on the API consumers
  • 4. 4 The Problems We need to stop bad consumers from DOSing our API
  • 5. 5 The Problems We need to better visibility into API usage
  • 6. 6 The Problems We need real time information
  • 7. 7 Solution Add a proxy in front of our APIs
  • 9. 9 Features - Authentication - Basic Auth - KeyAuth - Oauth/Oauth2 - LDAP - JWT
  • 10. 10 Features - Security - ACLs - CORS - Dynamic SSL - IP Blacklists - Bot Detection
  • 11. 11 Features - Control - Rate Limiting - Response Rate Limiting - Request size limiting
  • 12. 12 Features - Transforms - Request Transformer - Response Transformer - Correlation ID
  • 13. 13 Features - Visibility - Logs over TCP/UDP/HTTP - Syslog - StatsD - DataDog - Runscope (Perf/Mon) - Galileo (BI for API)
  • 14. 14 Considerations - Open source - Built on trusted technology - Easy to extend - No licensing costs - Clusters - Caches - Easy to automate
  • 19. 19 Spin Up testing environment git clone https://github.com/shokunin/postgres-kong.git
  • 20. 20 Setup an Example API curl -i -X POST --url http://localhost:8001/apis/ --data 'name=example-api' --data 'hosts=example.com' --data 'upstream_url=http://httpbin.org'
  • 21. 21 Test It $ curl -s -v -o /dev/null -H "Host: example.com" localhost:8000 > Host: example.com > User-Agent: curl/7.47.0 > Accept: */* > < HTTP/1.1 200 OK < < Via: kong/0.10.1 < X-Kong-Upstream-Latency: 330 < X-Kong-Proxy-Latency: 0
  • 22. 22 Setup the Authentication using Key-Auth plugin curl -X POST http://localhost:8001/apis/example-api/plugins --data "name=key-auth" --data "config.hide_credentials=false"
  • 23. 23 Setup a Consumer curl -X POST http://localhost:8001/consumers/ --data "username=customera" --data "custom_id=customer1"
  • 24. 24 Create an API Key for that Consumer $ curl -s -X POST http://localhost:8001/consumers/customera/key-auth -d '' |jq { "created_at": 1491969396000, "consumer_id": "a3cf9a17-99d4-4ba4-9a9e-7deef5a92565", "key": "9e6e653339d2491fa8783d562f727c86", "id": "71720951-0fe8-4ceb-b7fc-a80948198e32" }
  • 25. 25 Test It $ curl -s -v -H "Host: example.com" localhost:8000 > GET / HTTP/1.1 > Host: example.com > < HTTP/1.1 401 Unauthorized < Server: kong/0.10.1 < {"message":"No API key found in headers or querystring"}
  • 26. 26 Our API now requires a key
  • 27. 27 Test it with a key $ curl -s -o /dev/null -v -H "apikey: 2a71fe89200d47f18dbd19790c9245d1" -H "Host: example.com" localhost:8000 > GET / HTTP/1.1 > Host: example.com > apikey: 2a71fe89200d47f18dbd19790c9245d1 > < HTTP/1.1 200 OK < Via: kong/0.10.1 < X-Kong-Upstream-Latency: 193 < X-Kong-Proxy-Latency: 50
  • 28. 28 Upstream Gets This Information
  • 29. 29 Get information about consumer $ curl -s localhost:8001/consumers/customera |jq { "custom_id": "customer1", "username": "customera", "created_at": 1491969689000, "id": "01ef7f1b-e8c6-4551-8564-c43d7cd91081" }
  • 30. 30 Revoke a Consumer $ curl -s -X DELETE localhost:8001/consumers/customera $ curl -s localhost:8001/consumers/customera |jq { "message": "Not found" }
  • 31. 31 Re-Test $ curl -s -o /dev/null -v -H "apikey: 2a71fe89200d47f18dbd19790c9245d1" -H "Host: example.com" localhost:8000 > GET / HTTP/1.1 > Host: example.com > apikey: 2a71fe89200d47f18dbd19790c9245d1 > < HTTP/1.1 403 Forbidden < Server: kong/0.10.1
  • 32. 32 Rate Limiting 2 Ways to Rate Limit - Rate Limiting - Response Rate Limiting
  • 33. 33 Enable Rate Limiting curl -X POST http://localhost:8001/apis/example-api/plugins --data "name=rate-limiting" --data "config.second=1" --data "config.minute=10" --data "config.limit_by=consumer" --data "config.policy=redis" --data "config.redis_host=redis" --data "config.redis_port=6380"
  • 34. 34 Rate Limiting If the limit_by cannot be determined Kong falls back to the IP address WARNING
  • 35. 35 Test it $ curl -s -o /dev/null -v -H "apikey: `cat /tmp/key`" -H "Host: example.com" localhost:8000 * > GET / HTTP/1.1 > Host: example.com > apikey: 7abe611da2a640bb9492571568e1066f > < HTTP/1.1 200 OK < X-RateLimit-Limit-second: 1 < X-RateLimit-Remaining-second: 0 < X-RateLimit-Limit-minute: 10 < X-RateLimit-Remaining-minute: 9 < Via: kong/0.10.1 < X-Kong-Upstream-Latency: 215 < X-Kong-Proxy-Latency: 300
  • 36. 36 Test it $ curl -s -o /dev/null -v -H "apikey: `cat /tmp/key`" -H "Host: example.com" localhost:8000 ) > GET / HTTP/1.1 > Host: example.com > apikey: 7abe611da2a640bb9492571568e1066f > < HTTP/1.1 429 < X-RateLimit-Limit-second: 1 < X-RateLimit-Remaining-second: 0 < X-RateLimit-Limit-minute: 10 < X-RateLimit-Remaining-minute: 3 < Server: kong/0.10.1
  • 37. 37 What’s Actually Stored in Redis? 127.0.0.1:6380> keys "*" 1) "ratelimit:API_ID:CONSUMER_ID:1492038000000:hour" 2) "ratelimit:API_ID:CONSUMER_ID:1483228800000:year" 3) "ratelimit:API_ID:CONSUMER_ID:1491004800000:month" 4) "ratelimit:API_ID:CONSUMER_ID:1491955200000:day"
  • 38. 38 Rate Limit 127.0.0.1:6380> GET "ratelimit:API_ID:CONSUMER_ID:1492041300000:minute" "4" 127.0.0.1:6380> TTL "ratelimit:API_ID:CONSUMER_ID:1492041300000:minute" (integer) 10
  • 39. 39 Visibility Who is doing what on my API?
  • 40. 40 Kong Feature – Custom NGINX config
  • 42. 42 Real Time Stats Using Statsd $ curl -X POST http://localhost:8001/apis/example-api/plugins --data "name=statsd" --data "config.host=192.168.0.220" --data "config.port=8125" --data "config.timeout=1000"
  • 44. 44
  • 45. 45 The Caveats - Extra moving parts - Learning Lua is a good idea - Extra latency - GUIs available but need work
  • 46. 46 The Improvements - More custom plugins for better visibility - Better monitoring (latency spikes/DB usage/Redis Usage) - Move more to Response Rate Limiting
  • 47. 47 Thanks - Mashape, Inc - Zillow Group - Jason Smith - Zane Williamson