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

Faster with Serverless: Building production-ready applications

Faster with Serverless: Building production-ready applications

There are many discussions on how serverless is great and what are its advantages, but those could be all summed in that its main focus is to help us deliver applications better and faster. Building software that runs, satisfies requirements, is stable and scalable does indeed sound like a Disney fairytale, but it is our everyday job as architects, engineers and even managers. Serverless makes that job a lot easier and this talk's goal is to show how does it do that, how to build applications that are able to withstand heavy loads from day one, while delivering more features faster.

Aleksandar Simovic

January 29, 2019
Tweet

More Decks by Aleksandar Simovic

Other Decks in Technology

Transcript

  1. About me Aleksandar Simovic Senior Software Engineer @ ScienceExchange •

    Co-author of “Serverless Applications with Node.js” 
 Book published by Manning Publications • AWS Serverless Hero • Core team member @ Claudia.js • Co-organizer of JS Belgrade (~1950 members) • Co-organizer of Serverless Belgrade • Organizer of Map Meetup Belgrade (Wardley Maps) • Writing on Serverless.Pub, streaming on Twitch, building Jarvis
  2. The startup • Series A, B • Double digit billion

    dollar market • Traction of >100,000 customers • Innovative, disruptive… you name it • A-team talent, problem solving (10 engineers) • Customer-driven • Diverse customer base, world-wide
  3. Actually… No. • Unpredictable growth with scarce resources • Customers

    stuck, failing pilot programs • Night calls, crashes, scalability issues • Spending ~20% of backend developer time on infrastructure • So much overtime • Communication issues
  4. Startups and financing • Money is scarce • Every decision

    has a high opportunity cost • Multiple stages cost a lot 
 (developers, management, investors, customers, 
 pilot programs) • Wasting ~20% of backend developer time on preparing demos, pilot programs, infrastructure
  5. Your investors 
 didn’t care
 
 You failed to serve

    the customers
 (and you lost the revenue) (and you wasted the investment)
  6. The main problems • Slow feature development cycles • Bad

    capacity planning • Wasting resources • Miscommunication • No investment • Slow pivoting
  7. Being a developer is not easy • Lots of responsibilities

    • Increasing complexity • Everyone wants everything done “yesterday” • Constantly learning • Build a “production-ready” application, where if something goes wrong, its your fault • Lots of “smart-a**es” telling you what to do (including me)
  8. What does the customer care about Have an application that:

    • Runs • Stable • Scales • Satisfies requirements • Can withstand heavy-loads from day one • Short Time to Market
  9. Production-ready applications Apps that satisfy: • Operational Excellence • Security

    • Reliability • Performance Efficiency • Cost Optimization • Compliance AWS Well-Architectured white paper
  10. Serverless • No server management, operations, provisioning • Never pay

    for idle • Scales per usage • Available, resilient with built-in fault tolerance
  11. What about security? How many of you have fixed or

    applied a patch • Spectre • Meltdown 
 
 on the 3rd of January 2018?
  12. • Serverless backend for web and mobile applications • Robust

    GraphQL APIs including schema, resolvers, and databases • Client support for offline & subscriptions for real-time capabilities. • Available for Web, iOS, Android AWS AppSync
  13. JavaScript library for app development using cloud-services • APIs &

    serverless logic • GraphQL Client • Secure Authentication and Authorization • Analytics • Streaming and Real-Time data • Push Notifications • Storage / S3 • Internationalization AWS Amplify
  14. Integrates with the major frontend frameworks • React.js • React

    Native • Angular.js • Vue.js AWS Amplify
  15. import { API } from ‘aws-amplify’ let apiName = ‘HellasAPI’

    let path = ‘/hello-hellas’
 
 API.get(apiName, path)
 .then(response => console.log(response)) API - Amazon API Gateway
  16. import { API, graphqlOperation } from ‘aws-amplify’
 
 API.configure(
 graphql_endpoint:

    ‘https://exampleendpoint.com’
 )
 
 const oneEvent = await API.graphql(graphqlOperation(GetEvent, {id: 22})) API - GraphQL
  17. • Prebuilt serverless components • Instantly deployable into your account

    • Instantly attachable to existing apps using Nested Apps • Copy as SAM resource • Can publish and share your own AWS Serverless Application Repository
  18. • >200,000 requests per hour • Migrated all preprocessors into

    serverless functions • Node.js, using Claudia.js • Depend on unpredictable peaks • Significant cost reduction • Migration done by their frontend engineers
  19. • 500,000 users per month • ~$107 / month. •

    Company size of two people • Migration took around a month MindMup
  20. ScienceExchange • Integration with an accounting reports service • Constant

    influx of events • The accounting service product costs $100,000 / year • Necessary for finance, data science and analytics teams • Decided to build the project in-house 
 (estimation 3 months)
  21. ScienceExchange Result • Saving $99,990 / year • Development took

    2 weeks • Scales automatically • Operational costs: $0.09 per GB
  22. Key takeaways • Serverless helps us focus on our business

    core • Scale your services, not yourself • Serverless is much more than AWS Lambda, FaaS • Enterprises and startups alike are both adopting serverless • Serverless helps us easily develop and build applications that are able to withstand heavy-loads from day one.
  23. Q&A Thank you! 40% discount 
 using
 
 claudia40
 


    More at:
 serverless.pub 
 
 Twitter:
 @simalexan