Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Serverless and startups, the beginning of a beautiful friendship

Serverless and startups, the beginning of a beautiful friendship

My presentation from AWS Skills Day in Belgrade (http://awsskillsdaysemosedu.com)

Slobodan Stojanović

March 07, 2019
Tweet

More Decks by Slobodan Stojanović

Other Decks in Programming

Transcript

  1. @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
  2. @slobodan_ Simon Wardley explains it nicely with "Why the Fuss

    about Serverless?" and his Wardley maps
  3. Slobodan Stojanovic CTO @ Cloud Horizon & CTO @ Vacation

    Tracker co-author of Serverless Applications with Node.js book AWS Serverless Hero @slobodan_ serverless.pub
  4. @slobodan_ Serverless computing is a cloud-computing execution model in which

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

    consumed by an application, rather than on pre-purchased units of capacity.
  6. @slobodan_ • Autoscaling • Pay for used capacity only •

    No server maintenance • Short time to market • Cheap
  7. @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?
  8. @slobodan_ There's a big chance you'll never have most of

    the problems they have. Should you use the same best practices?
  9. @slobodan_ • Simplifies my apps • Allows small teams to

    move fast and accomplish more • Per-function isolation • Managed infrastructure + autoscaling • Code reusability • Financial incentives for improvements
  10. @slobodan_ It also reduces the amount of back end code*

    * code is liability, less code is a big win
  11. @slobodan_ Issues some people had with serverless: • Large binaries

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

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

    • Nonsupported runtimes • Compliance • Cold start • Cold start with VPN In progress
  14. @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
  15. @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
  16. @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
  17. @slobodan_ • Planning and analysis • Good architecture • Deployment

    procedures How likely will I need to switch? What would be the cost?
  18. @slobodan_ How many DevOps team members you need to be

    able to handle 250 million preprocessor API requests per month? in your team (or to pay directly)
  19. @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)
  20. @slobodan_ • Lack of resources • DevOps engineer recommended serverless

    • Frontend dev wrote a SASS converter • Everything worked, so frontend team migrates other preprocessors
  21. @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
  22. @slobodan_ • In-company hackathon idea • Small startup with one

    full time developer (+ small help) • One mostly frontend developer • Slack chatbot + API + Angular dashboard
  23. @slobodan_ • Almost 200 teams using the product • Current

    infrastructure cost is $0 • Fast development cycles • Easy refactoring, because of microservices • Reusable parts for our next products
  24. @slobodan_ • 500,000 monthly active users • Company size: two

    people • Migrated to serverless in ~1 month • Monthly AWS bill: $107
  25. @slobodan_ P.S. You can do server-side rendering using similar approach!

    There are also Lambda@Edge and Cloudflare workers
  26. @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
  27. @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)
  28. @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)
  29. @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
  30. @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