serverless architecture: beyond functions & into the future · 2018-02-22 · serverless...
TRANSCRIPT
Serverless Architecture:
Beyond functions &
into the future
Tomasz Stachlewski
AWS Senior Solutions Architect
Splitting
Monoliths
Ten Years Ago
Splitting
Monoliths
Ten Years Ago
XML & SOAP
Splitting
Monoliths
TenFiveYears Ago
REST JSON
Fast binary encodingsSplitting
Monoliths
Five Years Ago
Splitting
Monoliths
TenFive Years Ago
Microservices
Five Years Ago
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
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
Amazon SNS
Amazon S3
Amazon API
Gateway
Amazon
SQS
Amazon
Kinesis
Amazon
DynamoDBMicroservices
to Functions
Amazon SNS
Amazon S3
Amazon API
Gateway
Amazon
SQS
Amazon
Kinesis
Amazon
DynamoDBMicroservices
to Functions
Amazon SNS
Amazon S3
Amazon API
Gateway
Amazon
SQS
Amazon
Kinesis
Amazon
DynamoDBMicroservices
to Functions
Microservices
to
Functions
Ephemeral
Microservices
to
Amazon API
Gateway
Amazon
SQS
Functions
Ephemeral
Microservices
to
Amazon API
Gateway
Amazon
Kinesis
Amazon
DynamoDB
Functions
Ephemeral
Microservices
to
Amazon API
Gateway
Amazon SNS
Amazon S3
Functions
Ephemeral
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
Cloud
ServicesAmazon EC2Amazon EBS
Managed
Services
Amazon RDSAmazon ElastiCache
Serverless
ServicesAmazon
DynamoDBAWS
Lambda
Gateways
DatabaseStorage
Streaming
Analytics
Messaging
IoT
Compute
User
Management
Security
Monitoring
Machine
Learning
Content
Delivery
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…
No Server is Easier to ManageThan “No Server”
Werner Vogels, Amazon CTO
Lambda
=
Microservice without servers
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’)
};
My Application:
Needs to be highly available
High Availability
FRANKFURT
PARIS
LONDON
IRELAND
My Application:
Needs to be scalable
Scalability
x 10 000 x 10 000
Scalability
My Application:
I don’t want to pay for idle time!
x 0
$ 0
Scalability
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
Example: Promotion Application
Name
Promotion
Registration
Promotion
Registration
DynamoDB(Serverless DB)
What’s going on with my FaaS?
Good monitoring system is base for every
good serverless application
• 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
Amazon API
Gateway
Amazon
SQS
Amazon API
Gateway
Amazon
Kinesis
Amazon
DynamoDB
Evolution of Business Logic
Monolith Microservices Functions