Thibault Charbonnier presented on using Kong as an API gateway to manage APIs and microservices. He began with an overview of why an API gateway is useful both for building and running APIs. He then demonstrated Kong, including adding an API, applying a plugin, and making a request through the gateway. Finally, he discussed new features in Kong 0.10 like dynamic load balancing and the AWS Lambda plugin.
%in Midrand+277-882-255-28 abortion pills for sale in midrand
Manage your APIs and Microservices with an API Gateway
1. 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. 2
Summary
1. Why an API Gateway?
2. Kong
3. Demo
4. Kong 0.10
03/30/2017 - Swagger & Kong meetup @ Mashape HQ
9. 9
Kong Overview - Stack
NGINX
lua-nginx-module
Kong
C
Lua
(but really, LuaJIT)
OpenResty(Lua libraries)
Kong PluginsCommunity Plugins
ngx_http_proxy_module
10. Kong Overview - Datacenter architecture
10
PostgreSQL
K
Microservice A
K
K
Microservice B
Microservice C
Internal API
LBClient
11. 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
13. 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. 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. 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. 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)
17. 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