Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Performance Tales of Serverless

205 views

Published on

Performance Tales of Serverless at Codemotion Amsterdam 2018

  • Be the first to comment

Performance Tales of Serverless

  1. 1. @MikhailShilkov Performance Tales of Serverless Mikhail Shilkov AMSTERDAM | MAY 8-9, 2018
  2. 2. @MikhailShilkov • “You Don’t Want to Build a Serverless Monolith” • “Democratizing Serverless: the New Open Source, Cloud Agnostic Functions Platform” • “Performance Tales of Serverless” • “Continuous delivering serverless applications in the pipeline: indispensable advice from the trenches” • “Serverless Swift APIs with Apache OpenWhisk” • “The serverless full stack” • “Thinking twice about migrating to Serverless”
  3. 3. @MikhailShilkov
  4. 4. @MikhailShilkov
  5. 5. @MikhailShilkov
  6. 6. @MikhailShilkov
  7. 7. @MikhailShilkov No servers to manage Implicit high availability 20k requests/day free Python!
  8. 8. @MikhailShilkov
  9. 9. @MikhailShilkov
  10. 10. @MikhailShilkov
  11. 11. @MikhailShilkov
  12. 12. @MikhailShilkov
  13. 13. @MikhailShilkov “ “ @MikhailShilkov James Governor, Analyst & Co-founder at RedMonk We’re going to see the first billion-dollar startup with a single employee, the founder, and that engineer will be using serverless technology
  14. 14. @MikhailShilkov
  15. 15. @MikhailShilkov
  16. 16. @MikhailShilkov 1 user 100 users 10k users 1 mln users
  17. 17. @MikhailShilkov 1 user 100 users 10k users 1 mln users ResponseTime
  18. 18. @MikhailShilkov
  19. 19. @MikhailShilkov 0 1 0:00 1:00 2:00 3:00 4:00 5:00
  20. 20. @MikhailShilkov 0 20 40 60 80 100 120 140
  21. 21. @MikhailShilkov 0 50 100 150 200 250 We want to be this fast
  22. 22. @MikhailShilkov 0 100 200 300 400 500 600 Dependency Duration End-to-End Response Time
  23. 23. @MikhailShilkov 0 500 1000 1500 2000 2500 3000 3500 Dependency Duration End-to-End Response Time
  24. 24. @MikhailShilkov 0 500 1000 1500 2000 2500 3000 3500 4000 4500 Dependency Duration End-to-End Response Time
  25. 25. @MikhailShilkov
  26. 26. @MikhailShilkov 0 1 0:00 1:00 2:00 3:00 4:00 5:00 Cold starts
  27. 27. @MikhailShilkov UNDERSTAND THE RUNTIME
  28. 28. @MikhailShilkov COLD STARTS ARE SLOW(-ER) …and depend on language and package size
  29. 29. @MikhailShilkov
  30. 30. @MikhailShilkov
  31. 31. @MikhailShilkov
  32. 32. @MikhailShilkov
  33. 33. @MikhailShilkov
  34. 34. @MikhailShilkov BE CREATIVE IN USAGE SCENARIOS
  35. 35. @MikhailShilkov
  36. 36. @MikhailShilkov 0 5 10 15 20 25 30 35 40 0:00 1:00 2:00 3:00 4:00 5:00
  37. 37. @MikhailShilkov 0 500 1000 1500 2000 2500 3000 3500 End-to-End Response Time
  38. 38. @MikhailShilkov 0 500 1000 1500 2000 2500 3000 3500 Dependency Duration End-to-End Response Time
  39. 39. @MikhailShilkov IS LIMITED BY NON-SERVERLESS DEPENDENCIES SERVERLESS SCALABILITY
  40. 40. @MikhailShilkov can LOAD TEST or DDoS any “mere mortal” service SERVERLESS APPLICATION
  41. 41. @MikhailShilkov
  42. 42. @MikhailShilkov
  43. 43. @MikhailShilkov
  44. 44. @MikhailShilkov 0 100000 200000 300000 400000 500000 600000 700000 800000 900000 1000000 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 #messagespending minutes
  45. 45. @MikhailShilkov 0 100000 200000 300000 400000 500000 600000 700000 800000 900000 1000000 0 1 2 3 4 5 6 7 8 9 10 11 12 13 #messagespending minutes
  46. 46. @MikhailShilkov 0 100000 200000 300000 400000 500000 600000 700000 800000 900000 1000000 0 1 2 3 4 5 6 7 8 9 10 11 12 #messagespending minutes
  47. 47. @MikhailShilkov 0 100000 200000 300000 400000 500000 600000 700000 800000 900000 1000000 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1024 MB 512 MB 256 MB 128 MB
  48. 48. @MikhailShilkov EVENT BASED ASYNC FTW SERVERLESS IS NOT JUST HTTP
  49. 49. @MikhailShilkov LIMITS, SCALING MODE, RAM & CPU ALLOCATION LEARN RESOURCE MODEL:
  50. 50. @MikhailShilkov
  51. 51. @MikhailShilkov 0 100 200 300 400 500 600 700 800 0:00 0:10 0:20 0:30 0:40 0:50 1:00
  52. 52. @MikhailShilkov 0 50 100 150 200 250 300 350 400 0:00 0:10 0:20 0:30 0:40 0:50 1:00 Requests 50th 90th 95th
  53. 53. @MikhailShilkov 0 200 400 600 800 1000 1200 1400 1600 1800 2000 0:00 0:10 0:20 0:30 0:40 0:50 1:00 Requests 50th 99th
  54. 54. @MikhailShilkov 0 50 100 150 200 250 300 0:00 0:10 0:20 0:30 0:40 0:50 1:00 Requests 50th 90th 95th 99th
  55. 55. @MikhailShilkov 0 200 400 600 800 1000 0:00 0:10 0:20 0:30 0:40 0:50 1:00 Success Errors
  56. 56. @MikhailShilkov const http = require('http'); const agent = new http.Agent({keepAlive: true}); exports.mycloudfunction = (req, res) => { req = http.get({ host: '...', port: 80, path: '...', agent: agent }, // ...
  57. 57. @MikhailShilkov 0 2000 4000 6000 8000 10000 12000 0:00 0:10 0:20 0:30 0:40 0:50 1:00 Requests 50th 90th 95th 99th
  58. 58. @MikhailShilkov SPIKY LOAD… SERVERLESS IS UNIQUELY SUITABLE FOR BUT KNOW THE LIMITS
  59. 59. @MikhailShilkov
  60. 60. @MikhailShilkov • Throughput is probably enough • Your app should not be critical to latency • There is no SLA • Don’t forget tooling, architecture, pricing
  61. 61. @MikhailShilkov • Prototypes • Low traffic apps • Cloud Glue • Unusual load profiles
  62. 62. @MikhailShilkov
  63. 63. @MikhailShilkov • http://blog.myroomabroad.com/story-room-abroad/ • https://www.nesta.org.uk/news/12-predictions-2012 • https://bestresellerhostingprovider.com/differences-between-dedicated- and-shared-servers/ • https://thebohemianbreeze.com/wp-content/uploads/2017/12/design- 2711676.jpg

×