serverless application - who the heck needs a server?
TRANSCRIPT
Serverless ApplicationsLars Röwekamp | CIO New Technologies | @mobileLarson
open knowledge | #WISSENTEILEN
ÜBER OPEN KNOWLEDGEBranchenneutrale Softwareentwicklung und IT-Beratung
#WISSENTEILEN
ÜBER MICH
Wer bin ich - und wen ja, wie viele?
• CIO New Technologies • Enterprise & Mobile • Autor, Speaker, Coach & Mentor
• Snowboard & MTB Enthusiast• Mehrfacher Vater, einfacher Ehemann
Lars Röwekamp (a.k.a. @mobileLarson)
#WISSENTEILEN
LR
An Era of „Mindshift“
1 Mio € App(lication)
Time is Money
An Era of „Mindshift“
App BusinessPlan ...
#WISSENTEILEN
#Servers?(OS? Files & Storage? CPU? Memory?)
#WISSENTEILEN
#Customers?(Start small! Grow fast! Die faster?)
#WISSENTEILEN
#Traffic?(Moderate but peeks!)
#WISSENTEILEN
#Security?(OS? Patches? Access Control?)
#WISSENTEILEN
Depends ...!(Go for max? Way to expensive!)
I had a dream ...
#WISSENTEILEN
Serverless
„Kein Server ist einfacher zu
verwalten, als kein Server.“
(Werner Vogels, CTO Amazon)
Out-of-the-Box self-scalingBackend
> IaaS> PaaS> BaaS
#WISSENTEILEN
Road to less Server
#WISSENTEILEN
IaaS
Road to less Server
#WISSENTEILEN
IaaSPaaS
Road to less Server
#WISSENTEILEN
Road to less Server
IaaSPaaS?
#WISSENTEILEN
Road to less Server
IaaSPaaSBaaS
Ain‘t gonna work!
Ain‘t gonna work!
My Business LogicMy Integration Logic
My Event-based Logic
#WISSENTEILEN
Road to less Server
IaaSPaaSBaaS
#WISSENTEILEN
Road to less Server
#WISSENTEILEN
Road to less Server
#WISSENTEILEN
Road to less Server
#WISSENTEILEN
Road to less Server
#WISSENTEILEN
Fa#!? WTH?(a.k.a. Serverless)
#WISSENTEILEN
Run Code, not Server!
#WISSENTEILEN
“Run your code highly-available in the cloud in response to events and scale without any servers to manage.“
#WISSENTEILEN
Road to less Server
• High Availability• Zero Administration• Auto-Scaling• Your Code
#WISSENTEILEN
Road to less Server
• High Availability• Zero Administration• Auto-Scaling
•Your Code
#WISSENTEILEN
Road to less Server
• High Availability• Zero Administration• Auto-Scaling
•Your Code• Sharing Resources• Security related Issues• Access to other Resources
#WISSENTEILEN
Serverless
#WISSENTEILEN
Main Player
AWS Lamdba
Google Cloud Functions *)
MicrosoftAzure Functions
IBM OpenWhisk**)
#WISSENTEILEN
The Main Player
AWS Lamdba(serverless, event-driven compute service)
#WISSENTEILEN
How does it work?
S3 Bucket
DynamoDB
Kinesis
EVENT
EVENT
INVOKE
Stateless Code(a.k.a. AWS Lambda)
#WISSENTEILEN
How does it work?
S3 Bucket
DynamoDB
Kinesis
INVOKE
INVOKE
RETURN
Stateless Code(Node, Python, Java, C#)
#WISSENTEILEN
Subscribe to ...
Amazon S3
Amazon DynamoDB
Amazon Kinesis
AWS CloudFormation
AWS CloudTrail
Amazon CloudWatch
Amazon SNS
AmazonSES
AmazonAPI GatewayAmazon
Cognito
AWSIoT
AmazonAlexa
CronEvents
DATA STORES ENDPOINTS
REPOSITORIES EVENT/MESSAGE SERVICES
Amazon Config
Anatomy ofa Lambda
Function
#WISSENTEILEN
Anatomy
Lambda Function
#WISSENTEILEN
Anatomy
Handler Function
Lambda Function
</>
„...“
Event Object
Context Object
...{
#WISSENTEILEN
Anatomy
Handler Function
Lambda Function
</>
„...“
Event Object
Context Object
...{
#WISSENTEILEN
Anatomy
Handler Function
Lambda Function
</>
„...“
Event Object
Context Object
...{IAM Role
#WISSENTEILEN
Anatomy
Handler Function
Lambda Function
</>
„...“
Event Object
Context Object
...{IAM Role
Return Object*
#WISSENTEILEN
Anatomy
Lambda Function
1. Number of Calls*2. Memory Usage**{IAM Role
Return Object*(*first 1 million for free, **first 400.000 sec free for 1 GB memory)
#WISSENTEILEN
Scenarios(gimme some “Demos“)
#WISSENTEILEN
FaaS Scenarios
• Data & File Processing• Data and Analytics • Websites• Mobile Applications
#WISSENTEILEN
„Hello World“
Thumbnail Creation(Data & File Processing)
#WISSENTEILEN
„Hello World“
#WISSENTEILEN
„Hello World“
#WISSENTEILEN
„Hello World“ V2.0
Trend & Fault Detection(Event Streaming)
#WISSENTEILEN
„Hello World“ V2.0
#WISSENTEILEN
„Hello World“ V3.0
Web Application(Custom Events)
#WISSENTEILEN
„Hello World“ V3.0
#WISSENTEILEN
„Hello World“ V4.0
Resource Optimization(ELSE-Branch)
if (normalCase) {runOnMyServer();
} else { runLambdaInTheCloud();
}
#WISSENTEILEN
Doing it the right Way
AWS Lamdba SDK Amazon API Gateway
vs.
#WISSENTEILEN
Doing it the right Way
• RESTful API Gateway• Caching via CDN• DDoS Protection• Throttling Capabilities• API Stages• Decoupling of C/S Amazon API Gateway
#WISSENTEILEN
Serverless App Architecture
#WISSENTEILEN
Serverless App Architecture
#WISSENTEILEN
Demo(damn, gimme some REAL Demo!)
#WISSENTEILEN
„Hello REAL World“
#WISSENTEILEN
„Hello REAL World“
#WISSENTEILEN
„Hello REAL World“
#WISSENTEILEN
„Hello REAL World“
#WISSENTEILEN
„Hello REAL World“
#WISSENTEILEN
„Hello REAL World“
#WISSENTEILEN
AWSOME!(But what‘s about ...?)
#WISSENTEILEN
#Versioning(Version vs. Alias)
#WISSENTEILEN
#Security(Push vs. Pull Policy)
#WISSENTEILEN
#Concurrency(max 200 at once, max 300 sec)
#WISSENTEILEN
#ErrorHandling(What‘s the Retry Policy?)
#WISSENTEILEN
#Tracing(Who? When? Where? What?)
#WISSENTEILEN
#Monitoring(Logs & Metrics)
#WISSENTEILEN
#Testing(„If i test, i do it in Production!“)
#WISSENTEILEN
#Deployment(DIY vs. Tooling)
#WISSENTEILEN
#NoOps(Ok, let‘s call it „LessOps“)
#WISSENTEILEN
#VendorLock(Adrian said: „2*Vendor << DIY“)
#WISSENTEILEN
#Pricing(Never pay for idle!)
#WISSENTEILEN
#BestPractices(Keep calm and ...)
#WISSENTEILEN
#Pitfalls(cold, warm, hot)
#WISSENTEILEN
Fazit
#WISSENTEILEN
Run Code, not Server!
#WISSENTEILEN
Don‘tpay Idle!
1 Mio € App
Yeah, all Work done!
? ? ?FRAGEN
#WISSENTEILEN
Kontakt
LARS RÖWEKAMPCIO NEW TECHNOLOGIES
[email protected]+49 (0)441 4082 – 101
@mobileLarson@_openknowledge
OFFENKUNDIGGUT
#WISSENTEILEN
Bildnachweise
#12: © RichVintage – istockphoto.com#14: © Guido van Nispen – Wikipedia#21: © vasakna – fotolia.com#40, #88 : © pathdoc - fotolia.com#85: © tomer_turjeman – fotolia.com
All other pictures inside this presentation orginate frompixabay.com.
#WISSENTEILEN