BEcome THE MAESTRO

MICROSERVICES ORCHESTRATION WITH KONG, GALILEO & GELATO

Who?

Ahmad Nassri

GET /who HTTP/1.1
Host: www.ahmadnassri.com
Accept: application/json

HTTP/1.1 200 OK
Date: Thu, 11 Feb 2016 10:00:00 CET
Content-Type: application/json

{
  "name": "Ahmad Nassri",
  "website": "ahmad.codes",
  "twitter": "@AhmadNassri",
  "city": "Toronto, Canada",
  "hometown": "Damascus, Syria",
  "bio": "Technologist, Entrepreneur, Dog Lover",
  "work": {
    "company": "Mashape.com",
    "role": "VP, Engineering"
  }
}

WARNING

Biased Opinions Beyond this point ... duh!

MicroServices?

  • Martin Fowler - a definition of this new architectural term: 
    bit.ly/ms-definition

     
  • Microservice architecture patterns and best practices
    bit.ly/ms-patterns
     
  • Resources & Reading List
    bit.ly/ms-resources

Microservices
in Production

Expectation

Extended Expectations

Reality Strikes

Reality Check

User

Service

Movie Service

Rating

Service

Simple Movie Reccomendations

Reeco

Service

User

Service

Movie Service

Rating

Service

simple Movie Reccomendations???

Reeco

Service

Scaling Simple Movie Reccomendations

LB

LB

LB

LB

Growth STAGE

REFACTOR!

V2

V2

V2

V2

dependencies!

V2

V2

V2

V2

Security & Authentication

V2

V2

V2

V2

Logging?

V2

V2

V2

V2

BRAIN OVERLOAD!

DONT REPEAT YOURSELF

  • Logging
  • Load Balancing
  • Authentication
  • Security
  • Monitoring
  • Rate Limiting
  • ...

Enter Kong

V2

V2

V2

V2

GETKong.org

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 APIs
  • Built with Nginx, OpenResty, Lua
  • Configurable Through a RESTful API
  • add powerful functionality through plugins 

Kong 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

Scenarios

VPN

Vendors

GALILEO

The Analytics Platform for Monitoring, Visualizing and Inspecting API & Microservice Traffic

GAIN Insight

Timeseries Charts

See trends data down to the minute with our timeseries charting that shows how usage is changing and visually spot any anomalies.

Error View

Keep track of client and server errors and who is causing them so you can debug and handle the issue before it becomes a problem.

GAIN Insight

Custom Filtering

Filter the data down to exactly what you care about and learn how clients are requesting your services and how servers are responding.

Consumer Usage

Get a clear picture of an individual consumers requests to figure out how they are using your services and which endpoints are most important.

Gelato

Removes all the hassle of creating and maintaining technical docs, and makes onboarding developers easy

Gelato

Automatic API Explorer, Markdown Editor, Developer Onboarding, Code Generation, Import Swagger or API-blueprint

Thank you

{
  "speaker": {
    "name": "Ahmad Nassri",
    "website": "ahmad.codes",
    "twitter": "@AhmadNassri",
    "city": "Toronto, Canada",
    "bio": "Technologist, Entrepreneur, Dog Lover",
    "work": {
      "company": "Mashape.com",
      "role": "VP, Engineering"
    }
  },
  "links": [
    "mashape.com",
    "bit.ly/ms-kgg",
    "bit.ly/ms-definition",
    "bit.ly/ms-patterns",
    "bit.ly/ms-resources"
  ]
}
Made with Slides.com