SlideShare a Scribd company logo
Going Serverless with AWS
Lambda
07/20/2016
ROHIT KUMAR
Agenda
• AWS Lambda and features
• API gateway
• Lambda demo
• Serverless in AWS lambda
• Function as a service in Openstack
2Confidential and Proprietary
LAMBDA?
• Zero Administration
• Event driven
• Compute platform
• Stateless
Definition
3Confidential and Proprietary
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
LAMBDA: SOLUTION
No Infrastructure acquisition or
management
Auto Scales with Load
5Confidential and Proprietary
Pay for only what you use.
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
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
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
PRICING
9Confidential and Proprietary
Scenario: 16000 requests/day @200ms avg =3,200,000 ms/day
COST: $0.05/day
With high availability
API GATEWAY
10Confidential and Proprietary
Client
(Browser)
Lambda1 function
Lambda2 function
API Gateway
GET /api/lambda1
GET /api/lambda2
Routed requests
HTTP(s) calls
11Confidential and Proprietary
SERVERLESS
12Confidential and Proprietary
• Some amount of server logic
• Run in stateless compute environments
• Event triggered or RPC
• Ephemeral
• Managed by third party
DESIGN
13Confidential and Proprietary
Client
(Browser)
Product
Database
Application server
Traditional Monolithic systems
Needs entire setup,
configuration
and management
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
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
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
17Confidential and Proprietary
REFERENCES:
• http://martinfowler.com/articles/serverless.html
• http://docs.aws.amazon.com/lambda/latest/dg/lambda-
dg.pdf
• https://www.usenix.org/system/files/conference/hotcloud1
6/hotcloud16_hendrickson.pdf
• https://www.youtube.com/watch?v=dCv0gZLjcNY
• https://github.com/BU-NU-CLOUD-SP16/Lambda-on-
OpenStack
• https://www.youtube.com/watch?v=DcN7YtBCtqE
18Confidential and Proprietary

More Related Content

What's hot (19)

PDF
How did we move the mountain? - Migrating 1 trillion+ messages per day across...
HostedbyConfluent
 
PPTX
AWS DirectConnect fundamentals
Piyush Agrawal
 
PPTX
Event Driven Architectures with Apache Kafka
Matt Masuda
 
PDF
Serverless architecture
vipin kumar
 
KEY
Scala and Lift
Sander Mak (@Sander_Mak)
 
PPTX
Encrypting Kafka messages at rest to secure applications | Robert Barnes, Has...
HostedbyConfluent
 
PPTX
Building self service framework
Rovshan Musayev
 
PDF
Confluent On Azure: Why you should add Confluent to your Azure toolkit | Alic...
HostedbyConfluent
 
PDF
Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...
HostedbyConfluent
 
PDF
Becoming Protocol-Agnostic with Kafka, REST, GraphQL & gRPC | Tyler Mills, Sm...
HostedbyConfluent
 
PDF
Integrating Apache Kafka Into Your Environment
confluent
 
PDF
URP? Excuse You! The Three Metrics You Have to Know
confluent
 
PDF
Securing the Message Bus with Kafka Streams | Paul Otto and Ryan Salcido, Raf...
HostedbyConfluent
 
PDF
Apache Kafka and API Management / API Gateway – Friends, Enemies or Frenemies...
HostedbyConfluent
 
PPTX
Introduction to serverless
vishnu mishra
 
PDF
Riak at shareaholic
freerobby
 
PPTX
AWS VPC Fundamental
Piyush Agrawal
 
PDF
Synchronous Commands over Apache Kafka (Neil Buesing, Object Partners, Inc) K...
confluent
 
PPTX
Microservices with Spring
Carlos Cavero Barca
 
How did we move the mountain? - Migrating 1 trillion+ messages per day across...
HostedbyConfluent
 
AWS DirectConnect fundamentals
Piyush Agrawal
 
Event Driven Architectures with Apache Kafka
Matt Masuda
 
Serverless architecture
vipin kumar
 
Scala and Lift
Sander Mak (@Sander_Mak)
 
Encrypting Kafka messages at rest to secure applications | Robert Barnes, Has...
HostedbyConfluent
 
Building self service framework
Rovshan Musayev
 
Confluent On Azure: Why you should add Confluent to your Azure toolkit | Alic...
HostedbyConfluent
 
Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...
HostedbyConfluent
 
Becoming Protocol-Agnostic with Kafka, REST, GraphQL & gRPC | Tyler Mills, Sm...
HostedbyConfluent
 
Integrating Apache Kafka Into Your Environment
confluent
 
URP? Excuse You! The Three Metrics You Have to Know
confluent
 
Securing the Message Bus with Kafka Streams | Paul Otto and Ryan Salcido, Raf...
HostedbyConfluent
 
Apache Kafka and API Management / API Gateway – Friends, Enemies or Frenemies...
HostedbyConfluent
 
Introduction to serverless
vishnu mishra
 
Riak at shareaholic
freerobby
 
AWS VPC Fundamental
Piyush Agrawal
 
Synchronous Commands over Apache Kafka (Neil Buesing, Object Partners, Inc) K...
confluent
 
Microservices with Spring
Carlos Cavero Barca
 

Viewers also liked (19)

PDF
Openstack taskflow 簡介
kao kuo-tung
 
PDF
Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build...
Joe Sepi
 
PDF
The Serverless Paradigm, OpenWhisk and FIWARE
Alex Glikson
 
PDF
Task flow
Vishal Yadav
 
PDF
OpenWhisk Under the Hood -- London Oct 16 2016
Stephen Fink
 
PDF
Apache kafka big data track
Paris Open Source Summit
 
PDF
[AWSKRUG&JAWS-UG Meetup #1] Serverless Real-Time Analysis
AWSKRUG - AWS한국사용자모임
 
PPTX
Architecture of a Kafka camus infrastructure
mattlieber
 
PDF
Open stack ocata summit enabling aws lambda-like functionality with openstac...
Shaun Murakami
 
PDF
How to build an event-driven, polyglot serverless microservices framework on ...
Animesh Singh
 
PDF
BEEVA | Introducción a Docker
BEEVA_es
 
PDF
AWS Lambda from the Trenches
Yan Cui
 
PDF
Building Serverless APIs on AWS
Julien SIMON
 
PDF
Build reactive systems on lambda
Yan Cui
 
PDF
JustGiving – Serverless Data Pipelines, API, Messaging and Stream Processing
Luis Gonzalez
 
PDF
Building Serverless APIs (January 2017)
Julien SIMON
 
PDF
How to implement chatbots for Alexa and Facebook Messenger
Moritz Strube
 
PPTX
IBM Bluemix OpenWhisk: Cloud Foundry Summit 2016, Frankfurt, Germany: The Fut...
OpenWhisk
 
PDF
Tomasz Janczuk - Webtaskalifragilistexpialidocious
ServerlessConf
 
Openstack taskflow 簡介
kao kuo-tung
 
Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build...
Joe Sepi
 
The Serverless Paradigm, OpenWhisk and FIWARE
Alex Glikson
 
Task flow
Vishal Yadav
 
OpenWhisk Under the Hood -- London Oct 16 2016
Stephen Fink
 
Apache kafka big data track
Paris Open Source Summit
 
[AWSKRUG&JAWS-UG Meetup #1] Serverless Real-Time Analysis
AWSKRUG - AWS한국사용자모임
 
Architecture of a Kafka camus infrastructure
mattlieber
 
Open stack ocata summit enabling aws lambda-like functionality with openstac...
Shaun Murakami
 
How to build an event-driven, polyglot serverless microservices framework on ...
Animesh Singh
 
BEEVA | Introducción a Docker
BEEVA_es
 
AWS Lambda from the Trenches
Yan Cui
 
Building Serverless APIs on AWS
Julien SIMON
 
Build reactive systems on lambda
Yan Cui
 
JustGiving – Serverless Data Pipelines, API, Messaging and Stream Processing
Luis Gonzalez
 
Building Serverless APIs (January 2017)
Julien SIMON
 
How to implement chatbots for Alexa and Facebook Messenger
Moritz Strube
 
IBM Bluemix OpenWhisk: Cloud Foundry Summit 2016, Frankfurt, Germany: The Fut...
OpenWhisk
 
Tomasz Janczuk - Webtaskalifragilistexpialidocious
ServerlessConf
 
Ad

Similar to ServerlessPresentation (13)

PDF
Building serverless backends - Tech talk 5 May 2017
ARDC
 
PDF
Stephen Liedig: Building Serverless Backends with AWS Lambda and API Gateway
Steve Androulakis
 
PDF
Lambdaless and AWS CDK
MooYeol Lee
 
PPTX
AWS Lambda, Step Functions & MongoDB Atlas Tutorial
MongoDB
 
PPTX
How Serverless Changes DevOps
Richard Donkin
 
PDF
Webinar: Serverless Architectures with AWS Lambda and MongoDB Atlas
MongoDB
 
PDF
Using Serverless Architectures to build and provision modern infrastructures​
Ramit Surana
 
PDF
2016-06 - Design your api management strategy - AWS - Microservices on AWS
SmartWave
 
PDF
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
Ortus Solutions, Corp
 
PPTX
Building serverless app_using_aws_lambda_b4usolution
Hoa Le
 
PDF
"Serverless Java Applications" at Froscon 2018 by Vadym Kazulkin/Elmar Warken
Vadym Kazulkin
 
PDF
June Webinar: BoxLang-Dynamic-AWS-Lambda
Ortus Solutions, Corp
 
PDF
AWS Česko-Slovenský Webinár 03: Vývoj v AWS
Vladimir Simek
 
Building serverless backends - Tech talk 5 May 2017
ARDC
 
Stephen Liedig: Building Serverless Backends with AWS Lambda and API Gateway
Steve Androulakis
 
Lambdaless and AWS CDK
MooYeol Lee
 
AWS Lambda, Step Functions & MongoDB Atlas Tutorial
MongoDB
 
How Serverless Changes DevOps
Richard Donkin
 
Webinar: Serverless Architectures with AWS Lambda and MongoDB Atlas
MongoDB
 
Using Serverless Architectures to build and provision modern infrastructures​
Ramit Surana
 
2016-06 - Design your api management strategy - AWS - Microservices on AWS
SmartWave
 
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
Ortus Solutions, Corp
 
Building serverless app_using_aws_lambda_b4usolution
Hoa Le
 
"Serverless Java Applications" at Froscon 2018 by Vadym Kazulkin/Elmar Warken
Vadym Kazulkin
 
June Webinar: BoxLang-Dynamic-AWS-Lambda
Ortus Solutions, Corp
 
AWS Česko-Slovenský Webinár 03: Vývoj v AWS
Vladimir Simek
 
Ad

ServerlessPresentation

  • 1. Going Serverless with AWS Lambda 07/20/2016 ROHIT KUMAR
  • 2. Agenda • AWS Lambda and features • API gateway • Lambda demo • Serverless in AWS lambda • Function as a service in Openstack 2Confidential and Proprietary
  • 3. LAMBDA? • Zero Administration • Event driven • Compute platform • Stateless Definition 3Confidential 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
  • 9. PRICING 9Confidential and Proprietary Scenario: 16000 requests/day @200ms avg =3,200,000 ms/day COST: $0.05/day With high availability
  • 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
  • 13. DESIGN 13Confidential and Proprietary Client (Browser) Product Database Application server Traditional Monolithic systems Needs entire setup, configuration and management
  • 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
  • 17. 17Confidential and Proprietary REFERENCES: • http://martinfowler.com/articles/serverless.html • http://docs.aws.amazon.com/lambda/latest/dg/lambda- dg.pdf • https://www.usenix.org/system/files/conference/hotcloud1 6/hotcloud16_hendrickson.pdf • https://www.youtube.com/watch?v=dCv0gZLjcNY • https://github.com/BU-NU-CLOUD-SP16/Lambda-on- OpenStack • https://www.youtube.com/watch?v=DcN7YtBCtqE