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.

Journey to the cloud, the why and how of serverless

61 views

Published on

In this talk, we will look at the evolution from on-premise to the cloud with VMs and containers, and then to serverless.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Journey to the cloud, the why and how of serverless

  1. 1. Yan Cui @theburningmonk ourneJ Yto the cloud the how and why of serverless
  2. 2. Yan Cui http://theburningmonk.com @theburningmonk Independent Consultant
  3. 3. Yan Cui http://theburningmonk.com @theburningmonk https://productionreadyserverless.com http://bit.ly/complete-guide-to-aws-step-functions
  4. 4. Yan Cui http://theburningmonk.com @theburningmonk AWS user since 2009
  5. 5. 2006
  6. 6. big meetings to decide how to provision new servers
  7. 7. 3-6 months (!!!!) turn around time
  8. 8. client tier logic tier data tier SQL
  9. 9. monolithic, 3-tier architectures
  10. 10. requires downtime for deployment
  11. 11. requires downtime for deployment (OK for businesses that aren’t 24/7)
  12. 12. install monitoring agents/daemons on server
  13. 13. big-bang releases
  14. 14. 2010
  15. 15. on premise cloud
  16. 16. 2012
  17. 17. 2016
  18. 18. 2019
  19. 19. EC2 EC2
  20. 20. EC2 EC2 months minutes
  21. 21. EC2 EC2 months minutes
  22. 22. EC2 EC2 minutes compute becoming a commodity Genesis Custom-built Product Commodity http://bit.ly/wardley-maps
  23. 23. EC2 EC2 minutes
  24. 24. users are distributed around the world systems have to be available 24/7
  25. 25. SCALABILITY
  26. 26. SCALABILITY RESILIENCE
  27. 27. SCALABILITY RESILIENCE SECURITY
  28. 28. SCALABILITY RESILIENCE SECURITY SPEED
  29. 29. Capex Opex capital expenditure operational expenditure
  30. 30. Capex Opex capital expenditure operational expenditure levelled the playing field
  31. 31. competition
  32. 32. competition user demand & expectations
  33. 33. faster delivery faster feedback loop we need…
  34. 34. big-bang releases small, frequent releases
  35. 35. co-evolution waterfall agile silos DevOps practice activity of and
  36. 36. scale
  37. 37. scale complexity
  38. 38. but our cognitive capacity hasn’t increased…
  39. 39. leverage: do more with less
  40. 40. EC2 EC2
  41. 41. EC2 EC2 we’re still managing infrastructure
  42. 42. https://bit.ly/2Im61VK “Unless you’re an infrastructure company, infrastructure is basically overhead.” Matt Klein
  43. 43. infrastructure you
  44. 44. EC2EC2 EC2 RDSDynamoDB SQS
  45. 45. Monoliths Microservices
  46. 46. EC2 EC2 EC2 DynamoDB EC2 RDS EC2 SQS DynamoDB
  47. 47. EC2 EC2 EC2 DynamoDB EC2 RDS EC2 SQS DynamoDB we’re managing lots more infrastructure!
  48. 48. we need a better abstraction for the “server”
  49. 49. we need an immutable infrastructure
  50. 50. 70% utilization monolith 10% utilization x 10 microservices
  51. 51. 70% utilization monolith 10% utilization x 10 microservices
  52. 52. EC2 EC2 EC2 DynamoDB EC2 RDS EC2 SQS DynamoDB
  53. 53. EC2 DynamoDB EC2 RDS EC2 SQS DynamoDB DynamoDB RDS SQS DynamoDB
  54. 54. EC2 DynamoDB EC2 RDS EC2 SQS DynamoDB DynamoDB RDS SQS DynamoDB
  55. 55. EC2 docker us-east-1a us-east-1b us-east-1a us-east-1b
  56. 56. 0 Theory “it works on my machine!” “production ready!”days
  57. 57. 0 Theory “it works on my machine!” “production ready!”days no log collection
  58. 58. 0 Theory “it works on my machine!” “production ready!”days no log collection no monitoring no alerting
  59. 59. 0 Theory “it works on my machine!” “production ready!”days no log collection no monitoring no alerting can’t scale no load balancing
  60. 60. 0 Theory “it works on my machine!” “production ready!”days no log collection no monitoring no alerting can’t scale no redundancy no load balancing
  61. 61. 0 Theory “it works on my machine!” “production ready!”days no log collection no monitoring no alerting can’t scale no redundancy what security? no load balancing
  62. 62. 0 Theory “it works on my machine!” “production ready!” 0 Reality “it works on my machine!” “production ready!” days days
  63. 63. mooooo..
  64. 64. 2015
  65. 65. SQL NoSQL OOP Functional On Premise Cloud Waterfall Agile Monoliths Microservices
  66. 66. 2016
  67. 67. 2016
  68. 68. Server-ful Serverless
  69. 69. https://gtnr.it/2KGyGCM
  70. 70. What do you mean by ‘serverless’?
  71. 71. “Serverless”
  72. 72. Gojko Adzic It is serverless the same way WiFi is wireless. http://bit.ly/2yQgwwb
  73. 73. 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
  74. 74. “Function-as-a-Service” AWS Lambda Azure Functions Google Cloud Functions Auth0 Webtask Spotinst Functions Kubeless IBM Cloud Functions
  75. 75. AWS Lambda
  76. 76. AWS Lambda API Gateway IOT SNS Kinesis CloudWatch
  77. 77. 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
  78. 78. 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
  79. 79. Serverless FaaS other services… Database Storage BI
  80. 80. Simon Wardley Serverless will fundamentally change how we build business around technology and how you code.
  81. 81. Why serverless?
  82. 82. more Scalable
  83. 83. 1,000 concurrent executions (soft limit) 500 increase per minute (hard-ish limit)
  84. 84. 1,000 concurrent executions (soft limit) 500 increase per minute (hard-ish limit) AUTO-APPROVED RAISE TO 3000
  85. 85. 1,000 concurrent executions (soft limit) 500 increase per minute (hard-ish limit)
  86. 86. containers are reused
  87. 87. 100% SERVERLESS IN PRODUCTION
  88. 88. 80 MILLION MONTHLY USERS
  89. 89. Resilience (built-in redundancy and multi-AZ)
  90. 90. http://bit.ly/2Vzfexo
  91. 91. Secure
  92. 92. Shared Responsibility Model
  93. 93. Shared Responsibility Model
  94. 94. protection from OS attacks Amazon automatically apply latest patches to host VMs
  95. 95. Cheaper (don’t pay for idle servers)
  96. 96. what businesses care about what we can easily measure what most of your budget is spent on
  97. 97. Deploy
  98. 98. serverless.yml {} Code
  99. 99. {} Code serverless.yml
  100. 100. serverless.yml {} Code S3
  101. 101. {} Code serverless.yml S3 CloudFormation
  102. 102. {} Code serverless.yml S3 CloudFormation
  103. 103. request blue-green deployment
  104. 104. request blue-green deployment
  105. 105. request blue-green deployment
  106. 106. request blue-green deployment req/s auto-scaling us-east-1a us-east-1b us-east-1c multi-AZ
  107. 107. the DevOps forcethe DevOps force is strong with serverlessis strong with serverless
  108. 108. 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
  109. 109. 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
  110. 110. idea production greater Velocity from idea to product
  111. 111. minimise undifferentiated heavy-lifting
  112. 112. less ops responsibility on your shoulders
  113. 113. infrastructure you
  114. 114. DynamoDBDynamoDB RDS SQS DynamoDB DynamoDB API Gateway Lambda API Gateway Lambda RDS Lambda DynamoDBSQS
  115. 115. abstractionlayer
  116. 116. abstractionlayer paradigm shift!!!!
  117. 117. paradigm shift
  118. 118. paradigm shift opportunity
  119. 119. performance time serverless containers
  120. 120. performance time serverless containers higher ceiling
  121. 121. speed
  122. 122. performance time serverless containers higher ceiling strong baseline
  123. 123. performance time serverless containers dilemma zone
  124. 124. paradigm shift opportunity challenges
  125. 125. broken existing toolchains
  126. 126. observability securityframework
  127. 127. best practices are still emerging
  128. 128. ๏ tips for writing Lambda functions ๏ migration to serverless ๏ serverless ops ๏ design patterns ๏ performance optimization ๏ chaos engineering ๏ security ๏ general thoughts and techniques http://bit.ly/theburningmonk-serverless
  129. 129. https://bit.ly/production-ready-serverless
  130. 130. is serverless production-ready?
  131. 131. there are no silver bullets
  132. 132. 0 Containers “it works on my machine!” “production ready!”days Serverless 0 “it works!” “production ready!” days
  133. 133. 0 Containers “it works on my machine!” “production ready!”days Serverless 0 “it works!” “production ready!” days v2! v3! v4! v5! v6!
  134. 134. EC2 docker us-east-1a us-east-1b us-east-1a us-east-1b Theory
  135. 135. Reality
  136. 136. Reality
  137. 137. scale-to-zero
  138. 138. serverful serverless us-east-1a us-east-1b us-east-1a us-east-1bscaled to zero!
  139. 139. What about containers?
  140. 140. important, but invisible subsystem
  141. 141. https://read.acloud.guru/acg-faas-and-furious-b9574b6675c5
  142. 142. serverless is NOT the goal!
  143. 143. build products customers love to use
  144. 144. test ideas against the market quickly
  145. 145. iterate on s
  146. 146. deliver frequently, deliver quickly
  147. 147. own less technology, focus on creating Business Values
  148. 148. own less technology, focus on creating Business Values (serverless is just a good fit for this mindset)
  149. 149. scaling limits VPC long-running cold starts performance
  150. 150. scaling limits VPC long-running cold starts performance
  151. 151. scaling limits VPC long-running cold starts performance
  152. 152. http://bit.ly/2X0ksCY
  153. 153. http://bit.ly/2X0ksCY
  154. 154. http://bit.ly/2X0ksCY
  155. 155. scaling limits VPC long-running cold starts performance
  156. 156. FREQUENCY DURATION
  157. 157. FREQUENCY DURATION dictated by user traffic, out of your control
  158. 158. FREQUENCY DURATION optimize this!
  159. 159. minimise the duration of cold starts so they fall within acceptable latency range
  160. 160. use Node.js, Python or Golang
  161. 161. trim dependencies
  162. 162. full AWS-SDK https://theburningmonk.com/2019/03/just-how-expensive-is-the-full-aws-sdk/
  163. 163. full AWS-SDK https://theburningmonk.com/2019/03/just-how-expensive-is-the-full-aws-sdk/ dynamodb only
  164. 164. full AWS-SDK https://theburningmonk.com/2019/03/just-how-expensive-is-the-full-aws-sdk/ dynamodb only webpack!
  165. 165. https://theburningmonk.com/2019/03/just-how-expensive-is-the-full-aws-sdk/ ~200ms
  166. 166. keep functions single-purposed
  167. 167. http://bit.ly/2I7GJeJ
  168. 168. scaling limits VPC long-running cold starts performance
  169. 169. scaling limits VPC long-running cold starts performance
  170. 170. + pay-per-use?
  171. 171. Simon Wardley Serverless will fundamentally change how we build business around technology and how you code.

×