Upgrade to Pro — share decks privately, control downloads, hide ads and more …

API Gateway in Microservice Architecture

0b0ba94d014c694b932ada74f1c9f1af?s=47 forLoop
September 03, 2016

API Gateway in Microservice Architecture

Ridwan Olalere, A software developer at PaywithCapture talked about why and how they implemented API gateway in their microservice architecture



September 03, 2016


  1. API Gateway in Microservice Architecture Ridwan Olalere

  2. Microservices Architecture

  3. Microservices before API Gateway

  4. Constraints • Spaghetti Integration • Unnecessary payload to clients •

    Client changes every time there is a change in any of the microservices • Tight coupling • Impossible to move fast • Latency problems for mobile clients • Multiple round trips for mobile clients • Excess network calls Complex setup
  5. Then came BFF as a solution

  6. What is an API Gateway ? An application layer/edge service

    that can manage client interaction with a cluster of APIs. A BFF described in the previous slide is a kind of API gateway Features of API Gateways. 1. Routing 2. Authentication 3. Rate Limiting 4. Caching 5. Dependency resolution 6. Response filtering 7. Request/Response Intercept 8. Granular control and logging 9. Response composition 10. Load balancing 11. Service discovery
  7. API Gateways

  8. New Entrant → Bruff Express An API gateway built on

    Nodejs as an express middleware. https://github.com/darilldrems/bruff-express Features • Routing • Request Interceptor • Response Matching • Request dependency resolution • Response filtering • Response caching • Extensible NB: since bruff is an express middleware, you can have other middleware mapped before bruff for other functions like authentication.
  9. A simple Bruff config

  10. Experience using bruff • Its simple to use • It

    makes client apps really fast • It allowed us build core microservices for everyone • Fast delivery of composite APIs
  11. Limitations with bruff • No circuit breaker • No Authentication

    layer • Does not support logging yet
  12. None