SlideShare a Scribd company logo
Performance Tips For 
Apps
About Me 
clairettran
Performance Is Important 
Oops! 
● Myer Boxing Day 2013 
● Click Frenzy 2012
Some Common Problems 
Note: not an exhaustive list
What I’ll Cover 
● Monitoring 
● Asynchronous Tasks 
● Caching 
● Scaling 
● Database +
Monitoring 
How to know there is a performance problem? 
+ Response time, rpm, memory usage, CPU usage, error 
rates
Monitoring 
What else can I do? 
● Logs 
● Memory Usage 
● Performance tests 
● Health Checks 
● More call centre phone calls
Asynchronous Tasks
Caching 
How? 
● Cache store 
● Fragment caching 
● SQL caching 
Removed in Rails4: Action Caching & Fragment Caching
Caching 
Problem: Page making long running/many external 
requests 
Before: No Caching 
After: With Caching!
Scaling
Scaling
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 
● Akamai, Cloudfront (edge 
caching) 
● YSlow 
● Local Storage 
● Smaller Responses 
● Async JS 
● Chrome DevTools 
● Ruby Flavours e.g. JRuby
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

More Related Content

Viewers also liked

Mc sheriff
Mc sheriffMc sheriff
Mc sheriff
albandma
 
Ruby confhighlights
Ruby confhighlightsRuby confhighlights
Ruby confhighlights
Claire Tran
 
S ta r chart presentation
S ta r chart presentationS ta r chart presentation
S ta r chart presentation
cmunoz111777
 
Tech Plan 4 Small NPOs - Hammerstrom
Tech Plan 4 Small NPOs - HammerstromTech Plan 4 Small NPOs - Hammerstrom
Tech Plan 4 Small NPOs - Hammerstrom
johanciti
 
WomenWhoCodeSydney_PerformanceTipsRoR
WomenWhoCodeSydney_PerformanceTipsRoRWomenWhoCodeSydney_PerformanceTipsRoR
WomenWhoCodeSydney_PerformanceTipsRoR
Claire Tran
 
E rate slides
E rate slidesE rate slides
E rate slides
awillia8
 
Converge Short ECMP Sept 2015
Converge Short ECMP Sept 2015Converge Short ECMP Sept 2015
Converge Short ECMP Sept 2015
Jo_Vann
 

Viewers also liked (7)

Mc sheriff
Mc sheriffMc sheriff
Mc sheriff
 
Ruby confhighlights
Ruby confhighlightsRuby confhighlights
Ruby confhighlights
 
S ta r chart presentation
S ta r chart presentationS ta r chart presentation
S ta r chart presentation
 
Tech Plan 4 Small NPOs - Hammerstrom
Tech Plan 4 Small NPOs - HammerstromTech Plan 4 Small NPOs - Hammerstrom
Tech Plan 4 Small NPOs - Hammerstrom
 
WomenWhoCodeSydney_PerformanceTipsRoR
WomenWhoCodeSydney_PerformanceTipsRoRWomenWhoCodeSydney_PerformanceTipsRoR
WomenWhoCodeSydney_PerformanceTipsRoR
 
E rate slides
E rate slidesE rate slides
E rate slides
 
Converge Short ECMP Sept 2015
Converge Short ECMP Sept 2015Converge Short ECMP Sept 2015
Converge Short ECMP Sept 2015
 

Similar to Ruby On Rails Sydney Meetup - Performance Tips For Apps

DrupalCon 2014: A Perfect Launch, Every Time
DrupalCon 2014: A Perfect Launch, Every TimeDrupalCon 2014: A Perfect Launch, Every Time
DrupalCon 2014: A Perfect Launch, Every Time
Pantheon
 
Pantheon Launch Check Introduction Webinar
Pantheon Launch Check Introduction WebinarPantheon Launch Check Introduction Webinar
Pantheon Launch Check Introduction Webinar
Jon Peck
 
SANDcamp 2014 - A Perfect Launch, Every Time
SANDcamp 2014 - A Perfect Launch, Every TimeSANDcamp 2014 - A Perfect Launch, Every Time
SANDcamp 2014 - A Perfect Launch, Every Time
Jon Peck
 
Unified Operations Vision
Unified Operations VisionUnified Operations Vision
Unified Operations Vision
Steve Mushero
 
Digibury: SciVisum - Making your website fast - and scalable
Digibury: SciVisum - Making your website fast - and scalableDigibury: SciVisum - Making your website fast - and scalable
Digibury: SciVisum - Making your website fast - and scalable
Lizzie Hodgson
 
MongoDB : The Definitive Guide
MongoDB : The Definitive GuideMongoDB : The Definitive Guide
MongoDB : The Definitive Guide
Wildan Maulana
 
Metrics
MetricsMetrics
Metrics
Zach Cox
 
OSMC 2019 | How to improve database Observability by Charles Judith
OSMC 2019 | How to improve database Observability by Charles JudithOSMC 2019 | How to improve database Observability by Charles Judith
OSMC 2019 | How to improve database Observability by Charles Judith
NETWAYS
 
Analyzing Java Applications Using Thermostat (Omair Majid)
Analyzing Java Applications Using Thermostat (Omair Majid)Analyzing Java Applications Using Thermostat (Omair Majid)
Analyzing Java Applications Using Thermostat (Omair Majid)
Red Hat Developers
 
PyGrunn2013 High Performance Web Applications with TurboGears
PyGrunn2013  High Performance Web Applications with TurboGearsPyGrunn2013  High Performance Web Applications with TurboGears
PyGrunn2013 High Performance Web Applications with TurboGears
Alessandro Molina
 
Utopia Kingdoms scaling case. From 4 users to 50.000+
Utopia Kingdoms scaling case. From 4 users to 50.000+Utopia Kingdoms scaling case. From 4 users to 50.000+
Utopia Kingdoms scaling case. From 4 users to 50.000+
Python Ireland
 
Utopia Kindgoms scaling case: From 4 to 50K users
Utopia Kindgoms scaling case: From 4 to 50K usersUtopia Kindgoms scaling case: From 4 to 50K users
Utopia Kindgoms scaling case: From 4 to 50K users
Jaime Buelta
 
How to speed up Your Magento Site
How to speed up Your Magento SiteHow to speed up Your Magento Site
How to speed up Your Magento Site
NetstarterSL
 
Scaling Magento
Scaling MagentoScaling Magento
Scaling Magento
Copious
 
Best practices in Moodle administration Monatana Moot 2014
Best practices in Moodle administration Monatana Moot 2014Best practices in Moodle administration Monatana Moot 2014
Best practices in Moodle administration Monatana Moot 2014
moorejon
 
Training Webinar: Detect Performance Bottlenecks of Applications
Training Webinar: Detect Performance Bottlenecks of ApplicationsTraining Webinar: Detect Performance Bottlenecks of Applications
Training Webinar: Detect Performance Bottlenecks of Applications
OutSystems
 
Sql server tips from the field
Sql server tips from the fieldSql server tips from the field
Sql server tips from the field
JoAnna Cheshire
 
Web performance mercadolibre - ECI 2013
Web performance   mercadolibre - ECI 2013Web performance   mercadolibre - ECI 2013
Web performance mercadolibre - ECI 2013
Santiago Aimetta
 
The Peoper Care and Feeding of a MySQL Server for Busy Linux Admin
The Peoper Care and Feeding of a MySQL Server for Busy Linux AdminThe Peoper Care and Feeding of a MySQL Server for Busy Linux Admin
The Peoper Care and Feeding of a MySQL Server for Busy Linux Admin
Dave Stokes
 
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
Dave Stokes
 

Similar to Ruby On Rails Sydney Meetup - Performance Tips For Apps (20)

DrupalCon 2014: A Perfect Launch, Every Time
DrupalCon 2014: A Perfect Launch, Every TimeDrupalCon 2014: A Perfect Launch, Every Time
DrupalCon 2014: A Perfect Launch, Every Time
 
Pantheon Launch Check Introduction Webinar
Pantheon Launch Check Introduction WebinarPantheon Launch Check Introduction Webinar
Pantheon Launch Check Introduction Webinar
 
SANDcamp 2014 - A Perfect Launch, Every Time
SANDcamp 2014 - A Perfect Launch, Every TimeSANDcamp 2014 - A Perfect Launch, Every Time
SANDcamp 2014 - A Perfect Launch, Every Time
 
Unified Operations Vision
Unified Operations VisionUnified Operations Vision
Unified Operations Vision
 
Digibury: SciVisum - Making your website fast - and scalable
Digibury: SciVisum - Making your website fast - and scalableDigibury: SciVisum - Making your website fast - and scalable
Digibury: SciVisum - Making your website fast - and scalable
 
MongoDB : The Definitive Guide
MongoDB : The Definitive GuideMongoDB : The Definitive Guide
MongoDB : The Definitive Guide
 
Metrics
MetricsMetrics
Metrics
 
OSMC 2019 | How to improve database Observability by Charles Judith
OSMC 2019 | How to improve database Observability by Charles JudithOSMC 2019 | How to improve database Observability by Charles Judith
OSMC 2019 | How to improve database Observability by Charles Judith
 
Analyzing Java Applications Using Thermostat (Omair Majid)
Analyzing Java Applications Using Thermostat (Omair Majid)Analyzing Java Applications Using Thermostat (Omair Majid)
Analyzing Java Applications Using Thermostat (Omair Majid)
 
PyGrunn2013 High Performance Web Applications with TurboGears
PyGrunn2013  High Performance Web Applications with TurboGearsPyGrunn2013  High Performance Web Applications with TurboGears
PyGrunn2013 High Performance Web Applications with TurboGears
 
Utopia Kingdoms scaling case. From 4 users to 50.000+
Utopia Kingdoms scaling case. From 4 users to 50.000+Utopia Kingdoms scaling case. From 4 users to 50.000+
Utopia Kingdoms scaling case. From 4 users to 50.000+
 
Utopia Kindgoms scaling case: From 4 to 50K users
Utopia Kindgoms scaling case: From 4 to 50K usersUtopia Kindgoms scaling case: From 4 to 50K users
Utopia Kindgoms scaling case: From 4 to 50K users
 
How to speed up Your Magento Site
How to speed up Your Magento SiteHow to speed up Your Magento Site
How to speed up Your Magento Site
 
Scaling Magento
Scaling MagentoScaling Magento
Scaling Magento
 
Best practices in Moodle administration Monatana Moot 2014
Best practices in Moodle administration Monatana Moot 2014Best practices in Moodle administration Monatana Moot 2014
Best practices in Moodle administration Monatana Moot 2014
 
Training Webinar: Detect Performance Bottlenecks of Applications
Training Webinar: Detect Performance Bottlenecks of ApplicationsTraining Webinar: Detect Performance Bottlenecks of Applications
Training Webinar: Detect Performance Bottlenecks of Applications
 
Sql server tips from the field
Sql server tips from the fieldSql server tips from the field
Sql server tips from the field
 
Web performance mercadolibre - ECI 2013
Web performance   mercadolibre - ECI 2013Web performance   mercadolibre - ECI 2013
Web performance mercadolibre - ECI 2013
 
The Peoper Care and Feeding of a MySQL Server for Busy Linux Admin
The Peoper Care and Feeding of a MySQL Server for Busy Linux AdminThe Peoper Care and Feeding of a MySQL Server for Busy Linux Admin
The Peoper Care and Feeding of a MySQL Server for Busy Linux Admin
 
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
 

Recently uploaded

Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
maazsz111
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
marufrahmanstratejm
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 

Recently uploaded (20)

Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 

Ruby On Rails Sydney Meetup - Performance Tips For Apps

  • 3. Performance Is Important Oops! ● Myer Boxing Day 2013 ● Click Frenzy 2012
  • 4. Some Common Problems Note: not an exhaustive list
  • 5. What I’ll Cover ● Monitoring ● Asynchronous Tasks ● Caching ● Scaling ● Database +
  • 6. Monitoring How to know there is a performance problem? + Response time, rpm, memory usage, CPU usage, error rates
  • 7. Monitoring What else can I do? ● Logs ● Memory Usage ● Performance tests ● Health Checks ● More call centre phone calls
  • 9. Caching How? ● Cache store ● Fragment caching ● SQL caching Removed in Rails4: Action Caching & Fragment Caching
  • 10. Caching Problem: Page making long running/many external requests Before: No Caching After: With Caching!
  • 13. Database ● Add an index ● Profiling ● Batch queries ● Eager fetching ● Denormalisation ● Sharding
  • 14. 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 ● Akamai, Cloudfront (edge caching) ● YSlow ● Local Storage ● Smaller Responses ● Async JS ● Chrome DevTools ● Ruby Flavours e.g. JRuby
  • 15. 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
  • 16.