WSO2	API	Manager:	Building	an	
Effective	API	Architecture
Nuwan	Dias	
Architect	
WSO2
Knowing	the	Components
Publisher Store Admin
Traffic	
Manager
Gateway
Key	
Manager
Non	scalable	components
Analytics
Scalable	components
Understanding	the	Storage
	Storage	Types	
• Registry	Database	-	Stores	API	Meta	Data,	Tenant	Key	Stores,	
Documents,	Tags	
• API	Manager	Database	-	Stores	API	Runtime	Data,	Application	Data,	
Token	Data,	etc.	
• Permissions	Database	-	Stores	role	to	permissions	and	user	to	
permissions	mappings.	
• Analytics	Summary	Database	-	Store	API/Application	usage	summary.
Understanding	the	Storage	Contd…
Component Reads	only	from 	Writes	to
Publisher Permissions	DB,	Analytics	DB Registry,	APIM	DB
Store Permissions	DB,	Analytics	DB,	
Registry
APIM	DB
Key	Manager Permissions	DB,	APIM	DB,	
Registry
Traffic	Manager Permissions	DB
Creating	an	API
Publisher Store
API	Manager	DB	
(Runtime	Data)
Registry	DB	
(Meta	Data)
Publishing	an	API
LANDMZ
PublisherGateway	ManagerGateway	Worker
Gateway	Worker
Secure	Web		
Service	Call
Store
Publishing	an	API
LANDMZ
PublisherGateway	ManagerGateway	Worker
Gateway	Worker
Secure	Web		
Service	Call
Store
API:	The	runnable	artifact
<api name="nuwan--Petstore"

context="/petstore/1.0.0"

version="1.0.0"

version-type="context">

<resource methods="POST PUT" url-mapping="/pet">
…………………………..	
<resource methods="DELETE PUT GET"

uri-template="/user/{username}">
…………………………..	
<handlers>
<handler
class="org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHa
ndler">
……………………………
API:	The	handler	flow
<handlers>

<handler class="org.wso2.carbon.apimgt.gateway.handlers.common.APIMgtLatencyStatsHandler"/>

<handler class="org.wso2.carbon.apimgt.gateway.handlers.security.CORSRequestHandler">

<property name="apiImplementationType" value="ENDPOINT"/>

</handler>

<handler class="org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler"/>

<handler class="org.wso2.carbon.apimgt.gateway.handlers.throttling.ThrottleHandler"/>

<handler class="org.wso2.carbon.apimgt.gateway.handlers.analytics.APIMgtUsageHandler"/>

<handler class="org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerExtensionHandler"/>

</handlers>
API	Security
Security	Validation
API	Gateway
Application
User
Key	Server
OAuth2.0	Grants	-	Client	Credentials
Image	Credits:	Prabath	Siriwardena
OAuth2.0	Grants	-	Resource	Owner	Password
Image	Credits:	Prabath	Siriwardena
OAuth2.0	Grants	-	Authorization	Code
Image	Credits:	Prabath	Siriwardena
OAuth2.0	Grants	-	Implicit
Image	Credits:	Prabath	Siriwardena
http://callback/#access_token=car292msdjtuis92lla
The	Role	of	the	Authorization/Key	Server
POST	/register
GET,	PUT,	DELETE	/register/{client_id}
POST	/introspection
POST	/token
POST	/revoke
API	Store
Resource	Server	(Gateway)
Authorization/Key	Server
Authentication
Authorization
Client	Registration
Client	Management
Introspection
Revocation
Token	Management
Federation
Traffic	Management	Architecture
Gateway Gateway
Policy		
Designer
Request	Event
Throttle	Event
Throttling	Policies
Traffic	Manager
Traffic	Manager	Scalability
• The	Traffic	Manager	does	not	scale	
• A	single	Traffic	Manager	can	handle	up	to	10	Gateways	at	
maximum	capacity	
• If	a	deployment	consists	of	more	than	10	Gateways,	the	Gateways	
should	be	divided	into	groups	of	clusters	of	10	nodes	each,	having	
1	traffic	manager	per	group.
Analytics	Architecture
Gateway Admin
Publisher/Store
REST/http
Raw	Events	Storage	
(Big	Data)
Processed	Data

(Summary)
API:	Stages	vs	Environments	-	Stages
Production
Staging
Dev
Back-End	Systems
Data
Runtime
Use	appropriate		
tooling/processes		
for	the		
promotion/
demotion		
of	artifacts
API:	Stages	vs	Environments	-	Environments
Gateway	
(External)
Production
Gateway	
(Internal)
Key	Manager	
		(External)
Key	Manager	
(Internal)
Publisher
Store
API:	Stages	vs	Environments
Stage Environment
Represents	a	state	of	an	API Represents	the	execution	runtime	of	an	API	
in	a	given	state
An	API	may	go	through	modifications	when	
transferring	between	stages
The	API	Definition	is	fixed	across	
environments
Shouldn’t	share	data	between	stages May	share	data	across	environments
Ownership	of	the	API/data	may	change	
across	stages
Ownership	of	the	API/data	remains	same	
across	all	environments
Regional	Gateways	-	Database	Sync	Pattern
US-East
US-West
Load-Balancer
Gateway
Gateway
Key	Manager
Key	Manager
Sync	
Tables	
Selectively
Regional	Gateways	-	Token	Prefix	Pattern
US-East
US-West
Load-Balancer
Gateway
Gateway
Key	Manager
Key	Manager
Create	token		
with	prefix		
“EAST”
Create	token		
with	prefix		
“WEST”
Validate	token		
prefix	“WEST”
Validate	token		
prefix	“EAST”
Regional	Gateways	-	Token	Prefix	Pattern
public class CustomTokenGenerator extends OauthTokenIssuerImpl {
@Override

public String accessToken(OAuthTokenReqMessageContext tokReqMsgCtx) throws
OAuthSystemException {



String regionID = System.getProperty(REGION_ID);



if(log.isDebugEnabled()){

log.debug("Region ID = " + regionID);

}



String accessToken = UUID.randomUUID().toString();



return regionID != null ? regionID + accessToken : accessToken;

}
Regional	Gateways	-	Token	Prefix	Pattern
public class RegionValidator extends AbstractHandler {
public boolean handleRequest(MessageContext messageContext) {



String regionId = System.getProperty(REGION_ID);



if (log.isDebugEnabled()) {

log.debug("Region ID = " + regionId);

}
. . . . . . . . .
if(bearerToken == null || bearerToken.split(" ")[1].startsWith(regionId)){

//No bearer token provided or the provided bearer token is of the expected region.

return true;

}


handleAuthFailure(messageContext);
return false;
API	Manager:	Multi	Datacenter	Deployment
Types	of	Data	Center	Deployments	
• Single	Master,	Active-Active	
• Single	Master,	Active-Passive	(Disaster	Recovery)	
• Multi	Master,	Active-Active
API	Manager:	Multi	Datacenter	Deployment
Master Master	or	Slave
Thank	You!

More Related Content

PDF
WSO2Con USA 2017: Brokerage as a Service (BaaS), Transforming Fidelity Broker...
PDF
WSO2 Intro Webinar - Simplifying Enterprise Integration with Configurable WS...
PDF
WSO2Con USA 2017: Driving Insights for Your Digital Business With Analytics
PDF
Application development using the wso2 developer studio
PDF
In the Spotlight WSO2 App Factory
PDF
Building Applications with Carbon Studio on Premise and Cloud
PDF
Exploring a Real World Use Case
PDF
Managing ESB artifacts with the WSO2 Governance Registry
WSO2Con USA 2017: Brokerage as a Service (BaaS), Transforming Fidelity Broker...
WSO2 Intro Webinar - Simplifying Enterprise Integration with Configurable WS...
WSO2Con USA 2017: Driving Insights for Your Digital Business With Analytics
Application development using the wso2 developer studio
In the Spotlight WSO2 App Factory
Building Applications with Carbon Studio on Premise and Cloud
Exploring a Real World Use Case
Managing ESB artifacts with the WSO2 Governance Registry

What's hot (20)

PDF
Rapid Web Application Development with the WSO2 Mashup Server
PDF
Expanding OEM Opportunities with WSO2
PDF
Docker in the Enterprise
PDF
Extending the WSO2 Governance Registry with Handlers and Filters
PPTX
Serverless Architecture
PDF
Think BIG, Spend Small A Look at how WSO2 Can Help Scale Up with Less Cost
PDF
AWS Api Gateway by Łukasz Marchewka Scalacc
PPTX
Lightweight ESB Alternatives
PPTX
Making your API behave like a big boy
PDF
[WSO2Con EU 2017] Microservices for Enterprises
PPTX
Api gateway : To be or not to be
PDF
60 minutes in the cloud: Predictive analytics made easy
PPTX
Eight Miles High: Build Cloud-native and Cloud-aware Systems
PPTX
High Productivity Platform
PDF
WSO2 Use Case - API Facade Pattern
PDF
MongoDB-as-a-Service on Pivotal Cloud Foundry
PDF
A Walk through SSO
PDF
Deep Dive Into Elasticsearch: Establish A Powerful Log Analysis System With E...
PDF
Integration Microservices
PDF
Building Scalable Real-Time Data Pipelines with the Couchbase Kafka Connector...
Rapid Web Application Development with the WSO2 Mashup Server
Expanding OEM Opportunities with WSO2
Docker in the Enterprise
Extending the WSO2 Governance Registry with Handlers and Filters
Serverless Architecture
Think BIG, Spend Small A Look at how WSO2 Can Help Scale Up with Less Cost
AWS Api Gateway by Łukasz Marchewka Scalacc
Lightweight ESB Alternatives
Making your API behave like a big boy
[WSO2Con EU 2017] Microservices for Enterprises
Api gateway : To be or not to be
60 minutes in the cloud: Predictive analytics made easy
Eight Miles High: Build Cloud-native and Cloud-aware Systems
High Productivity Platform
WSO2 Use Case - API Facade Pattern
MongoDB-as-a-Service on Pivotal Cloud Foundry
A Walk through SSO
Deep Dive Into Elasticsearch: Establish A Powerful Log Analysis System With E...
Integration Microservices
Building Scalable Real-Time Data Pipelines with the Couchbase Kafka Connector...
Ad

Viewers also liked (20)

PDF
WSO2Con USA 2017: Implementing a Modern API Management Solution that Benefits...
PDF
WSO2Con USA 2017: APIs as Your Digital Connector
PDF
WSO2Con USA 2017: Iterative Architecture: A Pragmatic Approach to Digital Tra...
PDF
WSO2Con USA 2017: Rise to the Challenge with WSO2 Identity Server and WSO2 AP...
PDF
WSO2Con USA 2017: Managing Verifone’s New Payment Device “Carbon” with WSO2’s...
PDF
WSO2Con USA 2017: The Role of Enterprise Integration in Digital Transformation
PPTX
WSO2Con USA 2017: DevOps Best Practices in 7 Steps
PDF
WSO2Con USA 2017: A Semantic and Ontology Informational Data Model
PDF
WSO2Con USA 2017: Building Platforms for Rapid Application Development
PDF
WSO2Con USA 2017: Building a Successful Delivery Team for Customer Success
PDF
WSO2Con USA 2017: Positioning WSO2 for Quicker Uptake
PDF
WSO2Con USA 2017: Keynote - The Blockchain’s Digital Disruption
PDF
Introducing Ballerina
PDF
WSO2Con USA 2017: Scalable Real-time Complex Event Processing at Uber
PDF
WSO2Con USA 2017: Is It Time to Update My Open Source Strategy?
PPTX
WSO2Con USA 2017: Multi-tenanted, Role-based Identity & Access Management sol...
PDF
WSO2Con USA 2017: WSO2 Partner Program – Engaging with WSO2
PDF
WSO2Con USA 2017: Journey of Migration from Legacy ESB to Modern WSO2 ESB Pla...
PDF
WSO2Con USA 2017: IoT in Airline Operations
PPTX
WSO2Con USA 2017: Enhancing Customer Experience with WSO2 Identity Server
WSO2Con USA 2017: Implementing a Modern API Management Solution that Benefits...
WSO2Con USA 2017: APIs as Your Digital Connector
WSO2Con USA 2017: Iterative Architecture: A Pragmatic Approach to Digital Tra...
WSO2Con USA 2017: Rise to the Challenge with WSO2 Identity Server and WSO2 AP...
WSO2Con USA 2017: Managing Verifone’s New Payment Device “Carbon” with WSO2’s...
WSO2Con USA 2017: The Role of Enterprise Integration in Digital Transformation
WSO2Con USA 2017: DevOps Best Practices in 7 Steps
WSO2Con USA 2017: A Semantic and Ontology Informational Data Model
WSO2Con USA 2017: Building Platforms for Rapid Application Development
WSO2Con USA 2017: Building a Successful Delivery Team for Customer Success
WSO2Con USA 2017: Positioning WSO2 for Quicker Uptake
WSO2Con USA 2017: Keynote - The Blockchain’s Digital Disruption
Introducing Ballerina
WSO2Con USA 2017: Scalable Real-time Complex Event Processing at Uber
WSO2Con USA 2017: Is It Time to Update My Open Source Strategy?
WSO2Con USA 2017: Multi-tenanted, Role-based Identity & Access Management sol...
WSO2Con USA 2017: WSO2 Partner Program – Engaging with WSO2
WSO2Con USA 2017: Journey of Migration from Legacy ESB to Modern WSO2 ESB Pla...
WSO2Con USA 2017: IoT in Airline Operations
WSO2Con USA 2017: Enhancing Customer Experience with WSO2 Identity Server
Ad

Similar to WSO2Con USA 2017: Building an Effective API Architecture (19)

PPTX
2013 02-apache conna-api-manager-asanka
PPTX
Hadoop Summit San Jose 2014 - Analyzing Historical Data of Applications on Ha...
PPTX
Analyzing Historical Data of Applications on YARN for Fun and Profit
PDF
Introduction to the All New WSO2 Governance Centre
PDF
API and Big Data Solution Patterns
PDF
Preparing for Data Residency and Custom Domains
PDF
AWS Innovate: Build a Data Lake on AWS- Johnathon Meichtry
PDF
VMworld 2013: Performance Management of Business Critical Applications using ...
PDF
PPTX
HTML5 Programming
PDF
Serverless SQL
PPTX
MongoDB.local Dallas 2019: Pissing Off IT and Delivery: A Tale of 2 ODS's
PPT
Oracle bi ee architecture
PPTX
WSO2 Workshop Sydney 2016 - APIs
PPTX
Building API Driven Microservices
PPT
Creating a World-Class RESTful Web Services API
PDF
Realtime Analytics on AWS
PPTX
Applications Manager Technical Overview
PPT
2013 02-apache conna-api-manager-asanka
Hadoop Summit San Jose 2014 - Analyzing Historical Data of Applications on Ha...
Analyzing Historical Data of Applications on YARN for Fun and Profit
Introduction to the All New WSO2 Governance Centre
API and Big Data Solution Patterns
Preparing for Data Residency and Custom Domains
AWS Innovate: Build a Data Lake on AWS- Johnathon Meichtry
VMworld 2013: Performance Management of Business Critical Applications using ...
HTML5 Programming
Serverless SQL
MongoDB.local Dallas 2019: Pissing Off IT and Delivery: A Tale of 2 ODS's
Oracle bi ee architecture
WSO2 Workshop Sydney 2016 - APIs
Building API Driven Microservices
Creating a World-Class RESTful Web Services API
Realtime Analytics on AWS
Applications Manager Technical Overview

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
Comparative analysis of machine learning models for fake news detection in so...
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PDF
Flame analysis and combustion estimation using large language and vision assi...
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PDF
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PDF
Auditboard EB SOX Playbook 2023 edition.
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PPTX
Configure Apache Mutual Authentication
PPTX
Build Your First AI Agent with UiPath.pptx
PDF
INTERSPEECH 2025 「Recent Advances and Future Directions in Voice Conversion」
PDF
Rapid Prototyping: A lecture on prototyping techniques for interface design
PPTX
MuleSoft-Compete-Deck for midddleware integrations
PPTX
Microsoft User Copilot Training Slide Deck
PDF
Data Virtualization in Action: Scaling APIs and Apps with FME
Comparative analysis of machine learning models for fake news detection in so...
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
Consumable AI The What, Why & How for Small Teams.pdf
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
Flame analysis and combustion estimation using large language and vision assi...
Basics of Cloud Computing - Cloud Ecosystem
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
Lung cancer patients survival prediction using outlier detection and optimize...
giants, standing on the shoulders of - by Daniel Stenberg
Auditboard EB SOX Playbook 2023 edition.
Enhancing plagiarism detection using data pre-processing and machine learning...
Configure Apache Mutual Authentication
Build Your First AI Agent with UiPath.pptx
INTERSPEECH 2025 「Recent Advances and Future Directions in Voice Conversion」
Rapid Prototyping: A lecture on prototyping techniques for interface design
MuleSoft-Compete-Deck for midddleware integrations
Microsoft User Copilot Training Slide Deck
Data Virtualization in Action: Scaling APIs and Apps with FME

WSO2Con USA 2017: Building an Effective API Architecture