serverless architecture: beyond functions & into the future · 2018-02-22 · serverless...

45
Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect [email protected]

Upload: others

Post on 21-May-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Serverless Architecture:

Beyond functions &

into the future

Tomasz Stachlewski

AWS Senior Solutions Architect

[email protected]

Page 2: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Splitting

Monoliths

Ten Years Ago

Page 3: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Splitting

Monoliths

Ten Years Ago

XML & SOAP

Page 4: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Splitting

Monoliths

TenFiveYears Ago

Page 5: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

REST JSON

Fast binary encodingsSplitting

Monoliths

Five Years Ago

Page 6: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Splitting

Monoliths

TenFive Years Ago

Page 7: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect
Page 8: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect
Page 9: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect
Page 10: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Microservices

Five Years Ago

Page 11: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect
Page 12: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Microservices

Five Years Agoto Functions

Amazon

Kinesis

Amazon API

Gateway

Amazon SNS

Amazon S3

Amazon

DynamoDB

Amazon

SQS

Standard building brick

services provide standardized

platform capabilities

Page 13: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Amazon SNS

Amazon S3

Amazon API

Gateway

Amazon

SQS

Amazon

Kinesis

Amazon

DynamoDBMicroservices

to Functions

Business Logic

Glue between the bricks

Standard building brick

services provide standardized

platform capabilities

Page 14: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Amazon SNS

Amazon S3

Amazon API

Gateway

Amazon

SQS

Amazon

Kinesis

Amazon

DynamoDBMicroservices

to Functions

Page 15: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Amazon SNS

Amazon S3

Amazon API

Gateway

Amazon

SQS

Amazon

Kinesis

Amazon

DynamoDBMicroservices

to Functions

Page 16: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Amazon SNS

Amazon S3

Amazon API

Gateway

Amazon

SQS

Amazon

Kinesis

Amazon

DynamoDBMicroservices

to Functions

Page 17: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Microservices

to

Functions

Ephemeral

Page 18: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Microservices

to

Amazon API

Gateway

Amazon

SQS

Functions

Ephemeral

Page 19: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Microservices

to

Amazon API

Gateway

Amazon

Kinesis

Amazon

DynamoDB

Functions

Ephemeral

Page 20: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Microservices

to

Amazon API

Gateway

Amazon SNS

Amazon S3

Functions

Ephemeral

Page 21: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Amazon SNS

Amazon S3

Amazon API

Gateway

Amazon

SQS

Amazon

Kinesis

Amazon

DynamoDBMicroservices

to

Functions

EphemeralWhen the system is

idle, it shuts down and

costs nothing to run

Page 22: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Cloud

ServicesAmazon EC2Amazon EBS

Managed

Services

Amazon RDSAmazon ElastiCache

Serverless

ServicesAmazon

DynamoDBAWS

Lambda

Page 23: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Gateways

DatabaseStorage

Streaming

Analytics

Messaging

IoT

Compute

User

Management

Security

Monitoring

Machine

Learning

Content

Delivery

Page 24: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

EVEN MORE BORING

STUFF

BORING

STUFFDEVELOPMENT

TIME

GO-LIVE

What size servers are right for

my budget?

How many servers do I need?

How many servers should I

budget for?

When should I decide to

scale out my servers?

How will I keep my server OS

patched?

How will new code be deployed

to my servers?

I need to administrate it.

How to stop paying for it when it

won’t be needed anymore…

Page 25: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

No Server is Easier to ManageThan “No Server”

Werner Vogels, Amazon CTO

Page 26: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Lambda

=

Microservice without servers

Page 27: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Lambda function

Lambdafunction

var AWS = require(‘aws-sdk’);

var s3 = new AWS.S3();

exports.handler = function(event, context) {

var params = {

Bucket: ‘[input bucket name here]’

Key: ‘[insert keyname here]’

Body: ‘[object body]’

};

s3.putObject(params)

console.log(‘Object inserter’)

};

Page 28: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

My Application:

Needs to be highly available

Page 29: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

High Availability

FRANKFURT

PARIS

LONDON

IRELAND

Page 30: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

My Application:

Needs to be scalable

Page 31: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Scalability

Page 32: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

x 10 000 x 10 000

Scalability

Page 33: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

My Application:

I don’t want to pay for idle time!

Page 34: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

x 0

$ 0

Scalability

Page 35: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Serverless Functions – where to use?

Web

Applications

• Static

websites

• Complex web

apps

• Packages for

Flask and

Express

Data

Processing

• Real time

• MapReduce

• Batch

Chatbots

• Powering

chatbot logic

Backends

• Apps &

services

• Mobile

• IoT

</></>

Amazon

Alexa

• Powering

voice-

enabled apps

• Alexa Skills

Kit

IT

Automation

• Policy

engines

• Extending

AWS services

• Infrastructure

management

Page 36: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Example: Promotion Application

Name

Email

Promotion

Registration

Promotion

Registration

DynamoDB(Serverless DB)

Page 37: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

What’s going on with my FaaS?

Page 38: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Good monitoring system is base for every

good serverless application

Page 39: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

• End-to-end tracing to and from lambda

functions, without changing your code

• AI powered problem detection

• Response times

• Failure rates

• Process metrics

• End-to-end visibility

Page 40: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Amazon API

Gateway

Amazon

SQS

Page 41: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Amazon API

Gateway

Amazon

Kinesis

Amazon

DynamoDB

Page 42: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect
Page 43: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect
Page 44: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Evolution of Business Logic

Monolith Microservices Functions

Page 45: Serverless Architecture: Beyond functions & into the future · 2018-02-22 · Serverless Architecture: Beyond functions & into the future Tomasz Stachlewski AWS Senior Solutions Architect

Thank you

Tomasz Stachlewski

AWS Senior Solutions Architect

[email protected]