why do microservices need an api gateway?... pharos.sh façade pattern the facade design pattern is...

Post on 11-Jun-2020

10 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

www.kontena.io pharos.sh

Why do microservices need an API gateway?

www.kontena.io pharos.sh

Me, myself and I

Jussi NummelinNameCurrent Work

@jnummelin / jnummelinTwitter / Github

Developer Advocate @ Kontena, Inc.

Previous Tecnotree, Digia, Tieto, Nokia, …

Bio All-around handyman on technical topics. Passionate developer and solution architectWorking with containers & microservicesfor ~4 yearsAvid fly-fisher

www.kontena.io pharos.sh

I’ll be rambling about

MicroservicesAPIs

API GatewayPractical example, a.k.a live demo

www.kontena.io pharos.sh

www.kontena.io pharos.sh

Microservices – for context

Independently deployableIsolation

Loose coupling

www.kontena.io pharos.sh

www.kontena.io pharos.sh

Microservices – gains

Faster development cyclesQuality (long term)

Loose coupling

www.kontena.io pharos.sh

Theroadtohellispavedwithgoodintentions

- SaintBernardofClairvaux,ca1150

www.kontena.io pharos.sh

www.kontena.io pharos.sh

Microservices – pains

ComplexityTraceability

Connectivity

www.kontena.io pharos.sh

Client needs to

Adapt to internal changesSupport multiple protocols

Handle variations with each service

www.kontena.io pharos.sh

Enter API Gateway

www.kontena.io pharos.shwww.kontena.io pharos.sh

Façade pattern

The Facade design pattern is often used when a system is very complex or difficult to understand because the system has a large number of interdependent classes or its source code is unavailable. This pattern hides the complexities of the larger system and provides a simpler interface to the client.

- Wikipedia / Gang of Four

www.kontena.io pharos.sh

API Gateway

Intelligent service proxyMiddleware

API Optimization

www.kontena.io pharos.sh

www.kontena.io pharos.sh

API GW as entrypoint

Single entrypointRouting

Protocol translation?

www.kontena.io pharos.sh

API GW as Auth enforcer

Most services need auth

Auth enforcement in each serviceVs.

One-time auth enforcement

www.kontena.io pharos.sh

API GW as Middleware

Rate limitingCaching

AnalyticsRetry policies

www.kontena.io pharos.sh

API GW as Traceabilityenabler

Request/response correlationTracing injection

www.kontena.io pharos.sh

API GW vs. ESB

API GW is NOT an ESBAPI are consumption oriented

ESB is orchestration/reuse focused

www.kontena.io pharos.sh

API GW vs. Service Mesh

Service Mesh is a network functionAPI GW exposes the services

There is a bit of overlap

www.kontena.io pharos.sh

DevOps?

www.kontena.io pharos.sh

API GW & DevOps

Another tool for DevOps Enabler

Continuous Delivery

www.kontena.io pharos.sh

Apps & API GW

Dynamic configApps driven config

www.kontena.io pharos.sh

Options

www.kontena.io pharos.sh

API Gateways

KongTyk

ApiGeeAWS, GCP, Azure,…

www.kontena.io pharos.sh

www.kontena.io pharos.sh

Loadbalancer Kong

ImagesAPI

ProductsAPI

https://github.com/jnummelin/api-gw-example

www.kontena.io pharos.sh

API Gateway

Intelligent service proxyMiddleware

Hide the complexityEnabler for DevOps

www.kontena.io pharos.sh

! info@kontena.io

" @kontenainc

# slack.kontena.io

$ github.com/kontena/kontena

meetup.com/pro/kontena

% www.kontena.io

Thank You!

top related