journey from monolith to microservices: adopting a service ...refactoring a monolith is an activity...

Post on 25-May-2020

9 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Journey from Monolith to Microservices: Adopting a Service Mesh Approach

Harry Bagdi, Kong

INSERT AN IMAGE FOR ALL THE AREA

Transforming our orgs into a multicellular organism

DECOUPLED, DISTRIBUTED, SELF-HEALING

Monolith Services Microservices/

Service Mesh

Journey to a Modern Enterprise

Emerging

Patterns Serverless/FaaS

+

N-S N-S N-S N-S

E-W

N-S

1 What does it mean?

Refactoring a monolith is an activity that unlocks team productivity and

business scalability

Refactoring a monolith is an activity that unlocks team productivity and

business scalability

2 Should we do it?

O(1) to O(n)

3 Let’s do it!

v

Nuclear Strategy

v v

3 Strategies

Ice Cream Scoop Lego Strategy

v

Nuclear Strategy

v v

3 Strategies

Ice Cream Scoop Lego Strategy

INSERT AN IMAGE FOR ALL THE AREA

Class

Class

Class

Class

Class

Class

Class Class Class

Class Class Class

Database

Object-Oriented Monolith Lots of function calls across different objects

INSERT AN IMAGE FOR ALL THE AREA

Hypothetical Marketplace Like Amazon.com

Users

Search

Orders

Inventory

Invoices

Billing

Items Reviews Payouts

Points Offers Partners

Database

INSERT AN IMAGE FOR ALL THE AREA

Users

Search

Orders

Inventory

Invoices

Billing

Items Reviews Payouts

Points Offers Partners

Database

Team 1

Team 2

Team 3

Team 2 starts making frequent changes

TEAM FRICTION

Users Orders Invoices

Billing

Payouts Points

Offers Partners

Database

Team 1

Team 2

Team 3

Search Inventory

Items Reviews

Database

Users Orders Invoices

Billing

Payouts Points

Offers Partners

Database

Team 1

Team 2

Team 3

Search

Inventory

Items Reviews

Database

Database

Clear understanding of what the monolith does and does not

Understanding of clients that are consuming the monolith

Tests, tests, tests

Approaching the Transition

Updating clients and routing requests to different services

CLIENTS

Frontend

Load Balancer

N-S Traffic

N-S Traffic

Users

Search

Orders

Inventory

Invoices

Billing

Items Reviews Payouts

Points Offers Partners

Monolith

Frontend

API Gateway

N-S Traffic

N-S Traffic

Users

Search

Orders

Inventory

Invoices

Billing

Items Reviews Payouts

Points Offers Partners

Monolith

API gateways are also load balancers

Frontend

API Gateway

Users Search Orders Inventory Invoices

Billing Items Reviews

Payouts Points

Offers Partners

E-W Traffic

Routing

Frontend

API Gateway

Users Search Orders Inventory Invoices

Billing Items Reviews

Payouts Points

Offers Partners

E-W Traffic

Canary Release (i.e., 10% traffic)

Search Inventory

Items Reviews

v1.0 v1.1

4 Sizing the services

Service

Service

Service

Service

Service

Service

Service Service Service

Service Service Service Database

Database

Database

Database

Ideal World

Service

Service

Service

Service

Service

Service

Service Service

Service

Service

Database

Database

Database

Database

Reality

5 Network

In monoliths, we have objects , interfaces and function calls.

In microservices, we have services , interfaces and network calls.

Service

Service

Service

Service

Service

Service

Service Service Service

Service Service Service Database

Database

Database

Database

Microservices

Lots of network calls across different services

Network

Service

Service

Service

Service

Service

Service

Service Service Service

Service Service Service Database

Database

Database

Database

Typical network problems: latency, security, routing, error handling, observability

Microservices

Lots of network calls across different services

Service

Service

Service

Service

Service

Service

Service Service Service

Service Service Service Database

Database

Database

Database D

P

D

P

D

P

D

P

D

P

D

P

D

P

D

P

D

P

D

P

D

P

D

P

D

P

D

P

D

P

D

P

Service Mesh

Lots of network calls across different services through a decentralized proxy

The biggest assumption is that the network latency between the service and the local proxy is negligible

Service Service

Success Rate: 100% Network Latency: 0ms

Success Rate: 100% Network Latency: 0ms

Proxy Proxy

One instance of proxy for each instance of the service

Service Service

Proxy Proxy

Service Service Service Service

Proxy Proxy

Service

Service

Service

Service

Service

Service

Service Service Service

Service Service Service Database

Database

Database

Database DP

DP

DP

DP

DP

DP

DP

DP

DP

DP

DP

DP

Control Plane (CP)

Push dynamic configuration Collect metrics from sidecars

DP

DP

DP

DP

Service

Service

Service

Service

Service

Service

Service Service Service

Service Service Service Database

Database

Database

Database DP

DP

DP

DP

DP

DP

DP

DP

DP

DP

DP

DP

Control Plane (CP)

API Gateway DP

External Clients

DP

DP

DP

DP

N E R V O U S S Y S T E M

Control Planes For configuration and metrics

Open Source Data Planes Lightweight and Decentralized

Data Planes

N E R V O U S S Y S T E M O F T H E C L O U D

Service Control Platform

MONOLITH SERVICES MESH SERVERLESS

Thank You!

1 Business

Transformation

2 Pragmatic Strategy

3 Gradual Change

top related