2. Agenda
• AWS Lambda and features
• API gateway
• Lambda demo
• Serverless in AWS lambda
• Function as a service in Openstack
2Confidential and Proprietary
4. CHALLENGES
• What resources
• How much
• Duration
• Cost involved
4Confidential and Proprietary
Planning and acquisition
Resource Management
• Resources administration
• Infrastructure maintenance
Resource Utilization
• Cost effective
• Efficient infrastructure
consumption
5. LAMBDA: SOLUTION
No Infrastructure acquisition or
management
Auto Scales with Load
5Confidential and Proprietary
Pay for only what you use.
6. FEATURES
6Confidential and Proprietary
Multiple invocation paths like
Kinesis, S3, DynamoDB,
API Gateway
Custom code and libraries
Node.js, Java, Python
Monitoring and logging on
Cloudwatch
Simple resource selection
Stateless execution of functions Granular permission model
Resource Policy
IAM roles
7. WORKFLOW
7Confidential and Proprietary
S3
API Gateway
Request only
push model
Request only
pull model
Request
response only
push model
Execution role Lambda function resources
logs
Upload function
trigger setup
8. PERFORMANCE
8Confidential and Proprietary
• Average response time for an RPC is 1.6s
• Can spin up parallel worker instances to
serve requests
• Less costly
• No configuration required for scaling
Compared to other Container based server platform; Elastic Beanstalk or EBS
AWS LAMBDA
• Average response time can go
as high as 20s
• Requests are served by one instance
until a threshold is reached
• Costly
• Needs complex configuration settings
for scaling
EBS
10. API GATEWAY
10Confidential and Proprietary
Client
(Browser)
Lambda1 function
Lambda2 function
API Gateway
GET /api/lambda1
GET /api/lambda2
Routed requests
HTTP(s) calls
12. SERVERLESS
12Confidential and Proprietary
• Some amount of server logic
• Run in stateless compute environments
• Event triggered or RPC
• Ephemeral
• Managed by third party
14. DESIGN
14Confidential and Proprietary
Client
(Browser)
API GATEWAY
Lambda2 function
Lambda1 function
3rd party services
Product
database
Authentication
service
Database service
Self
deployable,
auto scalable
lambda
functions
Other 3rd
part/amazon
services
User service
Conditional
dependency
15. OVERHEAD OF SERVERLESS
15Confidential and Proprietary
Client
(Browser)
Client
(Browser)
Click message
channel
Click message
channel
DB
DB
Click
processor
Click
processor
click
click
Serverless
Long lived processor listening
synchronously to channel
Short lived function
that runs for each message
CASE-1
CASE-2
16. FUNCTION AS A SERVICE ON OPENSTACK
16Confidential and Proprietary
Lambda Engine
(Logic to manage
cluster)
Docker
Swarm
Master
Event
Message
Resource
allocation
Mongo DB
Function execution
parameters
Rabbit
MQ
Rest Web UI
Upload function,
parameters
VM
docker
Swarm
New VM
Register
to master
Export function
&
Execute
Fetches
events containers