Serverless: a backend thing that gives superpowers to fronend developers - CSS-Minsk-JS

Serverless: a backend thing that gives superpowers to fronend developers - CSS-Minsk-JS

2663a9ac90cc6ed420e0e1560db57782?s=128

Slobodan Stojanović

September 21, 2019
Tweet

Transcript

  1. 1.
  2. 2.
  3. 3.
  4. 4.
  5. 21.

    @slobodan_ • Fast one command deployment • Cheap • Free

    if (almost) no one is using it • Caching + Auto-scaling
  6. 28.

    Slobodan Stojanović CTO @ Cloud Horizon & CTO @ Vacation

    Tracker co-author of Serverless Applications with Node.js book AWS Serverless Hero @slobodan_
  7. 34.

    @slobodan_ To, understand serverless, let's go a step back… What

    do you need to do to make your app function properly?
  8. 35.

    @slobodan_ • Buy or rent a server • Install Operating

    System • Setup the server (libs, framework, etc.) • Write your code (business logic, etc.) • Make your app available (deploy it) • Make sure your app works (monitoring) • Manage server and software updates • Manage your app code
  9. 37.

    @slobodan_ • Buy or rent a server • Install Operating

    System • Setup the server (libs, framework, etc.) • Write your code (business logic, etc.) • Deploy your code to the server • Make sure your app works (monitoring) • Manage server and software updates • Manage your app code
  10. 38.

    @slobodan_ • Buy or rent a server • Install Operating

    System • Setup the server (libs, framework, etc.) • Write your code (business logic, etc.) • Deploy your code to the server • Make sure your app works (monitoring) • Manage server and software updates • Manage your app code Isn't cloud helping?
  11. 39.

    @slobodan_ • Buy or rent a server • Install Operating

    System • Setup the server (libs, framework, etc.) • Write your code (business logic, etc.) • Deploy your code to the server • Make sure your app works (monitoring) • Manage server and software updates • Manage your app code ✔ ✔ Isn't cloud helping?
  12. 40.

    @slobodan_ • Buy or rent a server • Install Operating

    System • Setup the server (libs, framework, etc.) • Write your code (business logic, etc.) • Deploy your code to the server • Make sure your app works (monitoring) • Manage server and software updates • Manage your app code
  13. 41.

    @slobodan_ • Buy or rent a server • Install Operating

    System • Setup the server (libs, framework, etc.) • Write your code (business logic, etc.) • Deploy your code to the server • Make sure your app works (monitoring) • Manage server and software updates • Manage your app code Serverless is a next step!
  14. 42.

    @slobodan_ • Buy or rent a server • Install Operating

    System • Setup the server (libs, framework, etc.) • Write your code (business logic, etc.) • Deploy your code to the server • Make sure your app works (monitoring) • Manage server and software updates • Manage your app code Serverless is a next step! ✔ ✔
  15. 43.

    @slobodan_ • Buy or rent a server • Install Operating

    System • Setup the server (libs, framework, etc.) • Write your code (business logic, etc.) • Deploy your code to the server • Make sure your app works (monitoring) • Manage server and software updates • Manage your app code Serverless is a next step! ✔ ✔ ✔ ✔
  16. 45.

    @slobodan_ • Buy or rent a server • Install Operating

    System • Setup the server (libs, framework, etc.) • Write your code (business logic, etc.) • Deploy your code to the server • Make sure your app works (monitoring) • Manage server and software updates • Manage your app code
  17. 47.

    @slobodan_ • Buy or rent a server • Install Operating

    System • Setup the server (libs, framework, etc.) • Write your code (business logic, etc.) • Deploy your code to the server • Make sure your app works (monitoring) • Manage server and software updates • Manage your app code
  18. 49.

    @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
  19. 51.
  20. 53.

    @slobodan_ • Managed infrastructure, so you can focus on the

    code • Cheap • Auto-scaling and auto-failover • Per function isolation • Easy to start with (beginner friendly)
  21. 56.

    @slobodan_ • You are paying for used, not reserved capacity

    • Pay-per-execution model • If no one is using your app, it costs you $0 + there are generous free tiers
  22. 66.

    @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)
  23. 68.

    @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)
  24. 73.

    @slobodan_ • Lack of resources • DevOps engineer recommended serverless

    • Frontend dev wrote a SASS converter • Everything worked, so frontend team migrates other preprocessors
  25. 76.

    @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
  26. 80.

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

    full time developer (+ small help) • One mostly frontend developer • Slack chatbot + API + Angular dashboard
  27. 81.
  28. 88.

    @slobodan_ • More than 250 paying teams using the product

    • More than 6 million Lambda executions per month • Current infrastructure cost is less than $30 per month • Fast development cycles • Easy refactoring, because of microservices • Reusable parts/services for our next products
  29. 102.
  30. 112.

    @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
  31. 113.

    @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
  32. 114.

    @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
  33. 118.
  34. 122.

    @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…
  35. 123.
  36. 125.
  37. 129.

    @slobodan_ • Serverless is easy to start with (beginner friendly)

    • No server maintenance and other boring things • Pay-per-usage model + it's cheap • You can deploy SPAs, APIs or GraphQL in minutes • It gives you superpowers!
  38. 131.