Building Scalable API Gateways For
Microservices
Saurabh Badhwar
What are Microservices?
Microservices
Product Info
Service
Recommender
Service
Cart Service
Database
Database
Database
Client
Everything sounds good…
So, where is the problem?
What if…
Number of services: >20
Different devices need to be supported
What problems do we face
Difficult to support new devices
??
What problems do we face
Poor Protocol Support on Some Devices
HTTP
AMQP
What problems do we face
Problematic API Upgrades
v1 v2
??
What problems do we face
Maintaining Security
What problems do we face
Difficult to support new devices
Poor protocol support on some devices
Problematic API Upgrades
Maintaining Security
API Gateways to our rescue
What are API Gateways
Product Info
Service
Recommender
Service
Cart Service
API GatewayClient
What API Gateways offer to us?
API Gateways
Filter for different devices
A single entry point
Mechanism for API Rate Limiting
Security Mechanism
API Gateways: The Benefits
Increased simplicity
Separation b/w application layer and requesting parties
Limiting the requests
Prevention from attacks
API Gateways : Getting
them to scale
Fail Fast
Limit Requests
Cache your requests
Log log log!!!
Upgrade Strategically
Fail Fast
Product Info
Service
Recommender
Service
Cart Service
API GatewayClient
4ms
5ms
60ms
~60ms
Your API Response is as fast as your
slowest service
Limit Requests
Cache your requests
API GatewayClient Service
Cache
API Gateways: Going
towards deployment
Delay major version
changes
Utilize Blue-Green
Deployments
Test your changes
Blue Green Deployments
Router
Blue
Green
Log Log Log!!!
“Hidden in those
bunch of lines is the
gold that you are
looking for ;)”
Tools at our disposal
Jenkins
Tools at our disposal
Kubernetes
Tools at our disposal
Apache Grafana
Tools at our disposal
Docker
Thank You :)
Twitter: @MYNET55
IRC & Github: h4xr
E-Mail ID:
saurabh@linux.com
Q&A

Building Scalable API Gateways for Microservices