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.

Debunking serverless myths

438 views

Published on

In this talk we debunk common myths and misconceptions about serverless - how cold starts works, serverless is not just about saving operational cost, think about control with responsibility, and think about vendor lock-in with the reward.

Published in: Technology
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/vbhp5ys } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/vbhp5ys } ......................................................................................................................... Download Full doc Ebook here { https://tinyurl.com/vbhp5ys } ......................................................................................................................... Download PDF EBOOK here { https://tinyurl.com/vbhp5ys } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/vbhp5ys } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/vbhp5ys } ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Debunking serverless myths

  1. 1. Debunking Serverless Myths Yan Cui @theburningmonk
  2. 2. Yan Cui http://theburningmonk.com @theburningmonk AWS user for 10 years
  3. 3. http://bit.ly/yubl-serverless
  4. 4. Yan Cui http://theburningmonk.com @theburningmonk Developer Advocate @
  5. 5. Yan Cui http://theburningmonk.com @theburningmonk Independent Consultant
  6. 6. What do you mean by ‘serverless’?
  7. 7. “Serverless”
  8. 8. Gojko Adzic It is serverless the same way WiFi is wireless. http://bit.ly/2yQgwwb
  9. 9. Serverless means… don’t pay for it if no-one uses it don’t need to worry about scaling don’t need to provision and manage servers
  10. 10. “Function-as-a-Service” AWS Lambda Azure Functions Google Cloud Functions Auth0 Webtask Spotinst Functions Kubeless IBM Cloud Functions
  11. 11. AWS Lambda
  12. 12. AWS Lambda API Gateway IOT SNS Kinesis CloudWatch
  13. 13. IaaS Function Application Runtime Container OS Virtualization Hardware CaaS Function Application Runtime Container OS Virtualization Hardware PaaS Function Application Runtime Container OS Virtualization Hardware FaaS Function Application Runtime Container OS Virtualization Hardware User User (scalable unit) Provider
  14. 14. IaaS Function Application Runtime Container OS Virtualization Hardware CaaS Function Application Runtime Container OS Virtualization Hardware PaaS Function Application Runtime Container OS Virtualization Hardware FaaS Function Application Runtime Container OS Virtualization Hardware User User (scalable unit) Provider
  15. 15. Serverless FaaS other services… Database Storage BI
  16. 16. Simon Wardley Serverless will fundamentally change how we build business around technology and how you code.
  17. 17. Why serverless?
  18. 18. more Scalable (and scales faster!)
  19. 19. Cheaper (don’t pay for idle servers)
  20. 20. Resilience (built-in redundancy and multi-AZ)
  21. 21. Secure
  22. 22. idea production choose language + framework master language + framework figure out deployment configure AMI configure ELB configure autoscaling capacity planning over-provision for launch are we doing microservices? configure CI/CD
  23. 23. idea production choose language + framework master language + framework figure out deployment configure AMI configure ELB configure autoscaling capacity planning over-provision for launch are we doing microservices? configure CI/CD
  24. 24. idea production greater Velocity from idea to product
  25. 25. minimise undifferentiated heavy-lifting
  26. 26. less ops responsibility on your shoulders
  27. 27. What about containers?
  28. 28. important, but invisible subsystem
  29. 29. https://read.acloud.guru/acg-faas-and-furious-b9574b6675c5
  30. 30. serverless is NOT the goal!
  31. 31. build products customers love to use
  32. 32. test ideas against the market quickly
  33. 33. iterate on s
  34. 34. deliver frequently, deliver quickly
  35. 35. own less technology, focus on creating Business Values
  36. 36. own less technology, focus on creating Business Values (serverless is just a good fit for this mindset)
  37. 37. serverless technologies are still maturing
  38. 38. DEBUNKING SERVERLESS MYTHS
  39. 39. DEBUNKING SERVERLESS MYTHS COLD STARTS COLD STARTS overplays or underplays the role of cold starts on serverless performance MYTH #1
  40. 40. DEBUNKING SERVERLESS MYTHS COLD STARTS COLD STARTS overplays or underplays the role of cold starts on serverless performance MYTH #1 COSTSCOSTS misunderstands thereal cost savings fromadopting serverless MYTH #2
  41. 41. DEBUNKING SERVERLESS MYTHS COLD STARTS COLD STARTS overplays or underplays the role of cold starts on serverless performance MYTH #1 COSTSCOSTS misunderstands thereal cost savings fromadopting serverless MYTH #2 CONTROL not realise that control of infra requires expensive skillsets to manage MYTH #3 CONTROL
  42. 42. DEBUNKING SERVERLESS MYTHS COLD STARTS COLD STARTS overplays or underplays the role of cold starts on serverless performance MYTH #1 COSTSCOSTS misunderstands thereal cost savings fromadopting serverless MYTH #2 CONTROL not realise that control of infra requires expensive skillsets to manage MYTH #3 CONTROL LOCK-INnot realise that lock-in risk rewards productivity, and true lock-in is dataMYTH #4 LOCK-IN
  43. 43. COLD STARTSCOLD STARTS overplays or underplays the role of cold starts on serverless performance MYTH #1 LOCK-IN not realise that lock-in risk rewards productivity, and true lock-in is data MYTH #4 LOCK-INCONTROL not realise that control of infra requires expensive skillsets to manage MYTH #3 CONTROLCOSTSCOSTS misunderstands the real cost savings from adopting serverless MYTH #2
  44. 44. INITIALISE CONTAINER INITIALISE RUNTIME INITIALISE HANDLER YOUR CODE EXECUTES
  45. 45. INITIALISE CONTAINER INITIALISE RUNTIME INITIALISE HANDLER YOUR CODE EXECUTES COLD START
  46. 46. “cold starts only happen to the first request”
  47. 47. function invocationconcurrent execution i.e. a container
  48. 48. function invocationconcurrent execution i.e. a container class instance method call
  49. 49. Lambda scales the number of concurrent executions based on traffic
  50. 50. existing “containers” are reused where possible
  51. 51. time invocation
  52. 52. time invocation invocation
  53. 53. time invocation invocation
  54. 54. time invocation invocation invocation invocation
  55. 55. time invocation invocation invocation invocation invocation invocation
  56. 56. time invocation invocation invocation invocation invocation invocation
  57. 57. time invocation invocation invocation invocation invocation invocation invocation
  58. 58. time invocation invocation invocation invocation invocation invocation invocation invocation
  59. 59. time invocation invocation invocation invocation invocation invocation invocation invocation
  60. 60. time invocation invocation invocation invocation invocation invocation invocation invocation
  61. 61. FREQUENCY DURATION
  62. 62. FREQUENCY DURATION dictated by user traffic, out of your control
  63. 63. FREQUENCY DURATION optimize this!
  64. 64. “Lambda is not a suitable solution for me because of cold starts”
  65. 65. “what is your latency requirement?”
  66. 66. cold starts that don’t add to user-facing latency is generally not worth worrying about
  67. 67. Node.js functions, no VPC, 1GB, averages ~500ms cold start with production workload
  68. 68. Node.js functions, no VPC, 1GB, averages ~500ms cold start with production workload (good enough for most web applications)
  69. 69. sporadic spikes latency existed before Lambda
  70. 70. GC pauses…
  71. 71. overloaded servers…
  72. 72. slow downstream, databases, etc.
  73. 73. networking issues…
  74. 74. cold starts is generally not an issue if you have a steady traffic pattern
  75. 75. time req/s
  76. 76. time req/s El Classico
  77. 77. time req/s lunch dinner
  78. 78. minimise the duration of cold starts so they fall within acceptable latency range
  79. 79. use higher memory setting if function performs CPU intensive work
  80. 80. use Node.js, Python or Golang
  81. 81. trim dependencies
  82. 82. keep functions single-purposed
  83. 83. avoid VPCs (for now) unless you need to access VPC-protected resources
  84. 84. COSTSCOSTS misunderstands the real cost savings from adopting serverless MYTH #2 LOCK-IN not realise that lock-in risk rewards productivity, and true lock-in is data MYTH #4 LOCK-INCONTROL not realise that control of infra requires expensive skillsets to manage MYTH #3 CONTROL
  85. 85. “good luck when Amazon decides to raise the price of Lambda!”
  86. 86. mind the market force…
  87. 87. AWS announced 67 price reductions in the last 5 years, and 0 price hikes
  88. 88. Model Training Low-latency Prediction Serving via Batching
  89. 89. https://einaregilsson.com/serverless-15-percent-slower-and-eight-times-more-expensive/
  90. 90. the platforms need to do better at educating users on how to choose between different services
  91. 91. https://aws.amazon.com/solutions/case-studies/financial-engines/
  92. 92. https://www.doc.ic.ac.uk/~rbc/papers/fse-serverless-17.pdf “This paper presents two case industrial studies of early adopters, showing how migrating an application to the Lambda deployment architecture reduced hosting costs – by between 66% and 95%…”
  93. 93. what we can easily measure
  94. 94. what most of your budget is spent on
  95. 95. what businesses care about what we can easily measure what most of your budget is spent on
  96. 96. leverage: do more with less
  97. 97. idea production choose language + framework master language + framework figure out deployment configure AMI configure ELB configure autoscaling capacity planning over-provision for launch are we doing microservices? configure CI/CD
  98. 98. request blue-green deployment req/s auto-scaling us-east-1a us-east-1b us-east-1c multi-AZ
  99. 99. Serverless might cost you just as much, or even more, but you get so much more done
  100. 100. 6 developers, 6 months 95% saving against EC2 15x no. of production releases per month
  101. 101. CONTROL not realise that control of infra requires expensive skillsets to manage MYTH #3 CONTROL LOCK-IN not realise that lock-in risk rewards productivity, and true lock-in is data MYTH #4 LOCK-IN
  102. 102. Control Responsibility
  103. 103. Controlling your own infrastructure comes with Responsibilities
  104. 104. to take on these responsibilities you need to have the relevant skillsets in the organization Controlling your own infrastructure comes with Responsibilities
  105. 105. to take on these responsibilities you need to have the relevant skillsets in the organization Controlling your own infrastructure comes with Responsibilities ENGINEERS
  106. 106. to take on these responsibilities you need to have the relevant skillsets in the organization Controlling your own infrastructure comes with Responsibilities ENGINEERS ADMIN
  107. 107. to take on these responsibilities you need to have the relevant skillsets in the organization Controlling your own infrastructure comes with Responsibilities ENGINEERS ADMIN RECRUITMENT
  108. 108. to take on these responsibilities you need to have the relevant skillsets in the organization Controlling your own infrastructure comes with Responsibilities ENGINEERS ADMIN RECRUITMENT MARKET
  109. 109. what are you paying for?
  110. 110. guard against the temptation to look for control for control sake
  111. 111. AWS Lambda, Azure Functions, Google Cloud Functions Your custom, container-based, general purpose compute platform
  112. 112. LOCK-IN not realise that lock-in risk rewards productivity, and true lock-in is data MYTH #4 LOCK-IN
  113. 113. Lock-in risk Reward
  114. 114. it’s not a lock-in, it’s a form of coupling that has a switching cost
  115. 115. “vendor lock-in” switching cost
  116. 116. “vendor lock-in” switching cost “let’s avoid lock-in” prevention cost
  117. 117. The true danger with lock-in, especially with serverless, is the potential for data lock-in. Data has gravity. It accumulates. Data is economically disincentivized to leave, by way of platform pricing. This is the single biggest threat to vendor choice.
  118. 118. Newton’s 41st law: data has gravity
  119. 119. Newton’s 42nd law: data migration is gonna suck
  120. 120. https://martinfowler.com/articles/oss-lockin.html
  121. 121. “VENDOR LOCK-IN IS THE ROOT OF ALL EVIL”
  122. 122. to take on these responsibilities you need to have the relevant skills sets in the organization Controlling your own infrastructure comes with Responsibilities ENGINEERS ADMIN RECRUITMENT MARKET
  123. 123. if you already have the expertise, can their time be better used to generate more business value instead?
  124. 124. risk is just one side of the coin
  125. 125. extracting maximum value from your cloud provider minimising undifferentiated heavy-lifting faster time-to-market reward
  126. 126. own less technology, focus on creating Business Values
  127. 127. is vendor lock-in a risk? YES
  128. 128. is the return worth the risk? ABSOLUTELY!
  129. 129. there are no silver bullets
  130. 130. understand the trade-offs
  131. 131. control comes with its own baggages
  132. 132. but sometimes the benefits outweigh the baggages
  133. 133. https://theburningmonk.com/hire-me AdviseTraining Delivery “Fundamentally, Yan has improved our team by increasing our ability to derive value from AWS and Lambda in particular.” Nick Blair Tech Lead
  134. 134. @theburningmonk theburningmonk.com github.com/theburningmonk

×