Wwc london-perf-apps

Post on 05-Aug-2015

76 views 2 download

Tags:

Transcript of Wwc london-perf-apps

Performance Tips For Apps

About Me

clairettran

Performance Is Important

Some Common Problems

Note: not an exhaustive list

What I’ll Cover

● Monitoring● Caching● Scaling● Database

+

MonitoringHow to know there is a performance problem?

Caching

How?● Cache store ● Fragment caching● SQL caching

Caching

Before: No Caching

After: With Caching!

Problem: Page making many external requests

Scaling

Load Balancer

Cache Cluster

Edge Cache / CDN

Database

● Add an index● Profiling● Batch queries● Eager fetching● Denormalisation● Sharding

Other Techniques● Queuing/Background Jobs● Caching tech (e.g.

Elasticache)● Dedicated services● Rails engines● C-extensions (gems)● Sprites● Asset pipeline● Cache control headers● Gzip assets*● Less HTTP requests● Dedicated Search Service

● Remove unused assets● Static cluster● AWS Auto-scaling● Edge Caching (Akamai, Cloudfront)● YSlow● Local Storage● Smaller Responses● Async JS● Chrome DevTools● Ruby Flavours e.g. JRuby● Asynchronous tasks

Further Reading

https://github.com/ianheggie/health_check

http://guides.rubyonrails.org/caching_with_rails.html

http://railscasts.com/episodes/380-memcached-dalli

https://developers.google.com/events/io/sessions/324511365

http://railscasts.com/episodes/366-sidekiq

http://www.slideshare.net/derekmbrown/netflix-strategic-performance-analysis

http://blog.jphpsf.com/2012/04/28/front-end-performance-case-study-github

Questions