Rails Performance Tuning for Production?

后端 未结 4 1946
醉酒成梦
醉酒成梦 2021-01-30 03:45

I\'m getting close to deploying an application built on Rails 3.1.x and started running some performance tests. After fiddling with ab for a bit, I\'m seeing some

4条回答
  •  野的像风
    2021-01-30 03:59

    The most comprehensive single answer is to use something like NewRelic to instrument your application and find the slow spots. Then, you can apply optimizations or caching to your code to smooth out those slow spots. As a Heroku customer, you get a NewRelic install for free - it's an add-in you can add to your deployment from the Heroku console.

    Once you have an understanding of what's slowing you down, then you can start to approach it. Heroku handles most all of the dev-ops end of performance tuning, so you don't need to do anything there. However, you'll still be able to make large gains by optimizing database queries and performing fragment- and action-level caching where appropriate.

提交回复
热议问题