2. 2
Frank Munz
• Founded munz & more in 2007
• 17 years Oracle Middleware,
Cloud, and Distributed Computing
• Consulting and
High-End Training
• Wrote two Oracle WLS and
one Cloud book
13. Pay Per Use
• You own a massively parallel and
distributed and highly available
supercomputer with linear costs
• 100h of 1 instance
= 1h of 100 instances
• Your IT resources are not fixed anymore
18. Serverless vs. FaaS
munz & more #18
• AWS announced Lambda in 2014
as serverless.
• Lambda is Function as a Service (FaaS)
• PaaS is ”serverless” (in a broader sense)
• FaaS is the cool thing – not “serverless”
https://dzone.com/articles/serverless-architecture-1
19. Serverless Example: S3
munz & more #19
Replicated to 3 availability zones (=DC)
Availability 99.99%
Durability 99.999999999% (eleven 9s)
14 worldwide regions
region -> API parameter
Blob storage with RESTful Interface:
PUT (key, value)
20. S3
munz & more #20
GET http://fmtestweb.s3-website.eu-central-1.amazonaws.com/
21. Serverless Example: S3
munz & more #21
• Never provision storage
• Off instance service = NO server
-> “serverless”
• NO web server
• $0,02 per GB + requests
Werner Vogel’s blog is on S3:
http://www.allthingsdistributed.com/
22. S3 is to data
as FaaS is to code
munz & more #22
24. Edit Code Inline / Upload
munz & more #24
npm node-lambda package for locally running and remotely deploying your node.js
event: event passed to function
context: runtime context
callback: optional return
(or null)
25. Definition: Function as a Service
• Automated elasticity
• True pay per invokation
• Stateless
• Event based
munz & more #25
Definition
• Choose memory
-> compute power, I/O
• Using container tech
Characteristics
26. FaaS Implementations
Amazon Google Microsoft Oracle
Name Lambda Cloud Functions Azure Functions tbd
Year 2014 2016 2016 2016
Status prod alpha beta announced
Language
Support
NodeJS 4.3.2, Java
8, Python 2.7, .Net
1.0.1 C#, native
Linux
NodeJS JS, PHP, C#, F#,
Python, bash,
PowerShell
?
Remarks Deploy from github
or BitBucket, CLI
Bundle functions,
OneDrive and Bot
Service integration
Linked to Event
Hub CS?
Link https://aws.amazon.com/la
mbda/
https://azure.microsoft.com/e
n-us/services/functions/
https://azure.microsoft.com/en-
us/services/functions/
https://cloud.oracle.com
/home
27. Lambda Tech Details
• Retries + dead letter Q
• Metering in 100 ms (compute x time)
• You can use environment variables,
threads and start processes
• Invocation times may differ
• No scaling parameter
munz & more #27
38. Pay Per Use
Every started request is charged:
• First 1 million req/month are free
+ 400,000 GB seconds of compute time
• $0.20 per 1 million req
+ $0.00001667 per GB second
Lambda: free tier is forever.
munz & more #38
40. “Try to attack something
that only lives for few milli-seconds”
(AWS)
41. Gone in 60ms
munz & more #41
https://www.youtube.com/watch?v=YZ058hmLuv0
42. Security
• Not discussed here: Are Clouds Safe?
• Small attack surface:
– Container lifetime -> request = milli-seconds
– No open ports
– Not listening to an IP
– You cannot call Lambdas directly:
triggered by events
“Exploit video” by CCC: “Gone in 60ms”
munz & more #42
44. Microservices
Developing a single application as
• a suite of small services
• each running in its own process / owns it‘s data
• communicating with lightweight mechanisms
(M. Fowler / J. Lewis)
https://martinfowler.com/articles/microservices.html
45.
46.
47. Frank Munz / OTN Latam 2016 #47
Service owns its data
Less enterprise, more application centric
Continuous Unlocking
49. FaaS vs. K8s Microservices
FaaS fulfills M. Fowler’s microservices definition
munz & more #49
AWS Lambda (compared to Docker with Kubernetes)
✅
Benefits of FaaS
- “serverless”
- zero config auto scaling
- true pay per use
-> higher abstraction
Limits of FaaS
- language/framework choice
- resource limits
- execution time / size limit
- vendor lock-in
-> reduced flexibility
50. A. Cockroft
Ten years ago, a monolithic application was the best
way to deliver business logic,
… five years ago the best option shifted to
microservices
Today, another shift is taking place, to event driven
functions (FaaS)
munz & more #50
https://read.acloud.guru/evolution-of-business-logic-from-monoliths-through-microservices-to-functions-ff464b95a44d
52. Serverless Framework
Why a framework if your code runs in a “frame”?
• Repeating patterns:
IAM, API-GW, S3 bucket etc
• NodeJS, Python, Java
• AWS and Azure
• Generates, deploys, runs Lambda in 3 LOC
based on generated YAML + .py file
munz & more #52https://serverless.com/
55. - 100 TB Storage, 256 bit TPM
- 3x 10 GB/s NICs
- Cluster up to 5,
99.999% data durability
- iSCSI, Ethernet, SIM Card
- Lambda in Python: Greengrass
- S3 PUT -> Lambda
- Lambda functions
-> public API, e.g. AWS
- E-Ink Shipping label that updates
- $ 300 / 10 days
AWS Snowball Edge (FaaS in a Box):
56. AWS Greengrass
Lambda in embedded devices
• Linux 4.4+
• Locally execute Lambda
triggered by local event
• Greengrass Core + IoT SDK
munz & more #56
57. TL;DR #serverless / #FaaS
”Serverless” ∋ FaaS / all major
clouds / event driven / stateless
/ true pay per use / automatic
scalability / integrates with
other CS / vendor lock in? /
-> cross-cloud frameworks emerge /
𝛌 could be the new µ!
@frankmunz