Don't Forget The Network: Your App Is Slower Than You Think (RailsConf 2016)

Don't Forget The Network: Your App Is Slower Than You Think (RailsConf 2016)

When you look at your response times, satisfied that they are "fast enough", you're forgetting an important thing: your users are on the other side of a network connection, and their browser has to process and render the data that you sent so quickly. This talk examines some often overlooked parts of web applications that can destroy your user experience even when your response times seem fantastic. We'll talk about networks, routing, client and server-side VMs, and how to measure and mitigate their issues.

4c3ed917e59156a36212d48155831482?s=128

André Arko

May 05, 2016
Tweet

Transcript

  1. don't forget the network your app is slower than you

    think
  2. André Arko @indirect

  3. The Ruby Way therubyway.io

  4. None
  5. None
  6. None
  7. Routing

  8. Routing your app has this

  9. Routing how does it work?

  10. Development App You

  11. Production People Router Server App App Router Server App App

    Router
  12. Routing how slow is it?

  13. Routing does it back up?

  14. Request time

  15. Request time not the time you measure

  16. Request time wall-clock time from real clients

  17. Request time make requests from around the world

  18. Servers

  19. Servers you have no idea what is going on

  20. really.

  21. Runtime lag

  22. Runtime lag how do you tell you lost consciousness?

  23. Runtime lag you have it.

  24. Runtime lag you have it. how bad is it?

  25. VM lag

  26. VM lag do you have it?

  27. VM lag do you check for it?

  28. VM lag do you know how to check for it?

  29. Metrics

  30. Metrics are important

  31. Metrics tell you what is happening

  32. you rn →

  33. Metrics convince you you understand

  34. you later →

  35. Averages convince you you understand

  36. Averages are lie-candy for your brain

  37. “Normal” 5 -5 -4 -3 -2 -1 0 1 2

    3 4 0 0.1 0.2 0.3 0.4
  38. “Normal” 5 -5 -4 -3 -2 -1 0 1 2

    3 4 0 0.1 0.2 0.3 0.4
  39. Real Life 5 -5 -4 -3 -2 -1 0 1

    2 3 4 0 0.1 0.2 0.3 0.4
  40. brendangregg.com

  41. brendangregg.com

  42. just heard “w e have a great average” →

  43. The problem with averages: If you put one hand in

    a bucket of ice and the other in a bucket of hot coals, on average, you’re comfortable. Erik Michaels-Ober @sferik
  44. Averages mask problems

  45. 10 0 1 2 3 4 5 6 7 8

    9 250 0 50 100 150 200
  46. Graph the median

  47. 10 0 1 2 3 4 5 6 7 8

    9 250 0 50 100 150 200
  48. Graph 95th percentile

  49. 10 0 1 2 3 4 5 6 7 8

    9 250 0 50 100 150 200
  50. Graph 99th percentile

  51. 10 0 1 2 3 4 5 6 7 8

    9 1000 0 250 500 750
  52. Aggregate graphs another average

  53. None
  54. Breakout graphs show each source

  55. None
  56. Seriously, do it Visualize your data

  57. graphic by Schutz and Avenue, CC-Attribution-ShareAlike, taken from from the

    Wikipedia article on Anscombe's quartet
  58. Average of X: 9 Average of X: 9 Average of

    X: 9 Average of X: 9
  59. Average of Y: 7.50 Average of Y: 7.50 Average of

    Y: 7.50 Average of Y: 7.50
  60. Average of X Average of Y Variance of X Variance

    of Y Correlation of X and Y Linear regression All four data sets have the same
  61. Aggregate alerts more dead servers than alive servers

  62. site’s up if any servers are up!

  63. Breakout alerts first dead server not all the servers

  64. So, in the end

  65. don’t forget the network

  66. user experience is all that matters after deploying

  67. @indirect andre@arko.net Questions?