![Page 1: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/1.jpg)
BECOME THE MAESTROBECOME THE MAESTRO
MICROSERVICES ORCHESTRATION WITHMICROSERVICES ORCHESTRATION WITHKONG, GALILEO & GELATOKONG, GALILEO & GELATO
![Page 2: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/2.jpg)
WHO?WHO?
quick intro about myself
![Page 3: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/3.jpg)
GET /who HTTP/1.1Host: www.ahmadnassri.comAccept: application/json
HTTP/1.1 200 OKDate: Thu, 11 Feb 2016 10:00:00 CETContent-Type: application/json
{ "name": "Ahmad Nassri", "website": "ahmad.codes", "twitter": "@AhmadNassri", "city": "Toronto, Canada", "hometown": "Damascus, Syria", "bio": "Technologist, Entrepreneur, Dog Lover", "work": { "company": " ", "role": "VP, Engineering" }}
Mashape.com
AHMAD NASSRIAHMAD NASSRI
Live in Toronto, work in San Francisco / Silicon Valley.
![Page 4: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/4.jpg)
Adopted in every major industry including finance, healthcare, military, agriculture, insurance, government, media, e-commerce, retail, aviation, manufacturing and telecom.
![Page 5: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/5.jpg)
WARNINGWARNINGBIASED OPINIONS BEYOND THIS POINT ... DUH!BIASED OPINIONS BEYOND THIS POINT ... DUH!
YMMV
![Page 6: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/6.jpg)
MICROSERVICES?MICROSERVICES?
Martin Fowler - a definition of thisnew architectural term: bit.ly/ms-definition Microservice architecturepatterns and best practicesbit.ly/ms-patterns Resources & Reading Listbit.ly/ms-resources
if you're not familiar with microservices, here's your home work (links at the last slide)
![Page 7: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/7.jpg)
MICROSERVICESMICROSERVICESIN PRODUCTIONIN PRODUCTION
everybody talks about microservices, (the theory, the tooling, best practices, etc ...)
but you rarely see the complexity involved
![Page 8: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/8.jpg)
EXPECTATIONEXPECTATION
as a team starts to venture into building a new product, they might start thinking about the architectural design pattern and see it in abstract terms
![Page 9: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/9.jpg)
EXTENDED EXPECTATIONSEXTENDED EXPECTATIONS
as development intensifies, the initial theory quickly evolves, more microservices are discovered (they're like pokemons, new ones keep showing up!)
and throughout more tooling is introduced (cranes in pic)
![Page 10: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/10.jpg)
REALITY STRIKESREALITY STRIKES
the best laid plans of mice and men often go awry
![Page 11: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/11.jpg)
REALITY CHECKREALITY CHECK
in reality, microservices are huge in scale and require a lot of tooling and support
![Page 12: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/12.jpg)
UserService
MovieService
RatingService
SIMPLE MOVIESIMPLE MOVIERECCOMENDATIONSRECCOMENDATIONS
ReecoService
quick example
things start off simple
![Page 13: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/13.jpg)
UserService
MovieService
RatingService
SIMPLE MOVIESIMPLE MOVIERECCOMENDATIONS???RECCOMENDATIONS???
ReecoService
services have to talk to each other!
- mark movie as watched- check if movie exists before applying rating- check current user permissions
![Page 14: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/14.jpg)
SCALING SIMPLE MOVIESCALING SIMPLE MOVIERECCOMENDATIONSRECCOMENDATIONS
LB
LB LB
LB
enter load balancers, service registery and discovery tools
![Page 15: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/15.jpg)
GROWTH STAGEGROWTH STAGE
microservices quickly increase in number to serve different business functions
teams start forming around or from microservices and APIS
![Page 16: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/16.jpg)
REFACTOR!REFACTOR!
V2 V2 V2 V2
new hot shot joins the team, decides to re-write everything!
![Page 17: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/17.jpg)
DEPENDENCIES!DEPENDENCIES!
V2 V2 V2 V2
don't forget, services need to talk to each other
![Page 18: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/18.jpg)
SECURITY & AUTHENTICATIONSECURITY & AUTHENTICATION
V2 V2 V2 V2
security can be achieved on the network layer, but also through authentication to ensure user action impersonation
![Page 19: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/19.jpg)
LOGGING?LOGGING?
V2 V2 V2 V2
you wanna know what's going on, don't you?
and how about debugging a user transaction across all those microservices?
![Page 20: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/20.jpg)
BRAIN OVERLOAD!BRAIN OVERLOAD!
tables be flipping
![Page 21: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/21.jpg)
DONT REPEAT YOURSELFDONT REPEAT YOURSELF
LoggingLoad BalancingAuthenticationSecurityMonitoringRate Limiting...
D.R.Y
all common functionality and tooling should be extracted, including:
![Page 22: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/22.jpg)
ENTER KONGENTER KONG
V2 V2 V2 V2
GETKong.org
Kong is designed to solve the problem of abstracting common microservices & API management functionality
![Page 23: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/23.jpg)
WHAT IS KONG?WHAT IS KONG?
$ curl -X POST 127.0.0.1:8001/apis \ --data 'name=movies.v1' \ --data 'upstream_url=http://lb1.movies/' \ --data 'request_path=/v1/movies'
$ curl -X POST 127.0.0.1:8001/apis \ --data 'name=movies.v2' \ --data 'upstream_url=http://lb2.movies/' \ --data 'request_path=/v2/movies'
Open-source management layer for APIsBuilt with Nginx, OpenResty, LuaConfigurable Through a RESTful APIadd powerful functionality through plugins
kong nodes are stateless and horizontally scalable, with built-in auto-discovery and clustering
![Page 24: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/24.jpg)
KONG PLUGINSKONG PLUGINS
$ http POST :8001/apis/movies.v1/plugins \ name=loggly config.key=SECRET
$ http POST :8001/apis/movies.v1/plugins \ name=rate-limiting config.hour=500 config.minutes=100
$ http POST :8001/apis/movies.v1/plugins \ name=cors config.origin=* config.methods=GET,PUT
$ http POST :8001/apis/movies.v1/plugins \ name=galileo config.service_token=SECRET
$ http POST :8001/apis/movies.v1/plugins \ name=ssl config.cert=@/local/path/to/cert.pem \ config.key=@/local/path/to/cert.key
$ http POST :8001/apis/movies.v1/plugins \ name=oauth2 config.scopes=email,phone,address \ config.mandatory_scope=true
plugins are functional lua modules that are triggered at certain points during the request life-cycle with the ability to inspect, modify, and transform the request and response objects
(here I'm using HTTPie for the examples)
![Page 25: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/25.jpg)
SCENARIOSSCENARIOS
VPN Vendors
- as external facing api gateway- as internal microservices orchestration- as vendor shield- can even chain kong
![Page 26: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/26.jpg)
GALILEOGALILEO
The Analytics Platform for Monitoring, Visualizing andInspecting API & Microservice Traffic
![Page 27: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/27.jpg)
GAIN INSIGHTGAIN INSIGHT
Timeseries ChartsSee trends data down to the minute with
our timeseries charting that shows how
usage is changing and visually spot any
anomalies.
Error ViewKeep track of client and server errors and
who is causing them so you can debug and
handle the issue before it becomes a
problem.
![Page 28: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/28.jpg)
GAIN INSIGHTGAIN INSIGHT
Custom FilteringFilter the data down to exactly what you
care about and learn how clients are
requesting your services and how servers
are responding.
Consumer UsageGet a clear picture of an individual
consumers requests to figure out how they
are using your services and which
endpoints are most important.
![Page 29: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/29.jpg)
GELATOGELATO
Removes all the hassle of creating and maintainingtechnical docs, and makes onboarding developers easy
![Page 30: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/30.jpg)
GELATOGELATOAutomatic API Explorer, Markdown Editor, Developer Onboarding, Code
Generation, Import Swagger or API-blueprint
gelato is packed with features
![Page 31: Micro Services Orchestration with Kong, Galileo & Gelato](https://reader033.vdocuments.mx/reader033/viewer/2022042723/587a629b1a28ab8a2a8b4839/html5/thumbnails/31.jpg)
THANK YOUTHANK YOU
{ "speaker": { "name": "Ahmad Nassri", "website": "ahmad.codes", "twitter": "@AhmadNassri", "city": "Toronto, Canada", "bio": "Technologist, Entrepreneur, Dog Lover", "work": { "company": " ", "role": "VP, Engineering" } }, "links": [
"mashape.com", "bit.ly/ms-kgg", "bit.ly/ms-definition", "bit.ly/ms-patterns", "bit.ly/ms-resources" ]}
Mashape.com