2. What is Serverless?
Provisioning
and Utilization
Operations
and Management
Scaling Availability and
Fault Tolerance
Removes the need for….
What is Serverless
3. Benefits of Serverless?
Provisioning
and Utilization
Operations
and Management
Scaling Availability and
Fault Tolerance
Which leads to….
Low Cost Simple Low Latency Scalable Reliable
Benefits of Serverless
4. Serverless
Continuous Scaling
● Automatically
● Scale up and scale down
Don’t bother me with Details
● Run when i need it
● Pay what you use.
Fully Managed
▪ No provisioning
▪ Zero administration
▪ High availability
Developer Productivity
▪ Focus on the code that
matters
▪ Innovate rapidly
▪ Reduce time to market
5. AWS Lambda
● Lambda Allocates:
○ CPU Power
○ Network Bandwidth
○ Disk I/O
● You Allocate:
○ Memory
○ Execution timeout
● Stateless
○ Store Persistent state to
another service.
Libraries
● Node.JS
● AWS SDK for JS Ver 2.2
Python:
● AS SDK for Python Version
1.2.1
● Java:
○ No Additional Libraries
available
● Manually Include Libraries.
6. Programming Model
● Code written must follow a common pattern.
● Four concepts used regardless of the language.
● Handler:
○ The function in the code called upon execution
○ All event data passed in as the first parameter.
○ Context passed in as the second parameter.
○ Process event data.
● Context:
○ Passed in as an object to the handler as the second
parameter.
○ Enable code to interact with AWS Lambda.
● Interaction with AWLS Lambda
○ Time Left before AWS lambda terminates our function.
○ Get AWS request ID.
7. Programming Model
● Logging:
○ Log your execution
○ Write to Amazon Cloudwatch.
● Metrics:
○ Invocation
○ Errors
○ Duration
● Asynchronous Exception
○ Does not return result to the caller.
○ Logs error to cloud watch
● Synchronous Exception
○ Returns result to the caller.
8. Programming Model
● Push
○ Event source invokes lambda function
○ Used by S3, SNS, Cognito, Echo, and user apps.
○ Event source mapping held in the event source not
lambda.
● Pull
○ AWS lambda polls the event source
○ Invokes lambda functions if there is a new event.
○ USed by dynamoDB and Kinesis
○ Event source mapping help in AWS Lamdba.
● Event:
○ Executes the function asysnchronously
○ RequestResponse
○ Executes the function sysnchronously.
10. AWS Lamda Functional Limits
● Cold Start Time
● First request slower
● Containers stay active for a period of time.
● Try increasing the memory to increase CPU limits.
● CPU Allocation
○ CPU power proportional to memory allocated
○ 1024MB/128MB: 8 times the CPU share.
11. Lambda announcements @ re:Invent
● Lambda supports C#
● Lambda comes to IoT devices and hubs
● Lambda is embedded in Snowball
● Lambda integrates with CloudFront
● Lambda supports tracing through X-Ray
● Step Functions bring orchestration to Lambda
The key takeaway is that Amazon wants enterprises to
consume EC2 while it is pushing startups and developers
towards Lambda.
12. Market Landscape
● Amazon Lambda
○ Pioneer of serverless, launched in Nov 2014
○ Rapid growth, dedicated mini-con at Re:Invent 2016
○ Step Functions is to Lambda what an Orchestrator is to
containers
○ AWS is betting on Lambda than on containers.
● Multiple niche players
○ iron.io, pubnub.com, etc
● IBM - OpenWhisk
○ open source serverless platform, Developed by IBM, now
under incubation in Apache (w/Adobe)
○ Also offered on IBM Bluemix as a fully managed service.
○ The service is integrated with IBM Bluemix, the PaaS
environment powered by CloudFoundry
13. Market Landscape
● Microsoft:
○ Azure Web Jobs, the runtime environment for invoking code
snippets either on-demand or through a scheduled cron job.
Microsoft is expected to build a robust serverless framework
based on its next generation PaaS called Service Fabric.
● Spring
○ Spring Cloud Function
○ Expected Mid of 2017
14. Market Landscape
● Serverless Framework:
○ Started as JAWS
○ Available as a node.js NPM module
○ Provides multiple boilerplate templates that can jumpstart
AWS Lambda development.
● Google Cloud Functions:
○ Apart for kubernetes
○ Investing in Google Cloud Functions.
○ Only a few services such as Google Cloud Storage, Google
Cloud Pub/Sub are integrated with Cloud Functions.
● Iron.Io
○ IronQueue, IronWorker, and IronCache
○ Project Kratos can run existing AWS Lambda functions
packaged as Docker containers
16. Serverless On OpenStack
OpenWhisk
● API Gateway
● Swift and NodeJS
● BYO Docker images for lang you choice.
Missing :
● Auth Plugin
● Prebuilt deployment system to get openWhisk on
OpenStack.
● Management of Openstack from openWhisk.
18. Challenges
● Cant lift and Shift
● Testing Is a Pain
● FAAS-Distributed Architecture
● HA- Multi Region Architecture
● Long Running Jobs
● Opinionated programming model
○ Aligned with 12-factor approach to cloud-native
applications
● Per-invocation latency & overhead
● High-performance persistent state
● Life cycle of composite serverless applications
● Monitoring, error handling, testing, debugging
● Less Observability/Instrumentation.
● FAAS-Event Based
● Docker- Compute
19. Community...
Openwisk
● Openwisk announced in February 2016 - Apache
Project
● GA on public cloud: Bluemix Openwisk
● Fission: https://github.com/fission/fission and
● Funktion : https://funktion.fabric8.io/docs/#kubernetes-resources
20. THANK-YOU
PAAS/FAAS: You think about scale. Can’t do at the level of
individual request.
#lessops #NoOps #No internal Sys Admin
#Packing #Scalling # Deployments #responsibleDeveloper