+ All Categories
Home > Documents > API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services...

API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services...

Date post: 12-Jul-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
46
API Gateway @ NIE By Benny Lam & Devi Arputharajan, NIE ACIS Restricted
Transcript
Page 1: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

API Gateway @ NIEBy Benny Lam & Devi Arputharajan, NIE ACIS

Restricted

Page 2: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Agenda

• What is an API?

• API economy

• What problem does it solve?

• Various types of API gateway

• NIE high level deployment

• Demo using NIE API gw

• QnA

Restricted

Page 3: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

What is API?

Restricted

Page 4: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

API economy

Restricted

Page 5: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Restricted

Page 6: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Types of API

• Three types of APIs :

– Open APIs: these APIs are publicly available on the web. They

are made available to all developers through a simple online

contract.

– Semi-open APIs: these APIs are accessible to a limited number

of partners selected by the company.

– Closed APIs: these APIs are for the company's internal

operations; their use is reserved for internal developers.

Restricted

Page 7: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

What problem does a gateway solve?

• Abstraction of backend

servers – Facade pattern

• BFF pattern – Backend for

Frontend pattern

• Micro-services

• Single entry point for

integration

• Policy management

• Service bus

Restricted

Page 8: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

API facade pattern

• Simple interface to a complex system

• Future-proof your systems

• Hiding the internal implementation (abstraction)

Restricted

Page 9: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

BFF pattern

• https://microservices.io/patter

ns/apigateway.html

• A layer of BFF services that

mesh up the next layer of

micro-services

• One BFF per mobile

experience

• Provides Optimal call for each

client

Restricted

Page 10: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Micro-services architecture

• An architectural style that structures an application as a collection

of loosely coupled service

Restricted

Page 11: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Monolithic Architecture

Restricted

Page 12: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Micro services architecture

Restricted

Page 13: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Restricted

Page 14: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

API policies

• Access restriction policies

– Parameters type check

– Restrict caller IP

– Authorization protocol (OAUTH, SAML)

– Limit call rate (throttling)

• Authentication policy

– Cert verification

• Advance flow

• Caching

• Transformational

– Conversion of JSON to XML

Restricted

Page 15: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Enterprise Service Bus

• Integrate systems by a

communication bus

• Decouples systems from

each other, communicate

without knowledge of other

systems on the bus.

• Move away from point-to-

point integration, which is

hard to manage over time

Restricted

Page 16: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

2 main differences

• APIs are consumption-centric, whereas services exposed

through ESB are exposure/reuse focused.

• The logic for “orchestration” is not a significant driver for

the API layer

Restricted

Page 17: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Gartn

er M

agic

Quadra

nt fo

r

full A

PI L

ifecycle

managem

ent

Confidential

Page 18: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Enterprise API gateway

• Feature rich

• On premise or on

cloud

Restricted

Page 19: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Cloud-base API gateways

• Pay as you go

• Important

abstraction

component of

cloud architecture

Restricted

Page 20: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Open source Gateway

• Open source version

alternative

• Up and coming niche

player

–Kong build on Nginx

(high performance

load balancer)

Restricted

Page 21: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

API management

Design

Development

Security

Publishing

Scalability

Monitoring

Analysis

Monetization

Restricted

Page 22: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

API journey timeline

Sept 2017 APIs review

April 2017 Production

Dec 2016 Procurement

using bulk tender

Aug 2016 API

awareness workshop

May 2016 POC done

for Mulesoftand CA

Jan 2016 Mobile

architecture revamp

Restricted

Page 23: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

NIE API deployment

Restricted

Page 24: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Restricted

Page 25: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Publish an API in Gateway

Restricted

Page 26: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Use Case

Restricted

To Publish “CourseList” API from StudentService

application in Gateway.

Apply Policies

Audit log

Protect URL from SQL Attack

Page 27: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Gateway IDERestricted

Page 28: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Publish APIRestricted

Page 29: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Restricted

Publish API

Page 30: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Restricted

https://apigw.sg/CourseList

Publish API

https://StudentServices.edu.sg/Course/CourseList

Page 31: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Restricted

Page 32: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

NIE Mobile App

Consuming APIs via

Gateway

Restricted

Page 33: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

API

Gate

way

Access Matrix

Portal

Student Service

Car Park(PHP)

(product)

(java)

(.Net)

Login

News

Car

Park

Course,

Exam

Mobile

FunctionsApplications

Page 34: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Gateway Policies

Caching

Throttling

Restricted

Page 35: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

CachingGateway can cache the response from API for a “user

defined period” of time.

Restricted

Page 36: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Eg: Cache Response for 5 secs

First call to API

Secs

1 Response is cached

and returned

2

6

7

.

.

.

Hits the server after 5

Secs

Subsequent

Calls

.

.

.

.

Response from Cache

Response from Cache

Restricted

Page 37: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Throttling

Gateway helps to regulate the rate at which the request is

processed per unit time

Restricted

Page 38: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

ThrottlingRestricted

Page 39: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Database API

Restricted

Page 40: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Database APIRestricted

Page 41: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Database APIRestricted

Page 42: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Database APIRestricted

Page 43: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Restricted

Page 44: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Successful API implementation

Start Small

No one size

fits all

People, Process, Product

Restricted

Page 45: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Restricted

Page 46: API Gateway @ NIEihlcioforum.sg/downloads/2018/slides/AM-2_NIE_API... · Micro-services architecture •An architectural style that structures an application as a collection ... for

Restricted


Recommended