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

A Jedi's Guide to Migrating to Serverless

A Jedi's Guide to Migrating to Serverless

Aleksandar Simovic

April 12, 2018
Tweet

More Decks by Aleksandar Simovic

Other Decks in Technology

Transcript

  1. What we’ll be covering • Stepping stones to serverless •

    Serverless monoliths • Rethinking application processes • The function-by-function approach
 “Divide and conquer”
  2. Serverless means… • No longer need to manage or configure

    servers • Pay only for used time • Automatically scaled per usage • Auto-failover and automated high scalability
  3. Serverless Monoliths = Dark Side • Hard to maintain and

    test • Slower starting time • Kept all drawbacks from your previous state • Higher cost
  4. Bundling many functionalities into a serverless function also means… every

    time you wanted to use your car, 
 you would have to assemble it first.
  5. Migrating to serverless requires us to change how we think

    about application development …not just jump to serverless.
  6. Function-by-function approach “Divide and Conquer” 2. Rethink and separate services

    into functions Hint: you don’t pay for your function storage, just usage.
  7. Case Study: • Can’t predict the popularity of their pens

    • Have lots of unexpected peaks • Being able to serve is the key business goal • Spending lots on provisioning servers • Keeping lots of servers idle Problems:
  8. Case Study: • Low hanging fruits 
 = preprocessors •

    Migrated all preprocessors into serverless functions • Separated their business process into functions • > 200,000 requests / h
  9. Case Study: • Converters were eating too much resources •

    Too expensive Heroku dynos • Less isolation, could collide over resources • Hard to experiment Problems: MINDMUP
  10. Case Study: • Low hanging fruits 
 = converters •

    Migrated all converters into functions • Separated business processes for payments, notifications, file storage • Half a million active users each month • Grew 30% in the migration period, 
 while reduced costs by 30% MINDMUP
  11. Key points to remember • Identify your isolated problems. •

    Apply the “function-by-function” approach. • Analyze the remaining monolith services. • Repeat the approach.
  12. Reuse existing serverless components • Plug-and-play authentication and authorization services:

    AWS Cognito, Azure Active Directory, etc. • Easily add other authentication providers. • User groups. • Automated permission and policy systems.
  13. Revised Steps • Identify isolated problems. • Check and replace

    these problems with existing serverless components. • Apply the “function-by-function” approach. • Analyze the remaining monolith services. • Repeat.
  14. Summary • Serverless is much bigger than just 
 “no

    longer managing servers”. • Don’t just rush going serverless. Rethink. • Remember your context. Reuse. • Pick the low hanging “fruits” (services) first. • “Divide and conquer” your business processes into functions.