SlideShare a Scribd company logo
API Management within a Microservices
Architecture
Nadeesha Gamage
Senior Lead Solutions Engineer
WSO2 At-A-Glance
2
$25m Sales in
2017
53% YoY
growth
450+
Customers,
175 New
Customers in
2017
Open
Source
Founded 2005,
Backed by
Cisco and Toba
Capital
Colombo
London
Mountain View, CA
New York, NY
São Paulo
Sydney
500+
Employees
(300 Engineers)
3
#1
6th
Open Source Integration Vendor
Largest Apache Committer
Largest Open Source Vendor
5th
WSO2: Helping Digitally Driven Organizations
Become Integration Agile
OPEN TECHNOLOGY FOR AGILE DIGITAL BUSINESS
4
Build internal and
external developer
ecosystems with an
API marketplace.
Manage identity,
security, and
privacy across
your digital
business.
Create real-time, intelligent,
actionable business insights
and data products.
Platform enable your digital
business with “micro-services”
and “micro-integrations”.
All WSO2 PRODUCTS ARE
5
WSO2 PRODUCTS
Seamlessly Integrated
Comprehensive platform
Go to market faster
Flexible
Deploy on-premises, public or private
cloud, or hybrid environment
Easily migrate between on-premises and
in the cloud
100% Open source
Quickly build POC
Affordably scale out to production
systems
Backed by world class team
More than a decade of experience
helping companies realize digital
transformation goals
The WSO2 Subscription
Get the most from your WSO2 product with enterprise-grade services:
Open
source
technology
WSO2
Subscription
Options:
- WSO2 managed cloud
- Consulting services
- Managed services
6
WSO2 Training and Certification
Training material free online; learn at your own pace
7
WSO2 Provides
Certification a verifiable way to present skills to team, employers, customers, partners.
Standard training (onsite and online)
Customized training (on-site) in-depth, personalized training for your specific need
ANALYSTS SAY
8
“Strong Performer for Hybrid
Integration”
- The Forrester Wave™: Hybrid Integration for
Enterprises, Q4 2016 report, published November 18,
2016
“Leader in API Management
Solutions”
- The Forrester Wave™: API Management Solutions, Q4
2018 report, published November 1, 2018.
“Visionary”
- Gartner Cool Vendors in Internet of Things Analytics,
2016 report, published May 11, 2016.
“Strong Performer for Big Data
Streaming Analytics”
- The Forrester Wave™: Big Data Streaming Analytics,
Q1 2016 report1, published March 30, 2016.
- Gartner Magic Quadrant for Full Life Cycle API
Management, published October 27, 2016
“Cool Vendor”
Worldwide Customer Presence
9
Flagship Customers
Across every industry and geography
Financial Healthcare Governments Education Telecom Retail TechnologyTransport
10
Agenda
● APIs, the digital connector
● Microservices Architecture
● WSO2 API Manager
● Introduction to WSO2 API Microgateway
● Demo on WSO2 API Manager and Microgateway
● API Microgateway deployment patterns
11
It Is The Age Of The Consumer
12
Source: Forrester Research
API - “The Digital Connector”
API - “The Digital Connector”
● APIs are the interfaces that allows various
services to expose their functionality for
consumption.
● Enables platform independent, language
neutral way of integration.
● Enables Digital Transformation.
Digital
Transformation is all
about creating a
“Digital Experience”
for your customers
Why is it needed to manage APIs?
○ Open API access to consumers
○ Easy API discoverability
○ Protecting APIs
■ Securing for unauthorized access
■ Fine grained access control
■ Throttling
○ Metering and Monitoring
○ Monetization
○ Manage lifecycle and versioning
Monolithic vs Microservices
17
http://www.rafaelhart.com/2018/03/18/monolith-or-microservices.html
Monolithic Applications
Monolithic Application (continued)
● Despite modularity, application is packaged as
a single monolith
● Packaging depends on the language
○ .war, .jar or directory structure
● Simple to test and deploy
● If simple, what is the issue?
○ Simple and easy only at the beginning
Problems with Monolithic applications
● Increasingly difficult to make code changes
Disrupts agile development
● Overtime, no single developer will understand the entire
code. Changes will be error prone
● CI/CD would become painful
● Scaling would be difficult
● An issue in one component could potentially bring down the
entire application
● Stuck with a single language
Microservices Architecture (MSA)
Microservices Architecture pattern
● An application written as small interconnected services,
each implementing distinct functionality
● Self contained, maintains its own datastores
● Each service may expose a REST API, a transactions
require interaction with multiple service.
● Services may also use other Inter-process-
communication methods to interact, such as queue etc.
Advantages with MSA
● Faster and focused development
● Easy deployment and thus easy CI/CD
● Demand based scalability and flexibility
● Reduced downtime due to modularity
● Reduce time to market for new features and
capabilities.
API Management within a Microservice Architecture
Drawback of MSA
● Inherent complexity of distribution of systems
○ Handling transactions (partial failures)
● Multiple databases
● Need for advanced technology (service mesh,
service discovery, circuit breaker, container
orchestration etc)
Does MSA need API Management?
● Common misconception that Microservices
Architecture eliminates the need of API
Management.
● Rather it augments and works collaboratively
● Don’t we need control on what we expose as a
REST API in microservices?
● Its not a good practice to allow apps to directly
consume microservice
What API Management brings to MSA
● Control API access and security
● API portal and discoverability
● Monitoring usage
● API documentation and testing before adoption
● Versioning and lifecycle management
Traditional Gateway vs Gateway for MSA
Microservices with an API Gateway
● API Microgateway for service
- Deploying Gateway closer to the microservice
API Gateways
MicroservicesProducts Orders
● API Microgateway for each client
- The same API interface exposed to 3 types of Gateways. Each
optimized for the client type it serves.
Products
Orders
MobileWebPublic
Microservices with an API Gateway
WSO2 API Manager
Design, create, publish and manage APIs to
unlock the true value of your digital assets
34
WSO2 API Manager
35
Componentized
36
WSO2 API Manager
● Available as a single
downloadable package
● Available as a cloud / SaaS
solution
● Flexible deployment choices
● High performance gateway
● API governance, marketplace
solution
37
Cloud First or Start On-Prem
● Multi-tenanted, shared
everything
● WSO2 Hosted and managed
● Pay as you go
● Multi-region availability
● VPN tunnel to private DC
● Guaranteed uptime
● Limited options in customizing
● Hybrid Cloud
● Privately hosted
● WSO2 managed
● Upgrades, patches installation
● Guaranteed uptime
● Full flexibility in customization
● Better control
● Self hosted
● Self managed
● Full flexibility
● Dev-ops learning curve
● Self managed upgrades
http://wso2.com/api-management/cloud/
https://docs.wso2.com/display/ManagedCl
oud/WSO2+Managed+Cloud+Documenta
tion
Creating an API
Designing or Publicizing an API
38
39
● Start with an existing endpoint/contract or design and prototype a new API
● Exposing SOAP services (convert to REST or as a passthrough)
● Exposing streaming APIs (Websocket endpoints)
Creating APIs
40
● API Design - Over the wizard & with swagger
Creating APIs
41
● Point to a production backend or prototype at the gateway
Managed or prototyped
Publishing an API
Enforcing Security and SLAs
42
43
● Protecting for applications and users
● Controlling access and entitlement with scope
● Multi-Tier subscription model
Protecting APIs
44
Protecting APIs
45
Authorization & Introspection
46
● Encapsulate the client application
● Associates OAuth2 keys
● Support different integration
patterns for application security
through OAuth grant types
● Pre-generated access tokens for
testing
Client Application
47
● Tier based simple model
○ Application developer selects the tier at app registration
○ Each tier is tied to a policy that describe the quota
○ Tiers can be applied at the application, API or at the API resource level
● Advance rule based models
○ Policies containing IP conditions, message attribute based conditions,
transport header based conditions
○ Complex real time pattern based conditions
Traffic Management
48
Traffic Management
49
Traffic Manager Architecture
50
● Manage stages of an API
● Manage associated states
● Create a new version from an
existing
● Audit changes to lifecycle
states
● Support for custom lifecycles
API Lifecycle Management
Consuming an API
The developer portal / marketplace
51
52
● Searchable (with context) - by name, tag,
description, author etc.
● Social features: tagging, commenting,
rating
● Minimalistic forum
● Themeable: change color, logo, view
● Configure alerts for application developers
● Application based API analytics
● OAuth2 application management
● API Monetization
The Developer Portal
Monitoring an API
Analytics and Insight
53
54
● Analytics dashboard on API stats
○ API Usage / Response
times / Backend latency /
Geo-location etc
● Stats on Applications for
application owners (subscribers)
● Stats on subscriptions
API Analytics: Batch
55
● Leverages real-time analytics streaming engine
● Used for various alerting use-cases
○ Fraudulent access token usage
○ Keeping API developers alerted on backend performance issues
○ Alerting on SLA violations
○ Alerting on tier crossing for subscriptions
● Detect trends
● Detect API call sequences that needs to be blocked
● Detect non-usage scenarios
API Analytics: Realtime
56
API Analytics: Architecture
The API Manager Runtime
Processing Flow and Extensibility
57
58
API Gateway
59
● Message manipulation,
transformation and enrichment
● WSO2 developer studio based
tooling
● Wizard based mediation policy
application
Message mediation
60
API Gateway Performance
WSO2 API Manager all in one simple deployment performance
H/W config: 4 core cpu with 8GB memory / c4.xlarge ec2 equivalent
Extensibility & Enhancements
61
62
● API gateway handlers
○ Security handlers
○ Analytics handlers
● OAuth custom grant types
○ SAML extension grant type
○ NTLM / Kerberos
○ JWT extension grant
Extensibility & Enhancements
63
● OAuth scope handlers
○ Role based scope validation
○ XACML based scope validation
● Mediation extensions
○ Message transformation
○ Routing to backends
○ Payload validation
● Lifecycle extension
○ Executor plugin for lifecycle stages / transitions
Extensibility & Enhancements
API Microgateway
64
Introducing the WSO2 API Microgateway
● Designed to scale.
○ Immutable
○ Self validating tokens
○ Localized rate limiting
○ Offline analytics
● Native support for Docker/K8S.
● Dedicated gateway for microservices.
● First class support for lifecycle management across
environments.
● Low resource requirement (2 core, 256 MB RAM).
Characteristic of WSO2 API Microgateway
● Ability to execute in isolation without connection to other
components; key manager, traffic manager etc.
● Ability to manage a subset of APIs, instead of all.
● Offers a proxy that is capable of performing security validation,
in-memory (local) throttling and operational analytics.
● Immutability.
Microgateway Overview
Microgateway Toolkit
Microgateway
Runtime
Request
API
Definitions
Download API
Definitions
(JSON)
Generate Microgateway
Runtime
Microgateway Security - JWT/JWS
Microgateway Products
Orders
Request
Access
Token (with
scopes)
Provide
Signed
JWT
1
2
3
3
Microgateway
4
4
Client Application
sends Signed JWT
to Microgateways
Microgateway Security - Standard OAuth2.0
Request
Access
Token (with
scopes)
Provide
Opaque
Token
1
2
3
Microgateway
4
Client Application sends
Token to Microgateway
Validate
Token
Microgateway - Localized Rate Limiting
Rate limiting policies are burnt into the microgateway runtime
Microgateway
Products Orders
Apply 1000
req/min on
Products
microservic
e
Apply 500
req/min on
Orders
microservic
e
Microgateway - Offline Analytics
Microgateway
Microgateway
Accumulate data in files
and upload offline
Microgateway - Native Support for Docker/K8S
Microgateway Toolkit
Request
API
Definitions
Download
API
Definitions
(JSON)
Microgateway VM
Microgateway
Docker
Microgateway K8S
Provide relevant arguments in
build phase for desired output
Microgateway - Cross Environment Lifecycle Mgt
Microgateway VM
Microgateway
Microgateway
Staging
Prod
Products
Products
gateway -e
ProductsAPI.v1.prod.endpoint.0="http://staging.apis.wso2.com/products"
gateway -e ProductsAPI.v1.prod.endpoint.0="http://apis.wso2.com/products"
API Gateway vs Microgateway
Feature API Gateway Microgateway
Self contained token based authentication No Yes
OAuth 2.0 token based authentication Yes Yes
Mediation extension support(in/out sequences) Yes No
Response Caching(GET and HEAD methods) Yes Yes
Javascript based mediation logic Yes No
Analytics support Yes Yes
Logging and monitoring support Yes Yes
When to use API Microgateway
● Run in lockdown or offline mode
● Cater to unusual traffic patterns of APIs (run in private
jet mode)
● Scaling a subset of APIs.
● When consumers and services reside in the same
network and a gateway is required in close proximity to
reduce latency.
● Running the gateway in sidecar mode.
When to use the traditional API gateway
● When there is requirement to throttle API calls based
on counters across all gateway nodes.
● Run API gateway as centralized gateway. Handle
requests for many different APIs and different backend
servers.
● Traditional SOAP architecture which requires Gateway
to perform mediations, orchestrations.
Demo
API Microgateway
deployment patterns in MSA
79
Centralized API Gateway
Shared Cluster of API Gateways to Handle the Internal and External Load
80
Private Jet API Gateway
Dedicated API Gateways to Each Microservice or a Group of Microservices
81
Sidecar API Gateway
API Gateway alongside Microservices - Service Mesh Architecture
THANK YOU
wso2.com

More Related Content

PPTX
Microservices Architecture & Testing Strategies
PDF
Understanding MicroSERVICE Architecture with Java & Spring Boot
PPTX
Rest assured
PDF
Architecting an Enterprise API Management Strategy
PPTX
Automated API pentesting using fuzzapi
PDF
Azure Application insights - An Introduction
PDF
API for Beginners
PPTX
Azure - Identity as a service
Microservices Architecture & Testing Strategies
Understanding MicroSERVICE Architecture with Java & Spring Boot
Rest assured
Architecting an Enterprise API Management Strategy
Automated API pentesting using fuzzapi
Azure Application insights - An Introduction
API for Beginners
Azure - Identity as a service

What's hot (20)

PDF
API Management - Why it matters!
PDF
An Introduction To Automated API Testing
PDF
MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63
PPTX
Introduction to microservices
PPSX
Microservices, Containers, Kubernetes, Kafka, Kanban
PDF
Microservices Technology Stack
PDF
Building an API Security Strategy
PPTX
Api Testing
PDF
IBM API Connect - overview
PDF
Highlights of WSO2 API Manager 4.0.0
PDF
Design patterns for microservice architecture
PDF
Introduction to Event-Driven Architecture
PDF
Dependency Down, Flexibility Up – The Benefits of API-First Development
PDF
Mastering Azure Monitor
PDF
Microservices Design Patterns
PDF
API Security Best Practices & Guidelines
PPTX
Azure fundamentals
PPTX
Azure integration services from the IT Professional perspective
PPTX
Windows Azure Service Bus
PPTX
Api testing
API Management - Why it matters!
An Introduction To Automated API Testing
MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63
Introduction to microservices
Microservices, Containers, Kubernetes, Kafka, Kanban
Microservices Technology Stack
Building an API Security Strategy
Api Testing
IBM API Connect - overview
Highlights of WSO2 API Manager 4.0.0
Design patterns for microservice architecture
Introduction to Event-Driven Architecture
Dependency Down, Flexibility Up – The Benefits of API-First Development
Mastering Azure Monitor
Microservices Design Patterns
API Security Best Practices & Guidelines
Azure fundamentals
Azure integration services from the IT Professional perspective
Windows Azure Service Bus
Api testing
Ad

Similar to API Management within a Microservice Architecture (20)

PDF
[Workshop] Managing the API lifecycle with Open Source Technologies
PDF
The Best of Both Worlds: Introducing WSO2 API Manager 4.0.0
PDF
WSO2 API Manager 2.0 - Overview
PDF
WSO2 User Group Bangalore Meetup
PPTX
WSO2- OSC Korea - Accelerating Digital Businesses with APIs
PDF
WSO2 API Manager - Product Overview
PDF
Api management best practices with wso2 api manager
PDF
[Workshop] API-driven Integration
PDF
Application Development with API Manager
PPT
Six Steps To Build A Successful API
PPT
Six Steps to Build Successful APIs
PDF
Presentation WSO2 workshop Brussels September 24th 2014 (APIs-Integration)
PDF
Building an API Centric SOA
PPTX
WSO2 Workshop Sydney 2016 - APIs
PDF
[WSO2 Summit EMEA 2020] APIs: The Products of the 21st Century
PPTX
API Management Platform Technical Evaluation Framework
PDF
João Emilio Santos Bento da Silva - Estratégia de APIs
PDF
Introducing WSO2 API Manager for Mobile Applications and Rapid Integration
PDF
WSO2 API Platform: Vision and Roadmap
PPTX
Open api in enterprise
[Workshop] Managing the API lifecycle with Open Source Technologies
The Best of Both Worlds: Introducing WSO2 API Manager 4.0.0
WSO2 API Manager 2.0 - Overview
WSO2 User Group Bangalore Meetup
WSO2- OSC Korea - Accelerating Digital Businesses with APIs
WSO2 API Manager - Product Overview
Api management best practices with wso2 api manager
[Workshop] API-driven Integration
Application Development with API Manager
Six Steps To Build A Successful API
Six Steps to Build Successful APIs
Presentation WSO2 workshop Brussels September 24th 2014 (APIs-Integration)
Building an API Centric SOA
WSO2 Workshop Sydney 2016 - APIs
[WSO2 Summit EMEA 2020] APIs: The Products of the 21st Century
API Management Platform Technical Evaluation Framework
João Emilio Santos Bento da Silva - Estratégia de APIs
Introducing WSO2 API Manager for Mobile Applications and Rapid Integration
WSO2 API Platform: Vision and Roadmap
Open api in enterprise
Ad

More from WSO2 (20)

PDF
Demystifying CMS-0057-F - Compliance Made Seamless with WSO2
PDF
Quantum Threats Are Closer Than You Think – Act Now to Stay Secure
PDF
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
PDF
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
PDF
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
PDF
Platformless Modernization with Choreo.pdf
PDF
Application Modernization with Choreo for the BFSI Sector
PDF
Choreo - The AI-Native Internal Developer Platform as a Service: Overview
PDF
[Roundtable] Choreo - The AI-Native Internal Developer Platform as a Service
PPTX
WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1)
PPTX
WSO2Con 2025 - Building Secure Business Customer and Partner Experience (B2B)...
PPTX
WSO2Con 2025 - Building Secure Customer Experience Apps
PPTX
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
PPTX
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
PPTX
WSO2Con 2025 - Unified Management of Ingress and Egress Across Multiple API G...
PPTX
WSO2Con 2025 - How an Internal Developer Platform Lets Developers Focus on Code
PPTX
WSO2Con 2025 - Architecting Cloud-Native Applications
PDF
Mastering Intelligent Digital Experiences with Platformless Modernization
PDF
Accelerate Enterprise Software Engineering with Platformless
PDF
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
Demystifying CMS-0057-F - Compliance Made Seamless with WSO2
Quantum Threats Are Closer Than You Think – Act Now to Stay Secure
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
Platformless Modernization with Choreo.pdf
Application Modernization with Choreo for the BFSI Sector
Choreo - The AI-Native Internal Developer Platform as a Service: Overview
[Roundtable] Choreo - The AI-Native Internal Developer Platform as a Service
WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1)
WSO2Con 2025 - Building Secure Business Customer and Partner Experience (B2B)...
WSO2Con 2025 - Building Secure Customer Experience Apps
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
WSO2Con 2025 - Unified Management of Ingress and Egress Across Multiple API G...
WSO2Con 2025 - How an Internal Developer Platform Lets Developers Focus on Code
WSO2Con 2025 - Architecting Cloud-Native Applications
Mastering Intelligent Digital Experiences with Platformless Modernization
Accelerate Enterprise Software Engineering with Platformless
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation

Recently uploaded (20)

PDF
Encapsulation theory and applications.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
MYSQL Presentation for SQL database connectivity
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Machine Learning_overview_presentation.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPT
Teaching material agriculture food technology
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
Encapsulation theory and applications.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Spectral efficient network and resource selection model in 5G networks
Unlocking AI with Model Context Protocol (MCP)
MYSQL Presentation for SQL database connectivity
“AI and Expert System Decision Support & Business Intelligence Systems”
Advanced methodologies resolving dimensionality complications for autism neur...
Machine Learning_overview_presentation.pptx
Chapter 3 Spatial Domain Image Processing.pdf
NewMind AI Weekly Chronicles - August'25-Week II
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
The Rise and Fall of 3GPP – Time for a Sabbatical?
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Electronic commerce courselecture one. Pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Review of recent advances in non-invasive hemoglobin estimation
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Teaching material agriculture food technology
Building Integrated photovoltaic BIPV_UPV.pdf

API Management within a Microservice Architecture

  • 1. API Management within a Microservices Architecture Nadeesha Gamage Senior Lead Solutions Engineer
  • 2. WSO2 At-A-Glance 2 $25m Sales in 2017 53% YoY growth 450+ Customers, 175 New Customers in 2017 Open Source Founded 2005, Backed by Cisco and Toba Capital Colombo London Mountain View, CA New York, NY São Paulo Sydney 500+ Employees (300 Engineers)
  • 3. 3 #1 6th Open Source Integration Vendor Largest Apache Committer Largest Open Source Vendor 5th WSO2: Helping Digitally Driven Organizations Become Integration Agile
  • 4. OPEN TECHNOLOGY FOR AGILE DIGITAL BUSINESS 4 Build internal and external developer ecosystems with an API marketplace. Manage identity, security, and privacy across your digital business. Create real-time, intelligent, actionable business insights and data products. Platform enable your digital business with “micro-services” and “micro-integrations”.
  • 5. All WSO2 PRODUCTS ARE 5 WSO2 PRODUCTS Seamlessly Integrated Comprehensive platform Go to market faster Flexible Deploy on-premises, public or private cloud, or hybrid environment Easily migrate between on-premises and in the cloud 100% Open source Quickly build POC Affordably scale out to production systems Backed by world class team More than a decade of experience helping companies realize digital transformation goals
  • 6. The WSO2 Subscription Get the most from your WSO2 product with enterprise-grade services: Open source technology WSO2 Subscription Options: - WSO2 managed cloud - Consulting services - Managed services 6
  • 7. WSO2 Training and Certification Training material free online; learn at your own pace 7 WSO2 Provides Certification a verifiable way to present skills to team, employers, customers, partners. Standard training (onsite and online) Customized training (on-site) in-depth, personalized training for your specific need
  • 8. ANALYSTS SAY 8 “Strong Performer for Hybrid Integration” - The Forrester Wave™: Hybrid Integration for Enterprises, Q4 2016 report, published November 18, 2016 “Leader in API Management Solutions” - The Forrester Wave™: API Management Solutions, Q4 2018 report, published November 1, 2018. “Visionary” - Gartner Cool Vendors in Internet of Things Analytics, 2016 report, published May 11, 2016. “Strong Performer for Big Data Streaming Analytics” - The Forrester Wave™: Big Data Streaming Analytics, Q1 2016 report1, published March 30, 2016. - Gartner Magic Quadrant for Full Life Cycle API Management, published October 27, 2016 “Cool Vendor”
  • 10. Flagship Customers Across every industry and geography Financial Healthcare Governments Education Telecom Retail TechnologyTransport 10
  • 11. Agenda ● APIs, the digital connector ● Microservices Architecture ● WSO2 API Manager ● Introduction to WSO2 API Microgateway ● Demo on WSO2 API Manager and Microgateway ● API Microgateway deployment patterns 11
  • 12. It Is The Age Of The Consumer 12 Source: Forrester Research
  • 13. API - “The Digital Connector”
  • 14. API - “The Digital Connector” ● APIs are the interfaces that allows various services to expose their functionality for consumption. ● Enables platform independent, language neutral way of integration. ● Enables Digital Transformation.
  • 15. Digital Transformation is all about creating a “Digital Experience” for your customers
  • 16. Why is it needed to manage APIs? ○ Open API access to consumers ○ Easy API discoverability ○ Protecting APIs ■ Securing for unauthorized access ■ Fine grained access control ■ Throttling ○ Metering and Monitoring ○ Monetization ○ Manage lifecycle and versioning
  • 20. Monolithic Application (continued) ● Despite modularity, application is packaged as a single monolith ● Packaging depends on the language ○ .war, .jar or directory structure ● Simple to test and deploy ● If simple, what is the issue? ○ Simple and easy only at the beginning
  • 21. Problems with Monolithic applications ● Increasingly difficult to make code changes Disrupts agile development ● Overtime, no single developer will understand the entire code. Changes will be error prone ● CI/CD would become painful ● Scaling would be difficult ● An issue in one component could potentially bring down the entire application ● Stuck with a single language
  • 23. Microservices Architecture pattern ● An application written as small interconnected services, each implementing distinct functionality ● Self contained, maintains its own datastores ● Each service may expose a REST API, a transactions require interaction with multiple service. ● Services may also use other Inter-process- communication methods to interact, such as queue etc.
  • 24. Advantages with MSA ● Faster and focused development ● Easy deployment and thus easy CI/CD ● Demand based scalability and flexibility ● Reduced downtime due to modularity ● Reduce time to market for new features and capabilities.
  • 26. Drawback of MSA ● Inherent complexity of distribution of systems ○ Handling transactions (partial failures) ● Multiple databases ● Need for advanced technology (service mesh, service discovery, circuit breaker, container orchestration etc)
  • 27. Does MSA need API Management? ● Common misconception that Microservices Architecture eliminates the need of API Management. ● Rather it augments and works collaboratively ● Don’t we need control on what we expose as a REST API in microservices? ● Its not a good practice to allow apps to directly consume microservice
  • 28. What API Management brings to MSA ● Control API access and security ● API portal and discoverability ● Monitoring usage ● API documentation and testing before adoption ● Versioning and lifecycle management
  • 29. Traditional Gateway vs Gateway for MSA
  • 30. Microservices with an API Gateway ● API Microgateway for service - Deploying Gateway closer to the microservice API Gateways MicroservicesProducts Orders
  • 31. ● API Microgateway for each client - The same API interface exposed to 3 types of Gateways. Each optimized for the client type it serves. Products Orders MobileWebPublic Microservices with an API Gateway
  • 32. WSO2 API Manager Design, create, publish and manage APIs to unlock the true value of your digital assets
  • 35. 36 WSO2 API Manager ● Available as a single downloadable package ● Available as a cloud / SaaS solution ● Flexible deployment choices ● High performance gateway ● API governance, marketplace solution
  • 36. 37 Cloud First or Start On-Prem ● Multi-tenanted, shared everything ● WSO2 Hosted and managed ● Pay as you go ● Multi-region availability ● VPN tunnel to private DC ● Guaranteed uptime ● Limited options in customizing ● Hybrid Cloud ● Privately hosted ● WSO2 managed ● Upgrades, patches installation ● Guaranteed uptime ● Full flexibility in customization ● Better control ● Self hosted ● Self managed ● Full flexibility ● Dev-ops learning curve ● Self managed upgrades http://wso2.com/api-management/cloud/ https://docs.wso2.com/display/ManagedCl oud/WSO2+Managed+Cloud+Documenta tion
  • 37. Creating an API Designing or Publicizing an API 38
  • 38. 39 ● Start with an existing endpoint/contract or design and prototype a new API ● Exposing SOAP services (convert to REST or as a passthrough) ● Exposing streaming APIs (Websocket endpoints) Creating APIs
  • 39. 40 ● API Design - Over the wizard & with swagger Creating APIs
  • 40. 41 ● Point to a production backend or prototype at the gateway Managed or prototyped
  • 41. Publishing an API Enforcing Security and SLAs 42
  • 42. 43 ● Protecting for applications and users ● Controlling access and entitlement with scope ● Multi-Tier subscription model Protecting APIs
  • 45. 46 ● Encapsulate the client application ● Associates OAuth2 keys ● Support different integration patterns for application security through OAuth grant types ● Pre-generated access tokens for testing Client Application
  • 46. 47 ● Tier based simple model ○ Application developer selects the tier at app registration ○ Each tier is tied to a policy that describe the quota ○ Tiers can be applied at the application, API or at the API resource level ● Advance rule based models ○ Policies containing IP conditions, message attribute based conditions, transport header based conditions ○ Complex real time pattern based conditions Traffic Management
  • 49. 50 ● Manage stages of an API ● Manage associated states ● Create a new version from an existing ● Audit changes to lifecycle states ● Support for custom lifecycles API Lifecycle Management
  • 50. Consuming an API The developer portal / marketplace 51
  • 51. 52 ● Searchable (with context) - by name, tag, description, author etc. ● Social features: tagging, commenting, rating ● Minimalistic forum ● Themeable: change color, logo, view ● Configure alerts for application developers ● Application based API analytics ● OAuth2 application management ● API Monetization The Developer Portal
  • 52. Monitoring an API Analytics and Insight 53
  • 53. 54 ● Analytics dashboard on API stats ○ API Usage / Response times / Backend latency / Geo-location etc ● Stats on Applications for application owners (subscribers) ● Stats on subscriptions API Analytics: Batch
  • 54. 55 ● Leverages real-time analytics streaming engine ● Used for various alerting use-cases ○ Fraudulent access token usage ○ Keeping API developers alerted on backend performance issues ○ Alerting on SLA violations ○ Alerting on tier crossing for subscriptions ● Detect trends ● Detect API call sequences that needs to be blocked ● Detect non-usage scenarios API Analytics: Realtime
  • 56. The API Manager Runtime Processing Flow and Extensibility 57
  • 58. 59 ● Message manipulation, transformation and enrichment ● WSO2 developer studio based tooling ● Wizard based mediation policy application Message mediation
  • 59. 60 API Gateway Performance WSO2 API Manager all in one simple deployment performance H/W config: 4 core cpu with 8GB memory / c4.xlarge ec2 equivalent
  • 61. 62 ● API gateway handlers ○ Security handlers ○ Analytics handlers ● OAuth custom grant types ○ SAML extension grant type ○ NTLM / Kerberos ○ JWT extension grant Extensibility & Enhancements
  • 62. 63 ● OAuth scope handlers ○ Role based scope validation ○ XACML based scope validation ● Mediation extensions ○ Message transformation ○ Routing to backends ○ Payload validation ● Lifecycle extension ○ Executor plugin for lifecycle stages / transitions Extensibility & Enhancements
  • 64. Introducing the WSO2 API Microgateway ● Designed to scale. ○ Immutable ○ Self validating tokens ○ Localized rate limiting ○ Offline analytics ● Native support for Docker/K8S. ● Dedicated gateway for microservices. ● First class support for lifecycle management across environments. ● Low resource requirement (2 core, 256 MB RAM).
  • 65. Characteristic of WSO2 API Microgateway ● Ability to execute in isolation without connection to other components; key manager, traffic manager etc. ● Ability to manage a subset of APIs, instead of all. ● Offers a proxy that is capable of performing security validation, in-memory (local) throttling and operational analytics. ● Immutability.
  • 67. Microgateway Security - JWT/JWS Microgateway Products Orders Request Access Token (with scopes) Provide Signed JWT 1 2 3 3 Microgateway 4 4 Client Application sends Signed JWT to Microgateways
  • 68. Microgateway Security - Standard OAuth2.0 Request Access Token (with scopes) Provide Opaque Token 1 2 3 Microgateway 4 Client Application sends Token to Microgateway Validate Token
  • 69. Microgateway - Localized Rate Limiting Rate limiting policies are burnt into the microgateway runtime Microgateway Products Orders Apply 1000 req/min on Products microservic e Apply 500 req/min on Orders microservic e
  • 70. Microgateway - Offline Analytics Microgateway Microgateway Accumulate data in files and upload offline
  • 71. Microgateway - Native Support for Docker/K8S Microgateway Toolkit Request API Definitions Download API Definitions (JSON) Microgateway VM Microgateway Docker Microgateway K8S Provide relevant arguments in build phase for desired output
  • 72. Microgateway - Cross Environment Lifecycle Mgt Microgateway VM Microgateway Microgateway Staging Prod Products Products gateway -e ProductsAPI.v1.prod.endpoint.0="http://staging.apis.wso2.com/products" gateway -e ProductsAPI.v1.prod.endpoint.0="http://apis.wso2.com/products"
  • 73. API Gateway vs Microgateway Feature API Gateway Microgateway Self contained token based authentication No Yes OAuth 2.0 token based authentication Yes Yes Mediation extension support(in/out sequences) Yes No Response Caching(GET and HEAD methods) Yes Yes Javascript based mediation logic Yes No Analytics support Yes Yes Logging and monitoring support Yes Yes
  • 74. When to use API Microgateway ● Run in lockdown or offline mode ● Cater to unusual traffic patterns of APIs (run in private jet mode) ● Scaling a subset of APIs. ● When consumers and services reside in the same network and a gateway is required in close proximity to reduce latency. ● Running the gateway in sidecar mode.
  • 75. When to use the traditional API gateway ● When there is requirement to throttle API calls based on counters across all gateway nodes. ● Run API gateway as centralized gateway. Handle requests for many different APIs and different backend servers. ● Traditional SOAP architecture which requires Gateway to perform mediations, orchestrations.
  • 76. Demo
  • 78. 79 Centralized API Gateway Shared Cluster of API Gateways to Handle the Internal and External Load
  • 79. 80 Private Jet API Gateway Dedicated API Gateways to Each Microservice or a Group of Microservices
  • 80. 81 Sidecar API Gateway API Gateway alongside Microservices - Service Mesh Architecture