Serverless and Startups - Nemački kutak, Berlin, 2019

Serverless and Startups - Nemački kutak, Berlin, 2019

2663a9ac90cc6ed420e0e1560db57782?s=128

Slobodan Stojanović

June 13, 2019
Tweet

Transcript

  1. @slobodan_ Can your startup beat competition with much bigger budget

    and team?
  2. @slobodan_ Maybe, but you need a slingshot!

  3. @slobodan_ A slingshot? Why?

  4. @slobodan_ Do you remember a story of David and Goliath?

  5. @slobodan_ In a single combat, David wouldn't have a chance

  6. @slobodan_ But David won!

  7. @slobodan_ Why and how?

  8. @slobodan_

  9. @slobodan_ David was smaller and weaker, but he had some

    advantages
  10. @slobodan_ • Sp!d • Agility • Unorthodox choice of weapon

    Davids advantages:
  11. @slobodan_

  12. @slobodan_ Goliath didn't have a chance!

  13. @slobodan_ What is your slingshot?

  14. @slobodan_

  15. @slobodan_ How to find your slingshot?

  16. @slobodan_ Let's see an example: leave tracking for small and

    medium businesses
  17. None
  18. None
  19. None
  20. None
  21. @slobodan_ Meet Wardley Maps!

  22. @slobodan_ A Wardley Map is a representation of the landscape

    in which a business operates. It consists of a value chain (activities needed to fulfill user needs) graphed against evolution (how individual activities change over time under supply and demand competition).
  23. None
  24. None
  25. None
  26. None
  27. @slobodan_ What's the result?

  28. @slobodan_ Something like this.

  29. @slobodan_ And, our slingshot is
 SERVERLESS

  30. @slobodan_ Wait, what's that?

  31. @slobodan_ "Serverless is an abstraction level over a company’s IT

    infrastructure, enabling product and engineering to focus significantly more on delivering software business value." Aleksandar Simovic
 AWS Serverless Hero
  32. @slobodan_ Or, if you prefer maps…

  33. @slobodan_ Simon Wardley explains it nicely with "Why the Fuss

    about Serverless?" and his Wardley maps
  34. @slobodan_ From "Why the Fuss about Serverless?" (https://youtu.be/SPsaqiegOP4)

  35. @slobodan_ From "Why the Fuss about Serverless?" (https://youtu.be/SPsaqiegOP4)

  36. @slobodan_ From "Why the Fuss about Serverless?" (https://youtu.be/SPsaqiegOP4)

  37. @slobodan_ From "Why the Fuss about Serverless?" (https://youtu.be/SPsaqiegOP4)

  38. @slobodan_ That's serverless

  39. @slobodan_ And that leads us to our topic…

  40. Serverless and startups the beginning of a beautiful friendship

  41. @slobodan_ But, before we continue…

  42. Slobodan Stojanović CTO @ Cloud Horizon & CTO @ Vacation

    Tracker co-author of Serverless Applications with Node.js book AWS Serverless Hero @slobodan_
  43. @slobodan_ Let's go back to serverless

  44. @slobodan_ Serverless computing is a cloud-computing execution model in which

    the cloud provider dynamically manages the allocation of machine resources.
  45. @slobodan_ Pricing is based on the actual amount of resources

    consumed by an application, rather than on pre-purchased units of capacity.
  46. @slobodan_ What does that mean?

  47. @slobodan_ Serverless app costs you nothing* if nobody is using

    it * except storage price
  48. @slobodan_ Capital expenses (CAPEX) vs Operating expenses (OPEX)

  49. @slobodan_ Benefits?

  50. @slobodan_ • Autoscaling • Pay for used capacity only •

    No server maintenance • Short time to market • Cheap
  51. @slobodan_ Why is serverless important? to me »

  52. @slobodan_ Most of the time we use big companies, such

    as Netflix or Facebook, as role models for our tech. They do amazing things, but are they really good role models for small and medium startups?
  53. @slobodan_ There's a big chance you'll never have most of

    the problems they have. Should you use the same best practices?
  54. @slobodan_

  55. @slobodan_ On the other hand, serverless brings a lot of

    benefits to small and medium business* * it also brings benefits for large enterprises
  56. @slobodan_

  57. @slobodan_ But that's not all!

  58. @slobodan_ • Simplifies my apps • Allows small teams to

    move fast and accomplish more • Gives us per-function isolation • comes with managed infrastructure and autoscaling • allows better code reusability • has financial incentives for improvements Serverless:
  59. @slobodan_

  60. @slobodan_ It also reduces the amount of back end code*

    * Less code == less bugs; code is liability, less code == a big win
  61. @slobodan_ Scary parts

  62. @slobodan_ Issues some people had with serverless: • Large binaries

    • Nonsupported runtimes • Compliance • Cold start • Cold start with VPN
  63. @slobodan_ Issues some people had with serverless: • Large binaries

    • Nonsupported runtimes • Compliance • Cold start • Cold start with VPN In progress
  64. @slobodan_ But what about…

  65. @slobodan_ BIG

  66. @slobodan_ BAD

  67. @slobodan_ VENDOR LOCK-IN

  68. @slobodan_ What is vendor lock-in?

  69. @slobodan_ "In economics, vendor lock-in, makes a customer dependent on

    a vendor for products and services, unable to use another vendor without substantial switching costs." Wikipedia
  70. @slobodan_ What about vendor lock-in in the cloud?

  71. @slobodan_

  72. @slobodan_

  73. @slobodan_ A guy with a lot of servers.
 Let's call

    him Jeff.
  74. @slobodan_ Jeff is smart, and he knows how do you

    use his servers.
  75. @slobodan_ Jeff is smart, and he knows how do you

    use his servers.
  76. @slobodan_ Jeff is smart, and he knows how do you

    use his servers.
  77. @slobodan_ Jeff is smart, and he knows how do you

    use his servers.
  78. @slobodan_ But what if Jeff is actually a villain?

  79. @slobodan_ Your wallet would not be happy…

  80. @slobodan_ Another guy with a lot of servers.
 Let's call

    him Bill.
  81. @slobodan_ Another guy with a lot of servers.
 Let's call

    him Bill.
  82. @slobodan_ Another guy with a lot of servers.
 Let's call

    him Bill.
  83. @slobodan_ Another guy with a lot of servers.
 Let's call

    him Bill.
  84. @slobodan_ That's what people think vendor lock-in in the cloud

    is
  85. @slobodan_ "My train of thought went like this: the term

    “lock-in” is misleading. We are really talking about switching costs." Mark Schwartz
 Enterprise Strategist at AWS
  86. @slobodan_ "As soon as you commit yourself to a platform

    or a vendor you will have switching costs if you later decide to change." Mark Schwartz
 Enterprise Strategist at AWS
  87. @slobodan_ Howtofight vendorlock-in?

  88. @slobodan_ Better question: how to keep your switching costs reasonable?

  89. @slobodan_ • Planning and analysis • Good architecture • Deployment

    procedures How likely wi" I n!d to switch? What would be the cost?
  90. @slobodan_ Nice, but who is using serverless?

  91. @slobodan_ Case studies

  92. @slobodan_ CodePen

  93. @slobodan_

  94. @slobodan_ How many DevOps team members you n!d to be

    able to handle 250 million preprocessor API requests per month? in your team (or to pay directly)
  95. @slobodan_ 0 Yes, zero/nu"/nu"a/nula…

  96. @slobodan_ • Team of mostly frontend devs + one DevOps

    • Ruby on Rails backend • Many preprocessors that needs full isolation • > 200k requests/hour in peak • Unexpected peaks (you never know when some pen will become popular)
  97. @slobodan_

  98. @slobodan_

  99. @slobodan_

  100. @slobodan_ • Lack of resources • DevOps engineer recommended serverless

    • Frontend dev wrote a SASS converter • Everything worked, so frontend team migrates other preprocessors
  101. @slobodan_

  102. @slobodan_ Results?

  103. @slobodan_ • Full isolation between services • Auto-scaling (up to

    5000 parallel requests) • Decreased infrastructure cost (250 million requests costs $1180/month) • More DevOps time for RoR part of the app • Frontend developers with superpowers
  104. @slobodan_ Vacation Tracker

  105. @slobodan_ VacationTracker.io

  106. @slobodan_ • In-company hackathon idea • Small startup with one

    full time developer (+ small help) • One mostly frontend developer • Slack chatbot + API + Angular dashboard
  107. @slobodan_ To minimize initial cost and to speed up development,

    we used serverless from the beginning
  108. @slobodan_ Current state of the system

  109. @slobodan_

  110. @slobodan_ Ok, it's more like this:

  111. @slobodan_

  112. @slobodan_

  113. @slobodan_ Results?

  114. @slobodan_ • More than 160 paying teams using the product

    • Current infrastructure cost is less than $5 per month • Fast development cycles • Easy refactoring, because of microservices • Reusable parts/services for our next products
  115. @slobodan_ Btw, do you know the cost of your bugs?

  116. @slobodan_ We know the exact cost of our bugs!

  117. @slobodan_ $2.37

  118. @slobodan_ $2.37 Fr! tier got us covered :)

  119. @slobodan_ MindMup

  120. @slobodan_ • 500,000 monthly active users • Company size: two

    people • Migrated to serverless in ~1 month • Monthly AWS bill: $107
  121. @slobodan_

  122. @slobodan_ Where to start?

  123. @slobodan_

  124. @slobodan_ A Single Page App or a static website

  125. @slobodan_ https://console.aws.amazon.com/amplify

  126. @slobodan_ An Express.js application or API

  127. @slobodan_ What's the benefit? Beside being easy to deploy it

  128. @slobodan_

  129. @slobodan_ bit.ly/serverless-expressjs

  130. @slobodan_ Not the best solution, because…

  131. @slobodan_ A better API

  132. @slobodan_ Claudia.js + Claudia API Builder claudiajs.com

  133. @slobodan_ Looks the same, but it's not!

  134. @slobodan_ Faster means cheaper! You pay per execution time, mi"iseconds

    matter
  135. @slobodan_ APIs are boring, GraphQL FTW!

  136. @slobodan_ AWS AppSync aws.amazon.com/appsync

  137. @slobodan_ • Serverless GraphQL • Preconfigured access to AWS data

    sources
 (DynamoDB, Lambda or Elastic Search) • Real-time data access and updates • Offline data synchronization • Authorizers • Minimize backend development
  138. @slobodan_ "Oh, and I only hire front-end developers at this

    point. I have been the sole DevOps/backend/ middle-tier developer in the last two companies I started, and it’s been fine." Joe Emison @JoeEmison
  139. @slobodan_ "With AppSync I could continue to be the CTO,

    do all the backend and middle-tier code, and support up to probably about a hundred front-end developers before I would need a dedicated backend developer." Joe Emison @JoeEmison
  140. @slobodan_ A file converter

  141. @slobodan_ Claudia.js or AWS Serverless Application Repository serverlessrepo.aws.amazon.com/applications

  142. @slobodan_

  143. @slobodan_ ERR_TOO_MANY_TOOLS

  144. @slobodan_ One tool to rule them all

  145. @slobodan_ AWS Amplify aws-amplify.github.io

  146. @slobodan_ • Deployment (with and without CDN and HTTPS) •

    Auth using Amazon Cognito (+ social signins) • GraphQL backend using AppSync + real-time • Media storage using S3 • Nice client-side libraries for React and others • And much more…
  147. @slobodan_ Quick summary

  148. @slobodan_ • Use serverless to gain speed and agility, and

    to reduce costs • With serverless you can measure more things • Serverless downsides are fading away fast • Use Wardley maps • Be David, find your secret weapon
  149. @slobodan_

  150. @slobodan_ Links & recommendations

  151. @slobodan_ • Wardley maps: wardleymaps.com • Switching Costs and Lock-In:

    amzn.to/2S4iT3G • FinDev and Serverless Microeconomics: amzn.to/2VLRQwF • David & Goliath book by Malcom Gladwell • Vacation Tracker: vacationtracker.io
  152. @slobodan_ One more thing!

  153. @slobodan_

  154. @slobodan_ Serverless Days Belgrade Friday, September 13, 2019 serverlessbelgrade.com

  155. @slobodan_ And one more…

  156. @slobodan_ Serverless Applications with Node.js Use claudia40 promo code for

    40% off serverless.pub/book @slobodan_