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

Surprise! Your app is slow because the speed of light is slow.

Surprise! Your app is slow because the speed of light is slow.

Ignite talk at Mobile Delivery Days 2016.

Clay Smith

March 21, 2016
Tweet

More Decks by Clay Smith

Other Decks in Programming

Transcript

  1. Surprise! Your app is slow
    because the speed of light.
    Clay Smith, New Relic
    @smithclay
    Mobile Delivery Days 2016
    CC0 wikimedia.org

    View Slide

  2. When you release an
    app...
    CC0 pixabay.com

    View Slide

  3. When you get a review
    like this...
    "App slow in the UK. 1 star."
    -BenedictC
    CC0 pixabay.com

    View Slide

  4. Who owns mobile app
    network issues?
    CC0 pixabay.com
    Backend/Ops
    Device/
    Mobile Devs
    "Stuff in the middle we don't control"

    View Slide

  5. Mobile data growth
    (simplified)
    Amount of data
    Now In a couple years

    View Slide

  6. Global Network
    Latency in Fiber
    CC0 pixabay.com
    Source Destination
    Great Circle
    Distance
    RT Time in
    Fiber
    SFO London 5,375 mi 84 ms
    SFO Cape Town 10,124 mi 158 ms
    1 ms at speed of light = Length of Massachusetts

    View Slide

  7. After one second, your
    flow of thought is interrupted.
    CC0 pixabay.com
    Milliseconds
    1
    10
    100
    1000
    10000
    Not Magic Interrupted Too Late
    https://www.nngroup.com/articles/response-times-3-important-limits/

    View Slide

  8. App services: more cloud,
    more complexity
    CC0 openclipart.org
    REST API
    Auth - IdP #1
    Analytics
    Ad Network
    Auth - IdP #2

    View Slide

  9. Move it closer?
    CC0 pixabay.com
    Datacenter/AZ
    CDN

    View Slide

  10. CDNs on the Edge
    CC0 pixabay.com
    Cache static and dynamic
    content + "uncached origin fetch"

    View Slide

  11. #mobileperf Idea
    CC0 pixabay.com
    When in doubt, reduce the
    number of TCP connections.

    View Slide

  12. TCP: Use it again
    CC0 pixabay.com
    Use HTTP keep-alive to reuse
    TCP connections.

    View Slide

  13. TCP: Create connections
    faster
    CC0 pixabay.com
    TCP Fast Open can speed up
    opening multiple connections.

    View Slide

  14. https://blog.newrelic.com/2016/02/09/http2-best-practices-web-performance/

    View Slide

  15. Weighing HTTP/2
    CC0 pixabay.com
    multiplexing,
    compression
    Hard to
    debug,
    backend
    support?

    View Slide

  16. What dial do we turn (if any)?
    CC0 pixabay.com

    View Slide

  17. Premature optimization
    is the source of all evil.
    -Donald Knuth in 1974
    CC0 pixabay.com
    Don't touch that dial.
    (yet)

    View Slide

  18. CC0 pixabay.com
    Measure often to
    understand what matters.

    View Slide

  19. CC0 pixabay.com
    Measure network
    latency and connect it
    to U/X

    View Slide

  20. Building connected mobile
    apps is hard. Monitoring
    shouldn't be.
    Thanks!
    Clay Smith, New Relic
    @smithclay
    Mobile Delivery Days 2016
    CC0 wikimedia.org

    View Slide