Deploy Your APIs for High Availability and Scalability

Post on 23-Jan-2018

925 views 0 download

transcript

WSO2 API ManagerDeploy Your APIs for High Availability and Scalability

Janaka Ranabahu Associate Technical Lead, WSO2Harsha Kumara Software Engineer, WSO2

About the Presenters

Janaka Ranabahu Associate Technical Lead, WSO2

Janaka is an Associate Technical Lead at WSO2. His main focus is on the WSO2 API Manager and has contributed to the WSO2 Governance Registry and WSO2 AppFactory.

Harsha Kumara Software Engineer, WSO2

Harsha is Software Engineer at WSO2. He holds a bachelor’s degree in Computer Science and Engineering from University of Moratuwa. His areas of interests include distributed systems, web services, adapting NoSQL databases for business applications and data mining applications.

Agendao Introductiono API Manager component breakdowno Integration of API Manager componentso API Manager deployment patterns

oStandaloneoFully distributedoFully distributed with cluster of each components

o Q&A

WSO2 API Manager

Features

o API Creation

o API Publication

o API Lifecycle Management

o API Versioning

o API Monetization

o API Security

WSO2 API Manager

Capabilities

o WSO2 Enterprise Service Bus

o WSO2 Identity Server

o WSO2 Governance Registry

o WSO2 Data Analytics Server

API Manager Component breakdown

o API Store This component provides a space for consumers to

self-register, discover API functionality, subscribe to APIs, evaluate them, and interact with API publishers.

o API Publisher This component enables API providers to easily create,

publish their APIs, share documentation, provision API keys, and gather feedback on API features, quality, and usage.

API Manager Component breakdown

o API Gateway This component is responsible for securing, protecting,

managing, and scaling API calls. The API gateway is a simple API proxy that intercepts API requests and applies policies such as throttling and security checks.

o API Key Manager This component is responsible for all security and key-

related operations. When an API call is sent to the Gateway, it calls the Key Manager server and verifies the validity of the token provided with the API call.

Data Storages

o API Manager Database Stores information related to the APIs along with the API subscription details.

o User Manager Database Stores information related to users and user roles. This information is shared among the Key Manager Server, Store, and Publisher.

o Registry Database

Used to store API metadata and other information. Shares information between the Publisher and Store.

Default carbon database embedded with API Manager binary distribution willcontain all tables necessary for registry and user management.

Component Interaction

API Publisher Flow

API Subscriber Flow

API Invocation Flow

Standalone Mode Deployment

Fully Distributed Deployment

Fully Distributed Deployment : Store Cluster

Fully Distributed Deployment : Gateway & Key Manager Cluster

Fully Distributed Deployment : Full Cluster

Multi Zone Deployment

Scaling

o Many occasions, we need to scale gateway and key manager when serving increasing traffic to gateways

o Scale horizontally achieved by adding more nodes to a system

o Adding a new node to a gateway cluster will scale gateway cluster horizontally

o Scale vertically achieved by adding resources to a node in a system, typically addition of more computing power(RAM)

Scale Horizontally

o To scale horizontally means to add more nodes to a system, such as adding a new node to a gateway cluster

o If we take gateway as an example, we can add more nodes to gateway cluster on demand

o Then load balancer should be detect newly added nodes and route requests to them

o This is the most common and widely used pattern of scaling API Manager deployments

o We can apply this pattern to gateway, key manager, store and publisher

Scale Horizontally

Scale Vertically

o Scale vertically means add more resources to a single node in a system, typically involving the addition of more computing power, RAM and etc

o Implementation of WSO2 API Façade facilitate by using WSO2 API Manager to build Demand and Façade layer, WSO2 ESB to build mediation layer and connect to the existing services

o In API Manager we can add mediation logic, service chaining, message formatting to API definition

o With API Façade pattern mediation, transformation logic will handled by ESB layer and it will add additional processing power to API management layer

Scale Vertically