Slide 1

Slide 1 text

Allan A. Chua Pluggable API Gateway OCELOT https://bit.ly/2HmVKq1

Slide 2

Slide 2 text

Use Cases 0 0 0 0 ___ Cautions Agenda

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Products API Customers API Transactions API Orders API Deliveries API Microservices Monolith Application

Slide 6

Slide 6 text

Products API Customers API Transactions API Orders API Deliveries API Microservices Expectation

Slide 7

Slide 7 text

Products API Customers API Transactions API Consumers face a lot of challenges Orders API Deliveries API o X X ___

Slide 8

Slide 8 text

Multiple Retrieval + Attack Points 0 0 0 0 ___ Multiple Domain Names, SSL Certs and CORS http://foo.com http://bar.com http://ses.com Authentication Hell Client-side Issues

Slide 9

Slide 9 text

Products API Authentication Rate Limiting Logging Orders API Authentication Rate Limiting Caching Transactions API Authentication Logging Caching Clients / Consumers Inconsistencies and Duplications

Slide 10

Slide 10 text

To solve these, API Gateways are introduced

Slide 11

Slide 11 text

Products API Customers API Transactions API Orders API Deliveries API Stocks API API Gateway API Gateway to the Rescue

Slide 12

Slide 12 text

Do you mean a Reverse Proxy?

Slide 13

Slide 13 text

Proxying is one of the jobs of a gateway. API Gateway Authentication Rate Limiting Logging Reverse Proxy Caching Monitoring Tracing Authorization Authorization

Slide 14

Slide 14 text

Centralized Cross Cutting Concerns API Gateway - Logging - Authentication - Rate Limiting / QOS - Licensing - Monitoring - Tracing

Slide 15

Slide 15 text

Faster Cross- continental calls due to Response Aggregation

Slide 16

Slide 16 text

ASIA Europe Cost of Communication 55 MS Latency SSL Handshake

Slide 17

Slide 17 text

Consumer ASIA Europe Products Transactions Users Latency of 55 MS 55 MS x 3 = 165 MS Total Response Time W/O Gateway

Slide 18

Slide 18 text

Consumer API Gateway ASIA Europe Products Transactions Users Latency of 55 MS Latency of 2 MS With Gateway Asia to EU = 55 MS EU to EU = 2 MS x 3 instances TOTAL Response Time = 61 MS

Slide 19

Slide 19 text

Public / Private APIs API Gateway Orders API Stocks API Products API A C B A B A B PUBLIC PRIVATE Jobs E D C D C D

Slide 20

Slide 20 text

Ocelot API Gateway - Designed for .NET Core - ASP.net Core Add-on Install-Package Ocelot https://bit.ly/2JptJBR

Slide 21

Slide 21 text

Advantages of using Ocelot - Open source (Free) - Flexible - On-Premise - Cloud - Compliance Friendly - Easy to Migrate

Slide 22

Slide 22 text

Feature Packed - Reverse Proxy - Response Aggregation - Service Discovery - Consul - Eureka - Kubernetes - Authentication / Authorization - Rate Limiting - Caching - QOS via Polly - Logging - Tracing

Slide 23

Slide 23 text

Integrations with

Slide 24

Slide 24 text

Docker Compose Demo API Gateway Products Users Transactions https://bit.ly/30e98Fx

Slide 25

Slide 25 text

Downsides - No enterprise support - Framework lock-in - No API management

Slide 26

Slide 26 text

Links - (API Gateway Comparables) - https://bit.ly/2KU1YCL - (API Gateway in a Nutshell) - https://bit.ly/2O4IbAU - (Ocelot Compose Demo) - https://bit.ly/30e98Fx - (Ocelot Documentation) - https://bit.ly/2KpUBCI - (Speaker Deck) - https://bit.ly/2HmVKq1