Documente Academic
Documente Profesional
Documente Cultură
Serverless Architectures
Email: {anything}@jedberg.net
Twitter: @jedberg
Web: www.jedberg.net
Jeremy Edberg Facebook: facebook.com/jedberg
CoFounder
Linkedin:
https://www.cloudnative.io
www.linkedin.com/in/jedberg
Physical Servers
Test and prod are different
Prod is in need of constant
updates
Slow iteration and deployment
Polyglot unfriendly
Deploy in weeks, live for years
Virtual Machines
Prod is immutable
Rapid iteration and deployment
Multi-tenancy
Polyglot friendly
Deploy in minutes, live for weeks
Containers
Test and prod are the same
Prod is immutable
Rapid(er) iteration and deployment
High multi-tenancy
Polyglot friendly
Deploy in seconds, live for hours
Serverless
Smallest unit of compute
Super scalable
Rapid iteration
Extreme multi-tenancy
Very polyglot friendly
Easier to collaborate
Deploy independently, live for
seconds
A whole lot of choices
Hodgepodge of services Amazons Ecosystem
A whole lot of choices
Amazons Serverless
Ecosystem
Lambda SQS
SNS S3
DynamoDB Kenisis
Benefits of AWS Lambda
VMs
Containers
Serverless
Containers
Serverless
1 to 5 years to execute
3 to 6 months to execute
3 to 6 weeks to execute
Developer
QA
Ops
BI / Analytics
Cost and size
of risk
decreased
Rate of
change
increased
Build Test Release
Build Test Release
Monolithic
Multiple services
Microservices and
Micro Teams
Highly aligned, loosely
coupled
Services are built by different
teams who work together to
figure out what each service
will provide.
The service owner publishes
an API that anyone can use
and returns proper response
codes
The Microservices Architecture
Microservices Tools
Containers Deployment, CI/CD
Frameworks
etc.
Web Servers
etc.
Config Management
Code Libraries
etc.
API Management
Amazons Microservices
Tools
What do all the parts of
microservices have in common?
Servers
Patches
Access control
Utilization Right-sizing
Capacity planning
Autoscaling
Configuration Packages and AMIs
Serverless
Patches
Access control
Utilization
Fully managed Right-sizing
Capacity
Continuous
planning
Scaling
Autoscaling
Configuration Packages and AMIs
What is Lambda?
Easy pricing
Monitoring
Everything is in Cloudwatch or Cloudwatch logs
Pricing
We turned around
both these
requests in less
than a day
How does work?
Author your code
NodeJS, Python
AWS SDK built in
Java and any JVM
Access to /tmp, language
processes,
threads, etc Use any library you
want
Choose an event source
S3 Config Rules
Kinesis Amazon Echo
SNS API Gateway
DynamoDB Lambda
functions
CloudWatch More coming
Choose a Network
router.py Kinesis
Lambda DynamoDB
router.py
Call out to other Lambda
functions
Add their results as attachments
to the message
Demo
From conception to prod
in 5 minutes
Red/Black,
Blue/Green,
Mauve/Chartreuse
Codebase
Structure
Frontend vs Backend
Repos
Lambda lets you manage your
code and infrastructure in the
same place (as long as you use
Kappa or something like it).
Example use cases
Live video stream processing
Lambda Functions
HQ Copy
S3
480p Playbac
Transcode k
Cloudfront S3
360p
Ingest
Transcode
Audio Only
Transcode Cloudfront
Streaming
Thumbnails
Serverless Website
Static
Content
S3
Dynamic
Content
Application Backend
Data Processing
Command and Control
Any functional or event
based system
Tips and Tricks
With a distributed
team, this is an easy
mistake to make
To avoid it, pass a call
stack and check for
self in the stack
Store your data properly
No local instance
access
DynamoDB Store everything in S3
S3, DynamoDB, or
Elasticache
Difficulties weve solved
zip up with
dependencies
roles and permissions
dev vs prod
aliases
Problems we still have