Your language doesn't scale

781 views

Published on

Another set of slides for Colorado Software Summit 2008. Again, I never ended up giving this talk because I had to ship product.

Published in: Technology
  • Be the first to comment

Your language doesn't scale

  1. 1. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Your Language Doesnt Scale A Discussion of the Nature of Scaling Ikai Lan LinkedinIkai Lan — Your Language Doesn’t Scale Slide 1
  2. 2. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Hi! I’m Ikai LanIkai Lan — Your Language Doesn’t Scale Slide 2
  3. 3. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin This talk is about scalingIkai Lan — Your Language Doesn’t Scale Slide 3
  4. 4. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Particularly with regards to the webIkai Lan — Your Language Doesn’t Scale Slide 4
  5. 5. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Attributes of a web app Client pull based Operations must finish “fast” “Fresh” informationIkai Lan — Your Language Doesn’t Scale Slide 5
  6. 6. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin The chip on my shoulderIkai Lan — Your Language Doesn’t Scale Slide 6
  7. 7. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Ruby on Rails can’t scale! Ruby is slow Default SQL used is not optimal Page rendering is slowIkai Lan — Your Language Doesn’t Scale Slide 7
  8. 8. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin All of these are trueIkai Lan — Your Language Doesn’t Scale Slide 8
  9. 9. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin 1. Ruby is slowIkai Lan — Your Language Doesn’t Scale Slide 9
  10. 10. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin 2. SQL used is not optimalIkai Lan — Your Language Doesn’t Scale Slide 10
  11. 11. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin 3. Rendering is slow I don’t have a clever picture here. Just take my word for it.Ikai Lan — Your Language Doesn’t Scale Slide 11
  12. 12. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Why do these fall flat?Ikai Lan — Your Language Doesn’t Scale Slide 12
  13. 13. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Scaling != efficiencyIkai Lan — Your Language Doesn’t Scale Slide 13
  14. 14. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Efficiency is Minimizing input for output Bang for your buckIkai Lan — Your Language Doesn’t Scale Slide 14
  15. 15. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Scaling != performanceIkai Lan — Your Language Doesn’t Scale Slide 15
  16. 16. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Performance is Maximizing output for some input SpeedIkai Lan — Your Language Doesn’t Scale Slide 16
  17. 17. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Scalability is Being able to grow capacity with demand How well a solution to some problem will work when the size of the problem increasesIkai Lan — Your Language Doesn’t Scale Slide 17
  18. 18. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin In an ideal world … We achieve scalability efficiently while maintaining performanceIkai Lan — Your Language Doesn’t Scale Slide 18
  19. 19. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Myth: Needing to throw hardware to solve a capacity problem means your application is not scalableIkai Lan — Your Language Doesn’t Scale Slide 19
  20. 20. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Truth: If this works, by the definition, your application IS scalableIkai Lan — Your Language Doesn’t Scale Slide 20
  21. 21. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin … maybe not efficientIkai Lan — Your Language Doesn’t Scale Slide 21
  22. 22. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin So the arguments … Ruby is slow Default SQL is not optimal Page rendering is slowIkai Lan — Your Language Doesn’t Scale Slide 22
  23. 23. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Concerning performance … Assets Internet User Browser DatabaseIkai Lan — Your Language Doesn’t Scale Slide 23
  24. 24. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin How much time? Assets Internet User Tiny fraction Network: ??? Rendering: LONG TIME LONG TIMEIkai Lan — Your Language Doesn’t Scale Slide 24
  25. 25. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Scaling case studyIkai Lan — Your Language Doesn’t Scale Slide 25
  26. 26. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin First let’s define termsIkai Lan — Your Language Doesn’t Scale Slide 26
  27. 27. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Vertical scaling Improving performance in one of our component tiers Adding a tier optimized for some portion of the loadIkai Lan — Your Language Doesn’t Scale Slide 27
  28. 28. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Vertical scaling examples Upgrading hardware Edge caching Adding a caching tier for the data storeIkai Lan — Your Language Doesn’t Scale Slide 28
  29. 29. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Horizontal scaling Increase capacity by increasing instances of components Spreading load across instancesIkai Lan — Your Language Doesn’t Scale Slide 29
  30. 30. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Horizontal scaling examples Load balancing (hardware LB or DNS load balancing) Data partitioningIkai Lan — Your Language Doesn’t Scale Slide 30
  31. 31. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Different strokes …Ikai Lan — Your Language Doesn’t Scale Slide 31
  32. 32. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin On to the case study!Ikai Lan — Your Language Doesn’t Scale Slide 32
  33. 33. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin These guys made a site Matt IkaiIkai Lan — Your Language Doesn’t Scale Slide 33
  34. 34. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin To share pictures!Ikai Lan — Your Language Doesn’t Scale Slide 34
  35. 35. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Our first architectureIkai Lan — Your Language Doesn’t Scale Slide 35
  36. 36. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Awesome! We have users!Ikai Lan — Your Language Doesn’t Scale Slide 36
  37. 37. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin We have too many users!Ikai Lan — Your Language Doesn’t Scale Slide 37
  38. 38. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin The yelling begins Dude! Add more hardware! You don’t think I tried? The hardware - it does nothing!Ikai Lan — Your Language Doesn’t Scale Slide 38
  39. 39. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Our current architectureIkai Lan — Your Language Doesn’t Scale Slide 39
  40. 40. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Why isn’t this working?Ikai Lan — Your Language Doesn’t Scale Slide 40
  41. 41. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Bottlenecks! Bottlenecks!Ikai Lan — Your Language Doesn’t Scale Slide 41
  42. 42. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin The first bottleneck is always the persistent storeIkai Lan — Your Language Doesn’t Scale Slide 42
  43. 43. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Solution: Replicate dataIkai Lan — Your Language Doesn’t Scale Slide 43
  44. 44. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin New problem: replication delay How come everything I do takes a few minutes to work?Ikai Lan — Your Language Doesn’t Scale Slide 44
  45. 45. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Solution: cachingIkai Lan — Your Language Doesn’t Scale Slide 45
  46. 46. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin New problem: stale data I can’t remove this tag! Sometimes things aren’t up to date!Ikai Lan — Your Language Doesn’t Scale Slide 46
  47. 47. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin So now we’ve spent all that engineering effort and added no new functionality (would have been a lot harder if we were also trying to add features to stay competitive)Ikai Lan — Your Language Doesn’t Scale Slide 47
  48. 48. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Are we done? Maybe …Ikai Lan — Your Language Doesn’t Scale Slide 48
  49. 49. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin More growth: all persistence operations are expensiveIkai Lan — Your Language Doesn’t Scale Slide 49
  50. 50. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Have to partition DBIkai Lan — Your Language Doesn’t Scale Slide 50
  51. 51. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Our application has to now understand how to speak to a partitioned storeIkai Lan — Your Language Doesn’t Scale Slide 51
  52. 52. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin This is really hard!Ikai Lan — Your Language Doesn’t Scale Slide 52
  53. 53. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin And I haven’t even gotten to transactional integrity or backupsIkai Lan — Your Language Doesn’t Scale Slide 53
  54. 54. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin We’re also introducing many more points of failure = ops burdenIkai Lan — Your Language Doesn’t Scale Slide 54
  55. 55. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Engineering problems Cross functional development Merging Regression testingIkai Lan — Your Language Doesn’t Scale Slide 55
  56. 56. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Things now cost too much!Ikai Lan — Your Language Doesn’t Scale Slide 56
  57. 57. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Do we even have a business model?Ikai Lan — Your Language Doesn’t Scale Slide 57
  58. 58. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin No one is spared!Ikai Lan — Your Language Doesn’t Scale Slide 58
  59. 59. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Questions?Ikai Lan — Your Language Doesn’t Scale Slide 59
  60. 60. Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Linkedin Thanks for coming! ilan@linkedin.com http://www.linkedin.com/in/ikailanIkai Lan — Your Language Doesn’t Scale Slide 60

×