开发者

How to determine how much load a Rails application is under automagically?

开发者 https://www.devze.com 2022-12-08 19:27 出处:网络
We have a series of applications that we host on services such as Heroku which are able to scale up and down on demand.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消