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

Serverless: a backend thing that gives superpow...

Serverless: a backend thing that gives superpowers to frontend developers #FEC2018

From Frontend Conference Zürich 2018: https://frontendconf.ch/speakers/slobodan-stojanovic

Slobodan Stojanović

August 30, 2018
Tweet

More Decks by Slobodan Stojanović

Other Decks in Programming

Transcript

  1. @slobodan_ • Fast one command deployment • Cheap • Free

    if (almost) no one is using it • Caching + Auto-scaling
  2. @slobodan_ Slobodan Stojanovic CTO @ Cloud Horizon co-author of Serverless

    Applications with Node.js book AWS Serverless Hero @slobodan_ effortless-serverless.com
  3. @slobodan_ To, understand serverless, let's go a step back… What

    do you need to do to make your app function properly?
  4. @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
  5. @slobodan_ What's important for your business? Or what's important to

    you, if you are building your app for yourself or for fun?
  6. @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
  7. @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?
  8. @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?
  9. @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?
  10. @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!
  11. @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! ✔ ✔
  12. @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! ✔ ✔ ✔ ✔
  13. @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
  14. @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
  15. @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)
  16. @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
  17. @slobodan_ How many DevOps team members you need to be

    able to handle 250 million preprocessor API requests per month?
  18. @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)
  19. @slobodan_ • Lack of resources • DevOps engineer recommended serverless

    • Frontend dev wrote a SASS converter • Everything worked, so frontend team migrates other preprocessors
  20. @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
  21. @slobodan_ • Started as a small startup with one full

    time developer (+ small help) • "Fullstack" developer • Slack chatbot + API + Angular dashboard
  22. @slobodan_ • Almost 100 teams using the product • Current

    infrastructure cost is $0 • Fast development cycles • Easy refactoring, because of microservices • Reusable parts for our next products
  23. @slobodan_ P.S. You can do server-side rendering using similar approach!

    There are also Lambda@Edge and Cloudflare workers
  24. @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
  25. @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)
  26. @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)
  27. @slobodan_ • Claudia.js - https://claudiajs.com • Scotty.js - https://github.com/stojanovic/scottyjs •

    Vacation Tracker - https://vacationtracker.io • AWS App Sync - https://aws.amazon.com/appsync/
  28. @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!
  29. @slobodan_ Serverless Applications with Node.js Use claudia40 promo code for

    40% off effortless-serverless.com/book @slobodan_