How to determine how much load a Rails application is under automagically?
We have a series of applications that we host on services such as Heroku which are able to scale up and down on demand.
What we would like to acheive is a management tool that determines how much load a specific application is under开发者_如何学Go so it can auto scale the app on a needs basis.
What are the best ways of figuring out application load in a way that we can then easily act on this data?
With a "normal" system, you could use SysUtils to get the system load and do whatever you want to do with it.
But on Heroku you're not on a "normal" system. So you can't rely directly on the system overload. And their API doesn't offer any tool to detect that.
One solution I see would be to use the New Relic API to detect when your application is particularly slow and act in consequence.
精彩评论