DevOps meetup - Web site performance

Latency matters

Chris Bailey of Adwerx

100ms or less is instantaneous.

100ms of latency costs 1% of sales according to Amazon.

Anatomy of a transaction

https://varvy.com/performance

Key metrics

  • Page load time

    47% of people expect a web page to load in 2 seconds or less.

    40% will abandon if takes more than 3 seconds to load.

  • Start render time

    User starts to feel in control when page starts to render.

  • Time to first byte

  • Page size

    Average size of page is 2.2MB, including HTML, stylesheets, images, etc.

    Doubled since 2010. Avg. size in 2005 320kB.

Synthetic vs. Real-User Metrics (RUM)

Synthetic can be measured using real browsers in AWS.

RUM can be very skewed based on user connection types.

Tools

  • www.webpagetest.org

    "Using WebPageTest" book from O'Reilly

  • Google analytics

    Displays real-user metrics

  • New Relic Browser

    • Real-user metrics
    • Splits time into web app, network, browser
    • Can view entire session activity for random users
  • Chrome dev tols

    window.performance in JS console

  • New Relic APM

    Monitor performance of web app server

  • YSlow

    • From Yahoo
  • Google PageSpeed Insights

    • Similar to YSlow

Pareto principle

80% of effect com from 20% of causes

What worked for Adwerx

  • Switch CDN from Amazon CloudFront to Fastly

  • Image optimization

    • image_optim
    • Home page from 3.2MB to 2.6MB

8-9s down to ~6s per load with minimal changes, assistance from Fastly engineer.