SlideShare a Scribd company logo
Mathematical Explanation of API Gateway Aggregation and how it speeds
up the whole process.
by
Khaqan Ashraf
Software Engineer at tossdown Inc.
What will you learn
● What is API Gateway.
● What are Microservices.
● Difference between Monolithic and Microservices.
● Applications, Limitations and Solutions to the Limitations of Microservices
Architecture.
● Aggregation.
● Mathematical representation of Aggregation and the analysis of speed.
What is an API
Gateway?
An API gateway takes all API
calls from clients, then
routes them to the
appropriate microservice
with request routing,
composition, and protocol
translation and then return
aggregated response.
Pic credit: https://www.nginx.com/learn/api-gateway/
Microservices
Microservices are the independent service modules that provide one or more
functionality of the whole application. Microservices work independently from other
services. As a whole, microservices coordinates with each other to provide system
functionality. The underline evolving architecture is called as Microservices Architecture.
Pic credit: http://www.sevenhillsehealth.com/modules.html
Monolithic vs Microservices
In traditional Monolithic systems the whole application must be integrated, tested
and then deployed. And for every other requirement after adding modules to the
system the whole system must be tested and deployed again.
Reference: http://www.sevenhillsehealth.com/modules.html
Pic credit: https://www.educative.io/blog/how-to-design-a-web-application-software-architecture-101
Benefits of Microservices
Microservices Architecture has following benefits over Monolithic Architecture:
1. Independent Modules
Microservices are independent service modules running independently on multiple
servers or multiple server instances.
Reference: https://devan.codes/blog/2019/1/31/the-problems-of-selling-a-modular-software-system
2. Fault Tolerance
If there’s a memory leak or
something similar issue with
a service then the issue
would not be propagated to
other services. Also, if a
service shuts down due to
any reason then it would
not force the whole system
to shut down.
Pic credit: https://publish.illinois.edu/integrative-security-assessment/fault-tolerant-communication/
3. Scalability
New functionality could be
added to system easily and
independently.
Pic credit: https://www.educative.io/path/scalability-system-design
4. Loosely Coupled
Microservices are loosely
coupled as it is working
independently of each other.
Pic credit: https://dzone.com/articles/all-you-need-to-know-about-dependency-injection
5. Maintenance
Microservices is not high
maintenance. It could be
easily taken care off and
tested individually and
separately.
Pic credit: https://dzone.com/articles/all-you-need-to-know-about-dependency-injection
Example:
Let’s assume in a fully functional complex system we are required to add a module for
image processing. Now we must use faster GPU and deep learning libraries like Kares or
Tensorflow of Python while our rest of the application is built in PHP. It might be very
difficult on Monolithic architecture but unfortunately Microservices architecture allow us
to implement this service independently on faster system with Python libraries and
provide a standard API so that other microservices of the system and client’s application
could use this functionality.
APIs
In microservices architecture APIs are used to access and use functionality of a
microservices. APIs provide standardized interface responsible for inter microservice
communication as well.
For microservices we use RESTful APIs.
https://realtimeapi.io/what-is-a-realtime-api/
Limitations of the Architecture
1. We have to perform some security
check on following APIs separately
a. SSL on GET APIs
b. Authentication on PUT APIs
c. Authorization on POST APIs
Microservices architecture is so flexible such that it could be used in complex
application and we can extend and evolve those applications over time. But with the
mentioned features it has some points that must be covered before using
Microservices as an architecture.
2. If the client application
uses APIs directly then the
client application is tightly
coupled with the system.
PIc credit: https://www.cuelogic.com/blog/microservices-in-practice-from-architecture-to-deployment
3. We have to enable
following services
separately on each
microservice.
a. Caching
b. Logging
c. Throttling
(Rate limiting)
Pic credit: https://medium.com/@craig552uk/how-to-choose-an-api-gateway-ac64f04f3683
Solutions to combat the limitations
To address the mentioned issues, here comes the use of API Gateway:
1. It authenticate requests for once
2. Caching and logging are handled on API Gateway as well
3. And client application is loosely coupled with the system through API
Gateway
Pic credit: https://docs.microsoft.com/en-us/azure/architecture/microservices/design/gateway
Aggregation
Another benefit of using API Gateway is
aggregation. In response to one request
API Gateway calls one or more apis,
aggregate their response and return this
aggregated response to client.
Pic credit: https://thenounproject.com/term/data-aggregation/1630955/
p = time to send packet from WebGUI to API-Gateway
q = time to send packet from API-Gateway to Service
n = number of request to different services
R1= total response time
Pic credit: https://sookocheff.com/post/api/overambitious-api-gateways/
R1 = 2n(p+q)
Without aggregation
p = time to send packet from WebGUI to API-Gateway
q = time to send packet from API-Gateway to Service
n = number of request to different services
R2= total response time
Pic credit: https://sookocheff.com/post/api/overambitious-api-gateways/
R2 = 2(p+nq)
With aggregation
Mathematical Analysis
Sr. Number of
requests
(n)
Without API Gateway
aggregation
(R1)
With API Gateway
aggregation
(R2)
1 3 9 5
2 4 12 6
3 5 15 7
Result
API Gateway is a adequate service for microservices architecture. It enhances overall
response time of complex applications and makes client application loosely coupled with
system that too with all the essential security checks. Furthermore, we can use Load
Balancer along with API Gateways to ensure application’s reliability.
Conclusion
Popular API Gateway
services
1. NGINX
2. Amazon API Gateway
3. KrakenD
4. Kong
5. Apache APISIX

More Related Content

What's hot

Exposing services with Azure API Management
Exposing services with Azure API ManagementExposing services with Azure API Management
Exposing services with Azure API Management
Callon Campbell
 
API Gateway report
API Gateway reportAPI Gateway report
API Gateway report
Gleicon Moraes
 
API Governance in the Enterprise
API Governance in the EnterpriseAPI Governance in the Enterprise
API Governance in the Enterprise
Apigee | Google Cloud
 
Azure API Management
Azure API ManagementAzure API Management
Azure API Management
Daniel Toomey
 
WSO2 API Manager 2.0 - Overview
WSO2 API Manager 2.0 - Overview WSO2 API Manager 2.0 - Overview
WSO2 API Manager 2.0 - Overview
Edgar Silva
 
APIs in a Microservice Architecture
APIs in a Microservice ArchitectureAPIs in a Microservice Architecture
APIs in a Microservice Architecture
WSO2
 
API Gateway How-To: The Many Ways to Apply the Gateway Pattern
API Gateway How-To: The Many Ways to Apply the Gateway PatternAPI Gateway How-To: The Many Ways to Apply the Gateway Pattern
API Gateway How-To: The Many Ways to Apply the Gateway Pattern
VMware Tanzu
 
Architecting an Enterprise API Management Strategy
Architecting an Enterprise API Management StrategyArchitecting an Enterprise API Management Strategy
Architecting an Enterprise API Management Strategy
WSO2
 
Apigee Demo: API Platform Overview
Apigee Demo: API Platform OverviewApigee Demo: API Platform Overview
Apigee Demo: API Platform Overview
Apigee | Google Cloud
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Araf Karsh Hamid
 
Apigee Edge Overview and Roadmap
Apigee Edge Overview and RoadmapApigee Edge Overview and Roadmap
Apigee Edge Overview and Roadmap
Apigee | Google Cloud
 
Definitive Guide to API Management
Definitive Guide to API ManagementDefinitive Guide to API Management
Definitive Guide to API Management
Apigee | Google Cloud
 
Api gateway
Api gatewayApi gateway
Api gateway
enyert
 
Introduction to Kong API Gateway
Introduction to Kong API GatewayIntroduction to Kong API Gateway
Introduction to Kong API Gateway
Yohann Ciurlik
 
API Management Part 1 - An Introduction to Azure API Management
API Management Part 1 - An Introduction to Azure API ManagementAPI Management Part 1 - An Introduction to Azure API Management
API Management Part 1 - An Introduction to Azure API Management
BizTalk360
 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & Development
Ashok Pundit
 
Architecture for the API-enterprise
Architecture for the API-enterpriseArchitecture for the API-enterprise
Architecture for the API-enterprise
Apigee | Google Cloud
 
Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architecture
The Software House
 
Distributed tracing 101
Distributed tracing 101Distributed tracing 101
Distributed tracing 101
Itiel Shwartz
 
Api types
Api typesApi types
Api types
Sarah Maddox
 

What's hot (20)

Exposing services with Azure API Management
Exposing services with Azure API ManagementExposing services with Azure API Management
Exposing services with Azure API Management
 
API Gateway report
API Gateway reportAPI Gateway report
API Gateway report
 
API Governance in the Enterprise
API Governance in the EnterpriseAPI Governance in the Enterprise
API Governance in the Enterprise
 
Azure API Management
Azure API ManagementAzure API Management
Azure API Management
 
WSO2 API Manager 2.0 - Overview
WSO2 API Manager 2.0 - Overview WSO2 API Manager 2.0 - Overview
WSO2 API Manager 2.0 - Overview
 
APIs in a Microservice Architecture
APIs in a Microservice ArchitectureAPIs in a Microservice Architecture
APIs in a Microservice Architecture
 
API Gateway How-To: The Many Ways to Apply the Gateway Pattern
API Gateway How-To: The Many Ways to Apply the Gateway PatternAPI Gateway How-To: The Many Ways to Apply the Gateway Pattern
API Gateway How-To: The Many Ways to Apply the Gateway Pattern
 
Architecting an Enterprise API Management Strategy
Architecting an Enterprise API Management StrategyArchitecting an Enterprise API Management Strategy
Architecting an Enterprise API Management Strategy
 
Apigee Demo: API Platform Overview
Apigee Demo: API Platform OverviewApigee Demo: API Platform Overview
Apigee Demo: API Platform Overview
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
 
Apigee Edge Overview and Roadmap
Apigee Edge Overview and RoadmapApigee Edge Overview and Roadmap
Apigee Edge Overview and Roadmap
 
Definitive Guide to API Management
Definitive Guide to API ManagementDefinitive Guide to API Management
Definitive Guide to API Management
 
Api gateway
Api gatewayApi gateway
Api gateway
 
Introduction to Kong API Gateway
Introduction to Kong API GatewayIntroduction to Kong API Gateway
Introduction to Kong API Gateway
 
API Management Part 1 - An Introduction to Azure API Management
API Management Part 1 - An Introduction to Azure API ManagementAPI Management Part 1 - An Introduction to Azure API Management
API Management Part 1 - An Introduction to Azure API Management
 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & Development
 
Architecture for the API-enterprise
Architecture for the API-enterpriseArchitecture for the API-enterprise
Architecture for the API-enterprise
 
Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architecture
 
Distributed tracing 101
Distributed tracing 101Distributed tracing 101
Distributed tracing 101
 
Api types
Api typesApi types
Api types
 

Similar to Api Gateway

Microservices
MicroservicesMicroservices
Microservices
Ramesh (@Mavuluri)
 
Study Notes - Using an API Gateway
Study Notes - Using an API GatewayStudy Notes - Using an API Gateway
Study Notes - Using an API Gateway
Rick Hwang
 
MuleSoft Certified Platform Architect Exam Dumps 2023.pdf
MuleSoft Certified Platform Architect Exam Dumps 2023.pdfMuleSoft Certified Platform Architect Exam Dumps 2023.pdf
MuleSoft Certified Platform Architect Exam Dumps 2023.pdf
SkillCertProExams
 
WEB API Gateway
WEB API GatewayWEB API Gateway
WEB API Gateway
Kumaresh Chandra Baruri
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitecture
ABDEL RAHMAN KARIM
 
Scaling Integration
Scaling IntegrationScaling Integration
Scaling Integration
Kim Clark
 
Microservice architecture-api-gateway-considerations
Microservice architecture-api-gateway-considerationsMicroservice architecture-api-gateway-considerations
Microservice architecture-api-gateway-considerations
Imam Uddin Ahamed - PRINCE2 ® , ITIL ®
 
Spring boot microservice metrics monitoring
Spring boot   microservice metrics monitoringSpring boot   microservice metrics monitoring
Spring boot microservice metrics monitoring
Oracle Korea
 
Spring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics MonitoringSpring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics Monitoring
DonghuKIM2
 
Twelve factor-app
Twelve factor-appTwelve factor-app
Twelve factor-app
José Javier Vélez Colón
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
Touraj Ebrahimi
 
Build12 factorappusingmp
Build12 factorappusingmpBuild12 factorappusingmp
Build12 factorappusingmp
Emily Jiang
 
Monolithic and Microservice architecture, Feature of Node JS 10, HTTP2
Monolithic and Microservice architecture, Feature of Node JS 10, HTTP2Monolithic and Microservice architecture, Feature of Node JS 10, HTTP2
Monolithic and Microservice architecture, Feature of Node JS 10, HTTP2
Atharva Jawalkar
 
Building enterprise depth APIs with the IBM hybrid integration portfolio
Building enterprise depth APIs with the IBM hybrid integration portfolioBuilding enterprise depth APIs with the IBM hybrid integration portfolio
Building enterprise depth APIs with the IBM hybrid integration portfolio
Kim Clark
 
APIGATEWAY in Microservices
APIGATEWAY in MicroservicesAPIGATEWAY in Microservices
APIGATEWAY in Microservices
IRJET Journal
 
Micro Services
Micro ServicesMicro Services
Micro Services
SARADHIREDDYK
 
apidays Hong Kong - Why is API Gateway essential to business, Zhiyuan Ju, API...
apidays Hong Kong - Why is API Gateway essential to business, Zhiyuan Ju, API...apidays Hong Kong - Why is API Gateway essential to business, Zhiyuan Ju, API...
apidays Hong Kong - Why is API Gateway essential to business, Zhiyuan Ju, API...
apidays
 
Microservices&ap imanagement
Microservices&ap imanagementMicroservices&ap imanagement
Microservices&ap imanagement
pramodkumards
 
API, Integration, and SOA Convergence
API, Integration, and SOA ConvergenceAPI, Integration, and SOA Convergence
API, Integration, and SOA Convergence
Kasun Indrasiri
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
Faren faren
 

Similar to Api Gateway (20)

Microservices
MicroservicesMicroservices
Microservices
 
Study Notes - Using an API Gateway
Study Notes - Using an API GatewayStudy Notes - Using an API Gateway
Study Notes - Using an API Gateway
 
MuleSoft Certified Platform Architect Exam Dumps 2023.pdf
MuleSoft Certified Platform Architect Exam Dumps 2023.pdfMuleSoft Certified Platform Architect Exam Dumps 2023.pdf
MuleSoft Certified Platform Architect Exam Dumps 2023.pdf
 
WEB API Gateway
WEB API GatewayWEB API Gateway
WEB API Gateway
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitecture
 
Scaling Integration
Scaling IntegrationScaling Integration
Scaling Integration
 
Microservice architecture-api-gateway-considerations
Microservice architecture-api-gateway-considerationsMicroservice architecture-api-gateway-considerations
Microservice architecture-api-gateway-considerations
 
Spring boot microservice metrics monitoring
Spring boot   microservice metrics monitoringSpring boot   microservice metrics monitoring
Spring boot microservice metrics monitoring
 
Spring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics MonitoringSpring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics Monitoring
 
Twelve factor-app
Twelve factor-appTwelve factor-app
Twelve factor-app
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
 
Build12 factorappusingmp
Build12 factorappusingmpBuild12 factorappusingmp
Build12 factorappusingmp
 
Monolithic and Microservice architecture, Feature of Node JS 10, HTTP2
Monolithic and Microservice architecture, Feature of Node JS 10, HTTP2Monolithic and Microservice architecture, Feature of Node JS 10, HTTP2
Monolithic and Microservice architecture, Feature of Node JS 10, HTTP2
 
Building enterprise depth APIs with the IBM hybrid integration portfolio
Building enterprise depth APIs with the IBM hybrid integration portfolioBuilding enterprise depth APIs with the IBM hybrid integration portfolio
Building enterprise depth APIs with the IBM hybrid integration portfolio
 
APIGATEWAY in Microservices
APIGATEWAY in MicroservicesAPIGATEWAY in Microservices
APIGATEWAY in Microservices
 
Micro Services
Micro ServicesMicro Services
Micro Services
 
apidays Hong Kong - Why is API Gateway essential to business, Zhiyuan Ju, API...
apidays Hong Kong - Why is API Gateway essential to business, Zhiyuan Ju, API...apidays Hong Kong - Why is API Gateway essential to business, Zhiyuan Ju, API...
apidays Hong Kong - Why is API Gateway essential to business, Zhiyuan Ju, API...
 
Microservices&ap imanagement
Microservices&ap imanagementMicroservices&ap imanagement
Microservices&ap imanagement
 
API, Integration, and SOA Convergence
API, Integration, and SOA ConvergenceAPI, Integration, and SOA Convergence
API, Integration, and SOA Convergence
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 

Recently uploaded

Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 

Recently uploaded (20)

Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 

Api Gateway

  • 1. Mathematical Explanation of API Gateway Aggregation and how it speeds up the whole process. by Khaqan Ashraf Software Engineer at tossdown Inc.
  • 2. What will you learn ● What is API Gateway. ● What are Microservices. ● Difference between Monolithic and Microservices. ● Applications, Limitations and Solutions to the Limitations of Microservices Architecture. ● Aggregation. ● Mathematical representation of Aggregation and the analysis of speed.
  • 3. What is an API Gateway? An API gateway takes all API calls from clients, then routes them to the appropriate microservice with request routing, composition, and protocol translation and then return aggregated response. Pic credit: https://www.nginx.com/learn/api-gateway/
  • 4. Microservices Microservices are the independent service modules that provide one or more functionality of the whole application. Microservices work independently from other services. As a whole, microservices coordinates with each other to provide system functionality. The underline evolving architecture is called as Microservices Architecture. Pic credit: http://www.sevenhillsehealth.com/modules.html
  • 5. Monolithic vs Microservices In traditional Monolithic systems the whole application must be integrated, tested and then deployed. And for every other requirement after adding modules to the system the whole system must be tested and deployed again. Reference: http://www.sevenhillsehealth.com/modules.html
  • 7. Benefits of Microservices Microservices Architecture has following benefits over Monolithic Architecture: 1. Independent Modules Microservices are independent service modules running independently on multiple servers or multiple server instances. Reference: https://devan.codes/blog/2019/1/31/the-problems-of-selling-a-modular-software-system
  • 8. 2. Fault Tolerance If there’s a memory leak or something similar issue with a service then the issue would not be propagated to other services. Also, if a service shuts down due to any reason then it would not force the whole system to shut down. Pic credit: https://publish.illinois.edu/integrative-security-assessment/fault-tolerant-communication/
  • 9. 3. Scalability New functionality could be added to system easily and independently. Pic credit: https://www.educative.io/path/scalability-system-design
  • 10. 4. Loosely Coupled Microservices are loosely coupled as it is working independently of each other. Pic credit: https://dzone.com/articles/all-you-need-to-know-about-dependency-injection
  • 11. 5. Maintenance Microservices is not high maintenance. It could be easily taken care off and tested individually and separately. Pic credit: https://dzone.com/articles/all-you-need-to-know-about-dependency-injection
  • 12. Example: Let’s assume in a fully functional complex system we are required to add a module for image processing. Now we must use faster GPU and deep learning libraries like Kares or Tensorflow of Python while our rest of the application is built in PHP. It might be very difficult on Monolithic architecture but unfortunately Microservices architecture allow us to implement this service independently on faster system with Python libraries and provide a standard API so that other microservices of the system and client’s application could use this functionality.
  • 13. APIs In microservices architecture APIs are used to access and use functionality of a microservices. APIs provide standardized interface responsible for inter microservice communication as well. For microservices we use RESTful APIs. https://realtimeapi.io/what-is-a-realtime-api/
  • 14. Limitations of the Architecture 1. We have to perform some security check on following APIs separately a. SSL on GET APIs b. Authentication on PUT APIs c. Authorization on POST APIs Microservices architecture is so flexible such that it could be used in complex application and we can extend and evolve those applications over time. But with the mentioned features it has some points that must be covered before using Microservices as an architecture.
  • 15. 2. If the client application uses APIs directly then the client application is tightly coupled with the system. PIc credit: https://www.cuelogic.com/blog/microservices-in-practice-from-architecture-to-deployment
  • 16. 3. We have to enable following services separately on each microservice. a. Caching b. Logging c. Throttling (Rate limiting) Pic credit: https://medium.com/@craig552uk/how-to-choose-an-api-gateway-ac64f04f3683
  • 17. Solutions to combat the limitations To address the mentioned issues, here comes the use of API Gateway: 1. It authenticate requests for once 2. Caching and logging are handled on API Gateway as well 3. And client application is loosely coupled with the system through API Gateway
  • 19. Aggregation Another benefit of using API Gateway is aggregation. In response to one request API Gateway calls one or more apis, aggregate their response and return this aggregated response to client. Pic credit: https://thenounproject.com/term/data-aggregation/1630955/
  • 20. p = time to send packet from WebGUI to API-Gateway q = time to send packet from API-Gateway to Service n = number of request to different services R1= total response time Pic credit: https://sookocheff.com/post/api/overambitious-api-gateways/ R1 = 2n(p+q) Without aggregation
  • 21. p = time to send packet from WebGUI to API-Gateway q = time to send packet from API-Gateway to Service n = number of request to different services R2= total response time Pic credit: https://sookocheff.com/post/api/overambitious-api-gateways/ R2 = 2(p+nq) With aggregation
  • 23. Sr. Number of requests (n) Without API Gateway aggregation (R1) With API Gateway aggregation (R2) 1 3 9 5 2 4 12 6 3 5 15 7 Result
  • 24. API Gateway is a adequate service for microservices architecture. It enhances overall response time of complex applications and makes client application loosely coupled with system that too with all the essential security checks. Furthermore, we can use Load Balancer along with API Gateways to ensure application’s reliability. Conclusion
  • 25. Popular API Gateway services 1. NGINX 2. Amazon API Gateway 3. KrakenD 4. Kong 5. Apache APISIX