Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.



Published on

  • Be the first to comment

  • Be the first to like this


  1. 1. Going Serverless with AWS Lambda 07/20/2016 ROHIT KUMAR
  2. 2. Agenda • AWS Lambda and features • API gateway • Lambda demo • Serverless in AWS lambda • Function as a service in Openstack 2Confidential and Proprietary
  3. 3. LAMBDA? • Zero Administration • Event driven • Compute platform • Stateless Definition 3Confidential and Proprietary
  4. 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. 5. LAMBDA: SOLUTION No Infrastructure acquisition or management Auto Scales with Load 5Confidential and Proprietary Pay for only what you use.
  6. 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. 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. 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. 9. PRICING 9Confidential and Proprietary Scenario: 16000 requests/day @200ms avg =3,200,000 ms/day COST: $0.05/day With high availability
  10. 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
  11. 11. 11Confidential and Proprietary
  12. 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. 13. DESIGN 13Confidential and Proprietary Client (Browser) Product Database Application server Traditional Monolithic systems Needs entire setup, configuration and management
  14. 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. 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. 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. 17. 17Confidential and Proprietary REFERENCES: • • dg.pdf • 6/hotcloud16_hendrickson.pdf • • OpenStack •
  18. 18. 18Confidential and Proprietary