Serverless Architecture

47
Serverless architectu re

Transcript of Serverless Architecture

Page 1: Serverless Architecture

Serverless architecture

Page 2: Serverless Architecture

Michał KurzejaCTO w Accesto

PHP/Symfony

Wrocław Symfony Group

ITCorner tech meetup

Page 3: Serverless Architecture

Function as a service

Page 4: Serverless Architecture
Page 5: Serverless Architecture
Page 6: Serverless Architecture

“Serverless is a new cloud

computing trend that changes the way you think about writing and

maintaining applications.

auth0.com

Page 7: Serverless Architecture

“Deploy your applications as

independent functions, that respond to events, charge you only

when they run, and scale automatically.

serverless.com

Page 8: Serverless Architecture

“Serverless architectures refer to

(..) custom code that's run in ephemeral containers.

martinfowler.com

Page 9: Serverless Architecture

BaaSFaaS

Page 10: Serverless Architecture

FaaS

Trigger

External service

Function

Page 11: Serverless Architecture

No Disk

Access*almost

Page 12: Serverless Architecture

Statelessand share-nothing

Page 13: Serverless Architecture

Emphemeral

Page 14: Serverless Architecture

Easy Pricing Model

“GB-seconds”

Page 15: Serverless Architecture

= 890h

Page 16: Serverless Architecture

2.1mln requests

https://alestic.com/2016/12/aws-invoice-example/

https://www.trek10.com/blog/lambda-cost/

Page 17: Serverless Architecture

Amazon Ecosystem

◎API Gateway◎DynamoDB◎S3◎SQS ◎CloudFront◎Cognito◎...

Page 18: Serverless Architecture

Architectureexample architectural use-cases

Page 19: Serverless Architecture
Page 20: Serverless Architecture
Page 21: Serverless Architecture
Page 22: Serverless Architecture
Page 23: Serverless Architecture
Page 24: Serverless Architecture
Page 25: Serverless Architecture

Example

Page 26: Serverless Architecture
Page 27: Serverless Architecture
Page 28: Serverless Architecture
Page 29: Serverless Architecture

curl https://XXX.amazonaws.com/prod/helloworldHello from Lambda

curl https://XXX.amazonaws.com/prod/helloworld -d '{"name": "Michal"}' -XPOSTHello from Lambda to Michal

Page 30: Serverless Architecture

Ecosystemframeworks, libraries, implementations

Page 31: Serverless Architecture

Apex

Page 32: Serverless Architecture

Serverless

Page 33: Serverless Architecture

Claudia.js

Page 34: Serverless Architecture
Page 35: Serverless Architecture
Page 36: Serverless Architecture

OpenWhisk

Page 37: Serverless Architecture

Iron.io

Page 38: Serverless Architecture

Benefits

Easy to learn

Lower costs

Easy to scale

Reduced time to market

Microservice way

Fits into iterations

Page 39: Serverless Architecture

Drawbacks

Vendor lock-in*

Multitenancy

A bit harder to test locally

Communication overhead

Cold start

Not always cost-efficient

Page 40: Serverless Architecture

Good use-cases

Page 41: Serverless Architecture

Mostly static pageseven e-commerce ones

Page 42: Serverless Architecture

Data stream analysisExample: logs

Page 43: Serverless Architecture

Processing uploadsmaking thumbnails etc.

Page 44: Serverless Architecture

Actions users pay forPreparing watermarked ebook

Page 45: Serverless Architecture

My opinion?

Page 46: Serverless Architecture

What do YOU think?

Page 47: Serverless Architecture

Thanks!