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

Distilling RUM

Distilling RUM

Real User Monitoring (RUM) is a broad topic that means a lot of things to a lot of people. Broadly, what we're talking about is understanding our applications through the eyes of real users, with real browsers. By doing application performance monitoring with real users, we can have a full understanding of the performance, availability and functionality of our applications. We'll take a look at a number of core areas, including the web request lifecycle, synthetic vs. real user testing, and using summary metrics, histograms and logs for fun and profit.

Chris Kelly

October 30, 2012

More Decks by Chris Kelly

Other Decks in Programming


  1. HTTP MONITORING [(04:44 PM) ckelly@gehry] › ping -c5 http://www.etsy.com PING

    http://www.etsy.com ( 56 data bytes 64 bytes from icmp_seq=0 ttl=243 time=82.605 ms 64 bytes from icmp_seq=1 ttl=243 time=81.944 ms 64 bytes from icmp_seq=2 ttl=243 time=82.114 ms 64 bytes from icmp_seq=3 ttl=243 time=81.689 ms 64 bytes from icmp_seq=4 ttl=243 time=82.569 ms --- http://www.etsy.com ping statistics --- 5 packets transmitted, 5 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 81.689/82.184/82.605/0.356 ms
  2. HTTP MONITORING [(04:42 PM) ckelly@gehry] › time curl http://www.etsy.com <!DOCTYPE

    html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/ fbml" > <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=1024" /> ..... </body> </html> curl http://www.etsy.com 0.01s user 0.01s system 4% cpu 0.356 total
  3. EXPIRES HEADERS Web pages are becoming increasingly complex with more

    scripts, style sheets, images and Flash on them. A first-time visit to a page may require several HTTP requests to load all the components. By using Expires headers these components become cacheable, which avoids unnecessary HTTP requests on subsequent page views. Expires headers are most often associated with images, but they can and should be used on all page components including scripts, style sheets and Flash. Apache ExpiresDefault nginx expires
  4. GZIP COMPRESSION 0 2.5 5.0 7.5 10.0 100 200 300

    400 500 600 700 800 900 1000 Total Compressed Total Uncompressed seconds kilobytes
  5. SELENIUM // Open the browser and return a WebDriver instance

    var webDriver = test.openBrowser(); var c = webDriver.getHttpClient(); // Begin recording timing data for a single action test.beginTransaction(); webDriver.get("https://your-app-on-appfog.com"); webDriver.findElement(By.partialLinkText("Sign up")).click(); var form = webDriver.findElement(By.id("new_user")); form.findElement(By.id("name")).sendKeys("tester"+random); form.findElement(By.id("email")).sendKeys("email"+random+"@test.com"); form.findElement(By.id("password")).sendKeys("password"); form.findElement(By.id("password_confirmation")).sendKeys("password"); webDriver.findElement(By.name("commit")).click(); test.waitForNetworkTrafficToStop(2000, 15000); test.endTransaction();