SlideShare a Scribd company logo
Web API Gateway
Kumaresh Chandra Baruri
Software Engineer
Terminologies
• Service: The unit/part of software which performs
some specific operation or task is known as Service.
• Microservice: This is software development
technique that structures the software/application
into a collection of finely-grained services. These
services are –
 Loosely coupled with others.
 Self-contained.
Terminologies(Cont…)
• API: An API is a set of definitions and protocols
for building and integrating application software.
API is used to –
 Allow its services to other application or services.
 Provides different methods – POST, GET, UPDATE etc
to accomplish desired operations.
API Endpoints & Accessing Criteria
/home /wallpaper/list
/wallpaper/details? id={id}
/product/list
Authentication Authentication
Authorization
SSL Certificate
1 2 3
Business
logic is
defined in all
the API
endpoints
Here few sample API endpoints are defined and in order to
consume these -
• Group #1 can be accessed directly.
• Group #2 requires authentication.
• Group #3 needs both authentication and authorization.
• All the APIs are secured by using SSL certificate.
Conventional Way of API Consumption
/home
/wallpaper/list
/wallpaper/details?id={id}
/product/list
 4 endpoints are available here.
Different users from Android phone, iPhone or
Web browsers are accessing API directly.
Authentication, authorization or both needs to
ensure before calling an API from the consumer.
Business logic
Conventional Way of API Consumption(cont..)
1
2
3
4To accomplish a single tasks, 4 API calls
are being performed here.
Issues of Conventional Calling
In case of direct access to the API from known and unknown
consumers, the security issues will be raised-
 It will be publicly exposed.
 Would be easier for the cracker to find out
business logic.
Issues of Conventional Calling(cont..)
If multiple API calls and their resultant aggregation is required to
accomplish a single task at frontend application, it leads to -
 Higher latency
 Slower performance.
Issues of Conventional Calling(cont..)
Required authentication and/or authorization, security need to
ensure for all the associated APIs and consequently
Along with business logic, it is very essential to include 3 additional
Components for the defined API-
1. Authentication
2. Authorization based on user roles.
3. SSL certificates and their rotational changes.
Target
The intention of these slides is to separate out 3 additional
components from business logic into a separate component called-
API Gateway
A software component which acts as an entry point to
access API for consuming services. This is basically a new
microservice.
Middle layer
between consumer
and APIs
API Gateway Components
API Gateway
Security
Authentication
Authorization
Forward
Request
After satisfying the required criteria of the target API, request will be forwarded.
API Gateway as Middle Layer
API
Gateway
Mobile application
request & response
Web application
Request & response
API gateway is a revere proxy
Gateway Confirms Security
Gateway
Private IP
Private IP
Private IP
Public IP
Secured network
Only one public IP of gateway is available to the
consumer which enhances the security.
Gateway Lowers the Latency
Gateway
Latency will be reduced through-
1. Frontend application sends one request to API gateway.
2. Gateway will collect data from multiple services, aggregate and
finally sends to the consumer.
3. Viewmodel or an adapter at gateway will hold aggregated
data(response) to send back to the consumer.
4. Will have improved latency for the request-response feedback.
1
2
3
Response = Data 1+ Data 2+ Data 3
Request
Gateway Authentication and Authorization
Without gateway, it needs to ensure authentication and authorization for all the APIs
so that lots of duplicate code needs to write in the API along with business logic.
Gateway ensures that
integration in a single place.
Gateway Makes Easier Service Discovery
1. API definition is exposed to Gateway only.
2. In case of any changes in API definition, only needs to change
in Gateway. This makes loose coupling with different
consumer.
3. Enhances service discovery integration via Gateway.
Response Caching at Gateway
1. Response caching can be implemented at Gateway by
implementing cross cutting concerns.
2. Clean codes within the Microservices.
3. In case of repeating request, API gateway will send response
from Cache rather than calling the services once again.
Different Types Of Protocols
Gateway
Unsupported protocols of client
request is handled by Gateway to
access the right microservice.
Websocket
http-1
http-2
http-1
HTTP-2
Other Facilities of Gateway
1. Retry or circuit breaker policy can be implemented in case of any failure to
get response from microservices.
2. API access limit can be handled from Gateway to avoid repeated and a
threshold number of connection in a certain period.
3. Gateway can be worked as a load balancer to handle multiple requests.
4. Event logger could be integrated at Gateway.
5. Query transformation is accomplished at Gateway.
6. White/black listed Ips are handled from Gateway.
Drawbacks of API Gateway
Gateway is a single entry point and in case of
any failure, entire application will not work.
In order to avoid Gateway failure,
1. It needs to publish multiple Gateway instances to make available for
24X7.
2. Load balancer can be used to handle requests from different instances.
API Gateway Tools
1. Kong: https://github.com/Kong/kong
2. Ambassador: https://www.getambassador.io/products/api-gateway/
3. Ocelot: https://github.com/ThreeMammals/Ocelot
WEB API Gateway

More Related Content

PPT
Domain Driven Design (DDD)
PDF
Deploy Application on Kubernetes
PPTX
02 api gateway
PPTX
Domain Driven Design
PPTX
Api gateway in microservices
PPT
Domain Driven Design Demonstrated
PPT
Effective API Gateway
PPTX
Domain Driven Design
Domain Driven Design (DDD)
Deploy Application on Kubernetes
02 api gateway
Domain Driven Design
Api gateway in microservices
Domain Driven Design Demonstrated
Effective API Gateway
Domain Driven Design

What's hot (20)

PPSX
Microservices Docker Kubernetes Istio Kanban DevOps SRE
PDF
Solid principles
PPTX
Introduction to DDD
PPTX
Kubernetes #1 intro
PPTX
Event-driven microservices
PDF
Deep dive into Kubernetes Networking
PPTX
Docker Kubernetes Istio
PPTX
Kubernetes PPT.pptx
PPTX
Microservice vs. Monolithic Architecture
PDF
Migrate to the Latest WSO2 Micro Integrator to Unlock All-new Features
PDF
Spring Framework - AOP
PDF
Api Gateway
PDF
PDF
Autoscaling Kubernetes
PPTX
Domain Driven Design Quickly
PDF
CI:CD in Lightspeed with kubernetes and argo cd
PDF
Gitops: the kubernetes way
PDF
Deploy 22 microservices from scratch in 30 mins with GitOps
PPTX
Building a scalable microservice architecture with envoy, kubernetes and istio
PDF
GitOps with ArgoCD
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Solid principles
Introduction to DDD
Kubernetes #1 intro
Event-driven microservices
Deep dive into Kubernetes Networking
Docker Kubernetes Istio
Kubernetes PPT.pptx
Microservice vs. Monolithic Architecture
Migrate to the Latest WSO2 Micro Integrator to Unlock All-new Features
Spring Framework - AOP
Api Gateway
Autoscaling Kubernetes
Domain Driven Design Quickly
CI:CD in Lightspeed with kubernetes and argo cd
Gitops: the kubernetes way
Deploy 22 microservices from scratch in 30 mins with GitOps
Building a scalable microservice architecture with envoy, kubernetes and istio
GitOps with ArgoCD
Ad

Similar to WEB API Gateway (20)

PPTX
Introduction to AWS API Gateway Presentation
PPTX
Api gateway : To be or not to be
PDF
Api gateway
PPTX
Api gateways
PDF
API Gateway How-To: The Many Ways to Apply the Gateway Pattern
PDF
Study Notes - Using an API Gateway
PPTX
Intro to Microservices Architecture
PPTX
AWS API Gateway
PDF
[Workshop] API-driven Integration
PDF
API Gateway report
PPT
Mule esb api layer
PPT
Mule esb api layer
PPT
Api Layer
PPT
Mule esb api layer
PDF
WSO2 API microgateway introduction
PDF
APIGATEWAY in Microservices
PDF
Uncover the Flex Gateway with a Demonstration (1).pdf
PDF
Uncover the Flex Gateway with a Demonstration (1).pdf
PDF
Getting Started with API Management
PPTX
API_Gateways_&_API_Security-1(API Securities and Gateway).pptx
Introduction to AWS API Gateway Presentation
Api gateway : To be or not to be
Api gateway
Api gateways
API Gateway How-To: The Many Ways to Apply the Gateway Pattern
Study Notes - Using an API Gateway
Intro to Microservices Architecture
AWS API Gateway
[Workshop] API-driven Integration
API Gateway report
Mule esb api layer
Mule esb api layer
Api Layer
Mule esb api layer
WSO2 API microgateway introduction
APIGATEWAY in Microservices
Uncover the Flex Gateway with a Demonstration (1).pdf
Uncover the Flex Gateway with a Demonstration (1).pdf
Getting Started with API Management
API_Gateways_&_API_Security-1(API Securities and Gateway).pptx
Ad

More from Kumaresh Chandra Baruri (9)

PPTX
Introduction to OAuth2
PPTX
Introduction to git, a version control system
PDF
Test Driven Development
PDF
Fundamentasl of DFD
PPTX
Variations of git merging
PPTX
Git branching policy and review comment's prefix
PPTX
Introduction to flutter's basic concepts
PPTX
Model based testing using finite state machine(FSM)
PPTX
Authentication and single sign on (sso)
Introduction to OAuth2
Introduction to git, a version control system
Test Driven Development
Fundamentasl of DFD
Variations of git merging
Git branching policy and review comment's prefix
Introduction to flutter's basic concepts
Model based testing using finite state machine(FSM)
Authentication and single sign on (sso)

Recently uploaded (20)

PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
System and Network Administration Chapter 2
PDF
Digital Strategies for Manufacturing Companies
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
Online Work Permit System for Fast Permit Processing
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
Introduction to Artificial Intelligence
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
AI in Product Development-omnex systems
PDF
System and Network Administraation Chapter 3
PDF
Nekopoi APK 2025 free lastest update
PPTX
L1 - Introduction to python Backend.pptx
ISO 45001 Occupational Health and Safety Management System
Which alternative to Crystal Reports is best for small or large businesses.pdf
System and Network Administration Chapter 2
Digital Strategies for Manufacturing Companies
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Softaken Excel to vCard Converter Software.pdf
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
CHAPTER 2 - PM Management and IT Context
VVF-Customer-Presentation2025-Ver1.9.pptx
Online Work Permit System for Fast Permit Processing
Wondershare Filmora 15 Crack With Activation Key [2025
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Introduction to Artificial Intelligence
Design an Analysis of Algorithms I-SECS-1021-03
How to Migrate SBCGlobal Email to Yahoo Easily
Navsoft: AI-Powered Business Solutions & Custom Software Development
AI in Product Development-omnex systems
System and Network Administraation Chapter 3
Nekopoi APK 2025 free lastest update
L1 - Introduction to python Backend.pptx

WEB API Gateway

  • 1. Web API Gateway Kumaresh Chandra Baruri Software Engineer
  • 2. Terminologies • Service: The unit/part of software which performs some specific operation or task is known as Service. • Microservice: This is software development technique that structures the software/application into a collection of finely-grained services. These services are –  Loosely coupled with others.  Self-contained.
  • 3. Terminologies(Cont…) • API: An API is a set of definitions and protocols for building and integrating application software. API is used to –  Allow its services to other application or services.  Provides different methods – POST, GET, UPDATE etc to accomplish desired operations.
  • 4. API Endpoints & Accessing Criteria /home /wallpaper/list /wallpaper/details? id={id} /product/list Authentication Authentication Authorization SSL Certificate 1 2 3 Business logic is defined in all the API endpoints Here few sample API endpoints are defined and in order to consume these - • Group #1 can be accessed directly. • Group #2 requires authentication. • Group #3 needs both authentication and authorization. • All the APIs are secured by using SSL certificate.
  • 5. Conventional Way of API Consumption /home /wallpaper/list /wallpaper/details?id={id} /product/list  4 endpoints are available here. Different users from Android phone, iPhone or Web browsers are accessing API directly. Authentication, authorization or both needs to ensure before calling an API from the consumer. Business logic
  • 6. Conventional Way of API Consumption(cont..) 1 2 3 4To accomplish a single tasks, 4 API calls are being performed here.
  • 7. Issues of Conventional Calling In case of direct access to the API from known and unknown consumers, the security issues will be raised-  It will be publicly exposed.  Would be easier for the cracker to find out business logic.
  • 8. Issues of Conventional Calling(cont..) If multiple API calls and their resultant aggregation is required to accomplish a single task at frontend application, it leads to -  Higher latency  Slower performance.
  • 9. Issues of Conventional Calling(cont..) Required authentication and/or authorization, security need to ensure for all the associated APIs and consequently Along with business logic, it is very essential to include 3 additional Components for the defined API- 1. Authentication 2. Authorization based on user roles. 3. SSL certificates and their rotational changes.
  • 10. Target The intention of these slides is to separate out 3 additional components from business logic into a separate component called- API Gateway A software component which acts as an entry point to access API for consuming services. This is basically a new microservice. Middle layer between consumer and APIs
  • 11. API Gateway Components API Gateway Security Authentication Authorization Forward Request After satisfying the required criteria of the target API, request will be forwarded.
  • 12. API Gateway as Middle Layer API Gateway Mobile application request & response Web application Request & response API gateway is a revere proxy
  • 13. Gateway Confirms Security Gateway Private IP Private IP Private IP Public IP Secured network Only one public IP of gateway is available to the consumer which enhances the security.
  • 14. Gateway Lowers the Latency Gateway Latency will be reduced through- 1. Frontend application sends one request to API gateway. 2. Gateway will collect data from multiple services, aggregate and finally sends to the consumer. 3. Viewmodel or an adapter at gateway will hold aggregated data(response) to send back to the consumer. 4. Will have improved latency for the request-response feedback. 1 2 3 Response = Data 1+ Data 2+ Data 3 Request
  • 15. Gateway Authentication and Authorization Without gateway, it needs to ensure authentication and authorization for all the APIs so that lots of duplicate code needs to write in the API along with business logic. Gateway ensures that integration in a single place.
  • 16. Gateway Makes Easier Service Discovery 1. API definition is exposed to Gateway only. 2. In case of any changes in API definition, only needs to change in Gateway. This makes loose coupling with different consumer. 3. Enhances service discovery integration via Gateway.
  • 17. Response Caching at Gateway 1. Response caching can be implemented at Gateway by implementing cross cutting concerns. 2. Clean codes within the Microservices. 3. In case of repeating request, API gateway will send response from Cache rather than calling the services once again.
  • 18. Different Types Of Protocols Gateway Unsupported protocols of client request is handled by Gateway to access the right microservice. Websocket http-1 http-2 http-1 HTTP-2
  • 19. Other Facilities of Gateway 1. Retry or circuit breaker policy can be implemented in case of any failure to get response from microservices. 2. API access limit can be handled from Gateway to avoid repeated and a threshold number of connection in a certain period. 3. Gateway can be worked as a load balancer to handle multiple requests. 4. Event logger could be integrated at Gateway. 5. Query transformation is accomplished at Gateway. 6. White/black listed Ips are handled from Gateway.
  • 20. Drawbacks of API Gateway Gateway is a single entry point and in case of any failure, entire application will not work. In order to avoid Gateway failure, 1. It needs to publish multiple Gateway instances to make available for 24X7. 2. Load balancer can be used to handle requests from different instances.
  • 21. API Gateway Tools 1. Kong: https://github.com/Kong/kong 2. Ambassador: https://www.getambassador.io/products/api-gateway/ 3. Ocelot: https://github.com/ThreeMammals/Ocelot