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

Serverless for startups - Podgorica, Montenegro

Serverless for startups - Podgorica, Montenegro

Slobodan Stojanović

November 15, 2019
Tweet

More Decks by Slobodan Stojanović

Other Decks in Programming

Transcript

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

    about Serverless?" and his Wardley maps
  4. Slobodan Stojanović CTO @ Cloud Horizon & CTO @ Vacation

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

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

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

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

    the problems they have. Should you use the same best practices?
  10. @slobodan_ On the other hand, serverless brings a lot of

    benefits to small and medium business* * it also brings benefits for large enterprises
  11. @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:
  12. @slobodan_ It also reduces the amount of back end code*

    * Less code == less bugs; code is liability, less code == a big win
  13. @slobodan_ Issues some people had with serverless: • Large binaries

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

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

    procedures How likely will I need to switch? What would be the cost?
  19. @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)
  20. @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)
  21. @slobodan_ • Lack of resources • DevOps engineer recommended serverless

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

    full time developer (+ small help) • One mostly frontend developer • Slack chatbot + API + Angular dashboard
  24. @slobodan_ • More than 300 paying teams using the product

    • Current infrastructure cost is less than $20 per month • Fast development cycles • Easy refactoring, because of microservices • Reusable parts/services for our next products
  25. @slobodan_ • 500,000 monthly active users • Company size: two

    people • Migrated to serverless in ~1 month • Monthly AWS bill: $107
  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_ • 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…
  30. @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
  31. @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