SlideShare a Scribd company logo
WSO2 API Microgateway - 3.0
Rajith Roshan
Associate Technical Lead, WSO2 Inc.
Praminda Jayawardene
Senior Software Engineer, WSO2 Inc.
API Microgateway
Proxy that stands in front of microservices
Enables developers and operators with common control panel
Architecture
WSO2
API Microgateway
Architecture
Components
● Gateway runtime
● Toolkit
● Command line interface(CLI) to manage microgateway projects
● Initialize microgateway projects with open API definitions
● Builds the projects to create
○ Runtime artifacts(APIs packed in) for runtime containers and
distributions
○ Immutable containers with APIs built in
○ Kubernetes artifacts used to deploy in k8s clusters
● Import APIs from WSO2 API Manager
● Download from : https://wso2.com/api-management/api-microgateway/
Toolkit
● Serves the requests applying
○ Security
○ Rate limiting
○ Transformations
○ Analytics and etc
● Available as archived distributions as well as docker images[1]
● Can be build burning APIs into container images to spawn immutable
containers
● Runs on top of artifacts generated by the toolkit
[1]- https://hub.docker.com/r/wso2/wso2micro-gw
Runtime
Demo
● Cloud native
● Developer centric
● Decentralized
● Designed for microservices
● Immutable
● Scalable
Components
● Gateway runtime
● Toolkit
WSO2
API Microgateway
● Comes as lightweight containers
○ Fast boot up times (< 1s)
○ Low memory footprint(256mb)
○ Low distribution size (~ 100 MB)
● Designed in a stateless manner
● Isolated from underlying system/OS
● Can be deployed on self-service, elastic and cloud infrastructure
● Agile DevOps and CI/CD
● Automated capabilities for deployment
● Developed with frameworks suited for cloud
1. Cloud Native
● Developer start creating microservices
● Define the open API definition for the microservices
● Initiates microgateway project from open API definition
● Build the microgateway project
● Locally test the service exposed via microgateway
2. Developer Centric
● Per API gateway
● Private jet and sidecar gateways
● Gateway for subset of APIs only
3. Decentralized
● Rebuild and redeploy using rolling updates, if API changes, new resource
get added
● Add a new gateway for new API
● Open API definitions should be finalized, prior deploying
● Immutable containers
● Immutable runtime artifacts for non containerized runtimes
4. Immutable
● Serves traffic independently
○ Acts without key manager with self contained tokens
○ Local rate limiting capabilities
○ Stores analytics data
● Independently scale without having to scale other component
● Can be scaled with microservices when used as private jet or side car
mode
● Inbuilt support for container orchestration tools to manage scaling
5. Scalable
New Features
Use Case
● In microservices world certain functionality is provided by set of microservices developed by a team
● Developers needs to document the services(Interfaces) as APIs to be used by outside world
● Developer team maintains a open API definitions for microservices
● Developer team needs to test the microservices with security and etc exposed via gateways
1. Based on Open API Definition
Application
● Extend the API definition with microgateway specific
vendor extensions.
● Create microgateway project using API definition and
creates runtime artifacts locally
● Test the functionality using microgateway runtime by
providing the runtime artifacts.
Use Case
● Set of microservices for a single business use case (for ex: online book store)
● Each microservice with different endpoints
● Defines a single open API definition for all the microservices
● Expose the microservices as APIs via the API gateway
Application
● Extend the API definition with microgateway specific vendor extensions to add per resource endpoints.
paths:
"/books/list":
get:
summary: Get the list of books
x-wso2-production-endpoints:
urls:
- http://35.226.63.174:30941
"/books/search/{query}":
get:
x-wso2-production-endpoints:
urls:
- http://35.226.63.174:31891
2. Per resource endpoints
2. Per Resource Endpoints
Use Case
● Certain organizations provide services for trusted partners only (for ex: banks)
● In order to access services initial agreement required to build the trust
● Organization and clients enforces trust by sharing the certificates with each other.
Application
● Enable mutual ssl in microgateway for APIs
● Share the public certificates of microgateway and clients with each other.
3. Mutual SSL Authentication
Use Case
● Certain clients might send invalid requests or bogus requests to manipulate server
data
● Services need a way to validate the clients request is valid with the service schema
Application
● Microgateway intercepts the request/response and validates it against the open API
scheme
● Validates the request/response body
4. Request/Response Schema Validation
4. Request Schema Validation
4. Response Schema Validation
Use Case
● In microservices architecture services may be dynamic
● Services might have dynamically assigned IP, ports every time they respawn.
● Central(key/value store) place maintains the dynamically assigned IPs for services
Application
● Configure ETCD to maintain the services dynamic endpoints
● Connect microgateway with ETCD server to periodically pulls updated data
● Microgateway dynamically routes traffic to the correct endpoint address
5. Service Discovery with ETCD
5. Service Discovery with ETCD
Use Case
● Services might limit the number of requests that comes within a unit time period.
● This limitation is may be due to protect services from overloading due to
infrastructure limitations
● Protect APIs from security attacks like Denial of Service(DoS)
Application
● Configure microgateway with WSO2 Traffic manager
● Apply global throttle counters for the cluster of microgateways
6. Global Throttling
Use Case
● Services would require requests to be enriched with certain data which are not accessible to
clients
● Server responses should be transformed in a way that all clients can understand them
● This would require intercepting request and responses and modifying them
Application
● Write ballerina functions for transformations and plug those into the services
● Functions can be defined as open API extensions in the definition file
paths:
"/pet/findByStatus":
get:
summary: Finds Pets by status
description: Multiple status values can be provided with comma separated strings
operationId: findPetsByStatus
x-wso2-request-interceptor: validateRequest
x-wso2-response-interceptor: validateResponse
7. On the Fly Transformations
7. On the Fly Transformations
● Microgateway expose http2 services to clients
● Does http 1.1 to http 2 transformations and vice versa
● Expose http 1.1 services as http2 for clients
User story 1 - Both client and backend supports HTTP 2.0
8. HTTP2 Support
User story 2 - The client supports HTTP 2.0 but the backend does not support HTTP 2.0
User Story 3 - The client does not support HTTP/2 but the backend supports HTTP 2.0
8. HTTP2 Support
● JWT will be validated using the signature
● If the signature is valid, revoked tokens will also be validated as true until token get
expired
● If the JWT is revoked microgateway should be notified of revoked jwt tokens
Supported Notification types
1. Persistent notification via an ETCD server
- Microgateway connects to ETCD server during startup and fetch all the revoked tokens and
stores in the memory
2. Real Time notification via an JMS subscription
- Microgateway subscribes to an configurable jms topic and get real time notifications regarding
revoked tokens
9. JWT Revocation
9. JWT Revocation
Upcoming Tutorials
● Deploy in k8s with cluster of gateways
● Service discovery with etcd
● Apply security (OAuth2, Mutual ssl, JWT,basic auth)
● Application of microgateway in microservices architecture
● Microgateway schema validation
● On the fly transformations with interceptors
● Microgateway local and distributed throttling
● JWT Revocation
Will be updated via the WSO2 blog :
https://wso2.com/blogs/thesource/2019/07/wso2-api-microgateway-3-0-is-released/
Development and Operational
Process
● Developer start creating microservice
● Define the open API definition for the microservice
● Initiates microgateway project from open API definition
● Build the microgateway project
● Locally test the service exposed via microgateway
● Commits the project to source version system (ex :Git)
1. Development Cycle
● Developers collectively develop other microservices
● Checkout the microgateway project
● Modify the project to add the newly added microservices
● Build the microgateway project with multiple services now
● Locally test the specific microservice via gateway
● Individually each developer commits changes to the project
1. Development Cycle (Contd)
● Individual microservices are included in the microgateway project
● Request comes to deploy in the development environment
● Operations team checkouts the project
● Creates the deployment configuration for the project
● Build the project with deployment configuration
● Deploy the microgateways using the build artifacts (In Docker/k8s)
2. Operations Process
● Completes the deployment and testing of dev environment
● Creates the deployment configuration file for the test environment
● Configuration is changed to use the same runtime artifacts(executables/ containers)
from dev environment
● Provides environment specific data as environment variables
● Build the project with deployment configuration for test
● Deploy the microgateways using the build artifacts (In Docker/k8s)
● Continue process until deployed in production
3. CI/CD Process
Demo
Deployment Patterns
1. Monolithic Centralized Deployments
2. Private Jet or Sidecar in MSA
3. Expose Microservices as APIs in a Service
Mesh
THANK YOU
wso2.com

More Related Content

What's hot

Creating a Scalable and Decentralized API Management Architecture with WSO2 A...
Creating a Scalable and Decentralized API Management Architecture with WSO2 A...Creating a Scalable and Decentralized API Management Architecture with WSO2 A...
Creating a Scalable and Decentralized API Management Architecture with WSO2 A...
WSO2
 
Wmq wmb dist migration v1 030310
Wmq wmb dist migration v1 030310Wmq wmb dist migration v1 030310
Wmq wmb dist migration v1 030310
karthickmsit
 

What's hot (20)

WSO2 Product Release Webinar - WSO2 App Factory 2.1
WSO2 Product Release Webinar - WSO2 App Factory 2.1WSO2 Product Release Webinar - WSO2 App Factory 2.1
WSO2 Product Release Webinar - WSO2 App Factory 2.1
 
WSO2- OSC Korea - Accelerating Digital Businesses with APIs
WSO2- OSC Korea - Accelerating Digital Businesses with APIsWSO2- OSC Korea - Accelerating Digital Businesses with APIs
WSO2- OSC Korea - Accelerating Digital Businesses with APIs
 
[WSO2 API Day Toronto 2019] Cloud-native Integration for the Enterprise
[WSO2 API Day Toronto 2019] Cloud-native Integration for the Enterprise[WSO2 API Day Toronto 2019] Cloud-native Integration for the Enterprise
[WSO2 API Day Toronto 2019] Cloud-native Integration for the Enterprise
 
Productising your Microservices as API Products
Productising your Microservices  as API ProductsProductising your Microservices  as API Products
Productising your Microservices as API Products
 
[WSO2 Summit APAC 2020} Creating Smart Endpoints Using Integration Microservices
[WSO2 Summit APAC 2020} Creating Smart Endpoints Using Integration Microservices[WSO2 Summit APAC 2020} Creating Smart Endpoints Using Integration Microservices
[WSO2 Summit APAC 2020} Creating Smart Endpoints Using Integration Microservices
 
How to Choose an Integration Platform Vendor for Your Business
How to Choose an Integration Platform Vendor for Your BusinessHow to Choose an Integration Platform Vendor for Your Business
How to Choose an Integration Platform Vendor for Your Business
 
[WSO2 Integration Summit Stuttgart 2019] Role of Integration in an API Driven...
[WSO2 Integration Summit Stuttgart 2019] Role of Integration in an API Driven...[WSO2 Integration Summit Stuttgart 2019] Role of Integration in an API Driven...
[WSO2 Integration Summit Stuttgart 2019] Role of Integration in an API Driven...
 
Creating a Scalable and Decentralized API Management Architecture with WSO2 A...
Creating a Scalable and Decentralized API Management Architecture with WSO2 A...Creating a Scalable and Decentralized API Management Architecture with WSO2 A...
Creating a Scalable and Decentralized API Management Architecture with WSO2 A...
 
Role of API Management in an API led Digital Economy
Role of API Management in an API led Digital EconomyRole of API Management in an API led Digital Economy
Role of API Management in an API led Digital Economy
 
[Workshop] API Management in Microservices Architecture
[Workshop] API Management in Microservices Architecture[Workshop] API Management in Microservices Architecture
[Workshop] API Management in Microservices Architecture
 
[Webinar] WSO2 API Microgateway with Okta as Key Manager
[Webinar] WSO2 API Microgateway with Okta as Key Manager[Webinar] WSO2 API Microgateway with Okta as Key Manager
[Webinar] WSO2 API Microgateway with Okta as Key Manager
 
[WSO2 Integration Summit Stuttgart 2019] Decentralizing APIs for Agile Busine...
[WSO2 Integration Summit Stuttgart 2019] Decentralizing APIs for Agile Busine...[WSO2 Integration Summit Stuttgart 2019] Decentralizing APIs for Agile Busine...
[WSO2 Integration Summit Stuttgart 2019] Decentralizing APIs for Agile Busine...
 
Leveraging Async APIs to deliver cross domain agile collaboration
Leveraging Async APIs to deliver cross domain agile collaboration Leveraging Async APIs to deliver cross domain agile collaboration
Leveraging Async APIs to deliver cross domain agile collaboration
 
Rate Limiting GQLs Using Depth and Complexity Analysis
Rate Limiting GQLs Using Depth and Complexity AnalysisRate Limiting GQLs Using Depth and Complexity Analysis
Rate Limiting GQLs Using Depth and Complexity Analysis
 
[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace
[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace
[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace
 
Wmq wmb dist migration v1 030310
Wmq wmb dist migration v1 030310Wmq wmb dist migration v1 030310
Wmq wmb dist migration v1 030310
 
[WSO2 Integration Summit Nairobi 2019] Emerging Architecture Patterns: API-ce...
[WSO2 Integration Summit Nairobi 2019] Emerging Architecture Patterns: API-ce...[WSO2 Integration Summit Nairobi 2019] Emerging Architecture Patterns: API-ce...
[WSO2 Integration Summit Nairobi 2019] Emerging Architecture Patterns: API-ce...
 
What’s New With WSO2 Open Banking?
What’s New With WSO2 Open Banking?What’s New With WSO2 Open Banking?
What’s New With WSO2 Open Banking?
 
API Management 101: The New API Experience with WSO2
API Management 101: The New API Experience with WSO2API Management 101: The New API Experience with WSO2
API Management 101: The New API Experience with WSO2
 
[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes
[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes
[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes
 

Similar to WSO2 API Microgateway for Easier Development and Greater Scalability

The Best of Both Worlds: Introducing WSO2 API Manager 4.0.0
The Best of Both Worlds: Introducing WSO2 API Manager 4.0.0The Best of Both Worlds: Introducing WSO2 API Manager 4.0.0
The Best of Both Worlds: Introducing WSO2 API Manager 4.0.0
WSO2
 
REST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptxREST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptx
Jason452803
 

Similar to WSO2 API Microgateway for Easier Development and Greater Scalability (20)

WSO2 API microgateway introduction
WSO2 API microgateway introductionWSO2 API microgateway introduction
WSO2 API microgateway introduction
 
The Best of Both Worlds: Introducing WSO2 API Manager 4.0.0
The Best of Both Worlds: Introducing WSO2 API Manager 4.0.0The Best of Both Worlds: Introducing WSO2 API Manager 4.0.0
The Best of Both Worlds: Introducing WSO2 API Manager 4.0.0
 
Duo World Architecture
Duo World ArchitectureDuo World Architecture
Duo World Architecture
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
 
How to Build a Scalable, Distributed, Multi-Cloud API Architecture on Kubernetes
How to Build a Scalable, Distributed, Multi-Cloud API Architecture on KubernetesHow to Build a Scalable, Distributed, Multi-Cloud API Architecture on Kubernetes
How to Build a Scalable, Distributed, Multi-Cloud API Architecture on Kubernetes
 
Pivotal Platform: A First Look at the October Release
Pivotal Platform: A First Look at the October ReleasePivotal Platform: A First Look at the October Release
Pivotal Platform: A First Look at the October Release
 
apidays LIVE Australia 2020 - Productising your Microservices as API Products...
apidays LIVE Australia 2020 - Productising your Microservices as API Products...apidays LIVE Australia 2020 - Productising your Microservices as API Products...
apidays LIVE Australia 2020 - Productising your Microservices as API Products...
 
Deep-dive into APIs in a Microservice Architecture
Deep-dive into APIs in a Microservice ArchitectureDeep-dive into APIs in a Microservice Architecture
Deep-dive into APIs in a Microservice Architecture
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
Yotpo microservices
Yotpo microservicesYotpo microservices
Yotpo microservices
 
Cloud Native APIs: The API Operator for Kubernetes
Cloud Native APIs: The API Operator for KubernetesCloud Native APIs: The API Operator for Kubernetes
Cloud Native APIs: The API Operator for Kubernetes
 
[apidays Live Australia] Leveraging Async APIs to deliver Cross Domain Agile ...
[apidays Live Australia] Leveraging Async APIs to deliver Cross Domain Agile ...[apidays Live Australia] Leveraging Async APIs to deliver Cross Domain Agile ...
[apidays Live Australia] Leveraging Async APIs to deliver Cross Domain Agile ...
 
[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?
[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?
[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?
 
[Workshop] API-driven Integration
[Workshop] API-driven Integration[Workshop] API-driven Integration
[Workshop] API-driven Integration
 
Cloud Native API Management : Microservices to APIs in Kubernetes
Cloud Native API Management : Microservices to APIs in KubernetesCloud Native API Management : Microservices to APIs in Kubernetes
Cloud Native API Management : Microservices to APIs in Kubernetes
 
KrakenD API Gateway
KrakenD API GatewayKrakenD API Gateway
KrakenD API Gateway
 
API Management within a Microservice Architecture
API Management within a Microservice ArchitectureAPI Management within a Microservice Architecture
API Management within a Microservice Architecture
 
API Management Within a Microservices Architecture
API Management Within a Microservices Architecture API Management Within a Microservices Architecture
API Management Within a Microservices Architecture
 
REST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptxREST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptx
 
Continuous Integration and Continuous Deployment (CI/CD) with WSO2 Enterprise...
Continuous Integration and Continuous Deployment (CI/CD) with WSO2 Enterprise...Continuous Integration and Continuous Deployment (CI/CD) with WSO2 Enterprise...
Continuous Integration and Continuous Deployment (CI/CD) with WSO2 Enterprise...
 

More from WSO2

More from WSO2 (20)

Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
architecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfarchitecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdf
 
Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
WSO2CON 2024 - Elevating the Integration Game to the Cloud
WSO2CON 2024 - Elevating the Integration Game to the CloudWSO2CON 2024 - Elevating the Integration Game to the Cloud
WSO2CON 2024 - Elevating the Integration Game to the Cloud
 
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & InnovationWSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital Businesses
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
 

Recently uploaded

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 

WSO2 API Microgateway for Easier Development and Greater Scalability

  • 1. WSO2 API Microgateway - 3.0 Rajith Roshan Associate Technical Lead, WSO2 Inc. Praminda Jayawardene Senior Software Engineer, WSO2 Inc.
  • 2. API Microgateway Proxy that stands in front of microservices Enables developers and operators with common control panel
  • 5. ● Command line interface(CLI) to manage microgateway projects ● Initialize microgateway projects with open API definitions ● Builds the projects to create ○ Runtime artifacts(APIs packed in) for runtime containers and distributions ○ Immutable containers with APIs built in ○ Kubernetes artifacts used to deploy in k8s clusters ● Import APIs from WSO2 API Manager ● Download from : https://wso2.com/api-management/api-microgateway/ Toolkit
  • 6. ● Serves the requests applying ○ Security ○ Rate limiting ○ Transformations ○ Analytics and etc ● Available as archived distributions as well as docker images[1] ● Can be build burning APIs into container images to spawn immutable containers ● Runs on top of artifacts generated by the toolkit [1]- https://hub.docker.com/r/wso2/wso2micro-gw Runtime
  • 8.
  • 9. ● Cloud native ● Developer centric ● Decentralized ● Designed for microservices ● Immutable ● Scalable Components ● Gateway runtime ● Toolkit WSO2 API Microgateway
  • 10. ● Comes as lightweight containers ○ Fast boot up times (< 1s) ○ Low memory footprint(256mb) ○ Low distribution size (~ 100 MB) ● Designed in a stateless manner ● Isolated from underlying system/OS ● Can be deployed on self-service, elastic and cloud infrastructure ● Agile DevOps and CI/CD ● Automated capabilities for deployment ● Developed with frameworks suited for cloud 1. Cloud Native
  • 11. ● Developer start creating microservices ● Define the open API definition for the microservices ● Initiates microgateway project from open API definition ● Build the microgateway project ● Locally test the service exposed via microgateway 2. Developer Centric
  • 12. ● Per API gateway ● Private jet and sidecar gateways ● Gateway for subset of APIs only 3. Decentralized
  • 13. ● Rebuild and redeploy using rolling updates, if API changes, new resource get added ● Add a new gateway for new API ● Open API definitions should be finalized, prior deploying ● Immutable containers ● Immutable runtime artifacts for non containerized runtimes 4. Immutable
  • 14. ● Serves traffic independently ○ Acts without key manager with self contained tokens ○ Local rate limiting capabilities ○ Stores analytics data ● Independently scale without having to scale other component ● Can be scaled with microservices when used as private jet or side car mode ● Inbuilt support for container orchestration tools to manage scaling 5. Scalable
  • 16. Use Case ● In microservices world certain functionality is provided by set of microservices developed by a team ● Developers needs to document the services(Interfaces) as APIs to be used by outside world ● Developer team maintains a open API definitions for microservices ● Developer team needs to test the microservices with security and etc exposed via gateways 1. Based on Open API Definition Application ● Extend the API definition with microgateway specific vendor extensions. ● Create microgateway project using API definition and creates runtime artifacts locally ● Test the functionality using microgateway runtime by providing the runtime artifacts.
  • 17. Use Case ● Set of microservices for a single business use case (for ex: online book store) ● Each microservice with different endpoints ● Defines a single open API definition for all the microservices ● Expose the microservices as APIs via the API gateway Application ● Extend the API definition with microgateway specific vendor extensions to add per resource endpoints. paths: "/books/list": get: summary: Get the list of books x-wso2-production-endpoints: urls: - http://35.226.63.174:30941 "/books/search/{query}": get: x-wso2-production-endpoints: urls: - http://35.226.63.174:31891 2. Per resource endpoints
  • 18. 2. Per Resource Endpoints
  • 19. Use Case ● Certain organizations provide services for trusted partners only (for ex: banks) ● In order to access services initial agreement required to build the trust ● Organization and clients enforces trust by sharing the certificates with each other. Application ● Enable mutual ssl in microgateway for APIs ● Share the public certificates of microgateway and clients with each other. 3. Mutual SSL Authentication
  • 20. Use Case ● Certain clients might send invalid requests or bogus requests to manipulate server data ● Services need a way to validate the clients request is valid with the service schema Application ● Microgateway intercepts the request/response and validates it against the open API scheme ● Validates the request/response body 4. Request/Response Schema Validation
  • 21. 4. Request Schema Validation
  • 22. 4. Response Schema Validation
  • 23. Use Case ● In microservices architecture services may be dynamic ● Services might have dynamically assigned IP, ports every time they respawn. ● Central(key/value store) place maintains the dynamically assigned IPs for services Application ● Configure ETCD to maintain the services dynamic endpoints ● Connect microgateway with ETCD server to periodically pulls updated data ● Microgateway dynamically routes traffic to the correct endpoint address 5. Service Discovery with ETCD
  • 24. 5. Service Discovery with ETCD
  • 25. Use Case ● Services might limit the number of requests that comes within a unit time period. ● This limitation is may be due to protect services from overloading due to infrastructure limitations ● Protect APIs from security attacks like Denial of Service(DoS) Application ● Configure microgateway with WSO2 Traffic manager ● Apply global throttle counters for the cluster of microgateways 6. Global Throttling
  • 26. Use Case ● Services would require requests to be enriched with certain data which are not accessible to clients ● Server responses should be transformed in a way that all clients can understand them ● This would require intercepting request and responses and modifying them Application ● Write ballerina functions for transformations and plug those into the services ● Functions can be defined as open API extensions in the definition file paths: "/pet/findByStatus": get: summary: Finds Pets by status description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus x-wso2-request-interceptor: validateRequest x-wso2-response-interceptor: validateResponse 7. On the Fly Transformations
  • 27. 7. On the Fly Transformations
  • 28. ● Microgateway expose http2 services to clients ● Does http 1.1 to http 2 transformations and vice versa ● Expose http 1.1 services as http2 for clients User story 1 - Both client and backend supports HTTP 2.0 8. HTTP2 Support
  • 29. User story 2 - The client supports HTTP 2.0 but the backend does not support HTTP 2.0 User Story 3 - The client does not support HTTP/2 but the backend supports HTTP 2.0 8. HTTP2 Support
  • 30. ● JWT will be validated using the signature ● If the signature is valid, revoked tokens will also be validated as true until token get expired ● If the JWT is revoked microgateway should be notified of revoked jwt tokens Supported Notification types 1. Persistent notification via an ETCD server - Microgateway connects to ETCD server during startup and fetch all the revoked tokens and stores in the memory 2. Real Time notification via an JMS subscription - Microgateway subscribes to an configurable jms topic and get real time notifications regarding revoked tokens 9. JWT Revocation
  • 32. Upcoming Tutorials ● Deploy in k8s with cluster of gateways ● Service discovery with etcd ● Apply security (OAuth2, Mutual ssl, JWT,basic auth) ● Application of microgateway in microservices architecture ● Microgateway schema validation ● On the fly transformations with interceptors ● Microgateway local and distributed throttling ● JWT Revocation Will be updated via the WSO2 blog : https://wso2.com/blogs/thesource/2019/07/wso2-api-microgateway-3-0-is-released/
  • 34. ● Developer start creating microservice ● Define the open API definition for the microservice ● Initiates microgateway project from open API definition ● Build the microgateway project ● Locally test the service exposed via microgateway ● Commits the project to source version system (ex :Git) 1. Development Cycle
  • 35. ● Developers collectively develop other microservices ● Checkout the microgateway project ● Modify the project to add the newly added microservices ● Build the microgateway project with multiple services now ● Locally test the specific microservice via gateway ● Individually each developer commits changes to the project 1. Development Cycle (Contd)
  • 36.
  • 37. ● Individual microservices are included in the microgateway project ● Request comes to deploy in the development environment ● Operations team checkouts the project ● Creates the deployment configuration for the project ● Build the project with deployment configuration ● Deploy the microgateways using the build artifacts (In Docker/k8s) 2. Operations Process
  • 38. ● Completes the deployment and testing of dev environment ● Creates the deployment configuration file for the test environment ● Configuration is changed to use the same runtime artifacts(executables/ containers) from dev environment ● Provides environment specific data as environment variables ● Build the project with deployment configuration for test ● Deploy the microgateways using the build artifacts (In Docker/k8s) ● Continue process until deployed in production 3. CI/CD Process
  • 39.
  • 40. Demo
  • 43. 2. Private Jet or Sidecar in MSA
  • 44. 3. Expose Microservices as APIs in a Service Mesh