The Not-So-Straigh.orward Road From Microservices to Serverless · Road From Microservices to...

Post on 21-May-2020

11 views 0 download

Transcript of The Not-So-Straigh.orward Road From Microservices to Serverless · Road From Microservices to...

The Not-So-Straigh.orward Road From Microservices to ServerlessPhil Calçado - @pcalcado - philcalcado.com

What are microservices?

Microservices seem to be highly-distributed

applica?on architectures.

What is Serverless?

Who knows? !

e.g.

Keep your monolith for as long as possible

Monolith

Service B

Monolith

Service B

Monolith

Service C

But what if you waited so long microservices aren’t hype

anymore there are other alterna?ves?

“Chaps?ck"

This project wasn’t par?cularly successful

Some challenges we faced

Solving a bug means re-processing all the data

“The write path issue”

Write path

Cold start for JVM Lambdas

DynamoDB Costs

Who owns what? What calls what? Is this

Lambda supposed to be in produc?on?

Some of the challenges we DID NOT face

GeSng new engineers produc?ve on Lambda/

DynamoDB

Cold start for Node.js Lambdas

Opera?ons allergy

"Local" development

Developer happiness

How can we keep the good and get rid of the bad?

User ExperienceDatabase

Back-end

Database

User ExperienceDatabase

Back-end

Point of Sale

Financial Reporting

User ExperienceBack-end

User Manager

User ExperienceDatabase

Back-end

Database

User ExperienceDatabase

Back-end

Point of Sale

Financial Reporting

User ExperienceBack-end

User Manager

User Experience

Database

Database

Database

Service

Service

Service

User Experience

λ

AdminWeb App

User ExperienceDatabase

Database

Database

User Experience

ConsumerWebsite

AdminWeb App

 λLambda λ

Lambda

 λLambda

 λLambda

 λLambda

 λLambda

 λLambda  λ

Lambda

 λLambda

 λLambda

 λLambda

 λLambda

We were suffering from Pinball machine Architecture

User ExperienceDatabase

Database

Database

User Experience

ConsumerWebsite

AdminWeb App

 λLambda λ

Lambda

 λLambda

 λLambda

 λLambda

 λLambda

 λLambda  λ

Lambda

 λLambda

 λLambda

 λLambda

 λLambda

User Experience

Database

Database

Database

User Experience

ConsumerWebsite

AdminWeb App

 λLambda λ

Lambda

 λLambda

 λLambda

 λLambda

 λLambda

 λLambda  λ

Lambda

 λLambda

 λLambda  λ

Lambda

 λLambda

API Gateway

API Gateway

API Gateway

Use Serverless as building blocks for Microservices

AWS Accounts are a great way to define service

boundaries

API Gateway is actually quite expensive (at the moment)

~1/10 of the engineering teams was dedicated to pla.orm

But… is this really Serverless?

Who cares? !

You can’t got from 2/10 to 10/10 in one jump.

Serverless looks like the future, but we’re not

there yet

Ques?ons?