开发者

How much performance do you get out a Heroku dynos/workers?

开发者 https://www.devze.com 2023-01-31 07:59 出处:网络
How much traffic can a site with 1 or 2 Dynos handle on www.Heroku.com and would increasing workers improve this? Any help on dynos/workers would be appreciated.开发者_开发技巧 This blog entry may be

How much traffic can a site with 1 or 2 Dynos handle on www.Heroku.com and would increasing workers improve this? Any help on dynos/workers would be appreciated.开发者_开发技巧


This blog entry may be of use. He does a great breakdown of the kind of bottlenecks heroku can run into, and how increasing dynos can help, and provides links and information to the official performance guide on heroku as well as some tools that will help you test your own app.

Worker performance really depends on how your site is built and what you are using them for. Background processing (image formatting, account pruning, etc) called Delayed Jobs is how you put them to work

EDIT // 1 March 2012: Here is another blog entry that explored heroku latency and throughput performance for a variable number Dynos.

EDIT // 28 Feb 2013: There have been some concerns raised in this post regarding Heroku's random routing algorithm and how metrics may be misreported when scaling Dynos, specifically those provided by New Relic. This is still an ongoing issue and is something to note in the context of my previous answer. Heroku's responses are linked within the post.

EDIT // 8 May 2013: A recent post on Shelly Cloud blog analyses impact of number of dynos and web server used on application perfomance. Baseline performance script used there should be useful in performing further tests.


A good way of testing it is using the Apache Bench tool. You may already have it installed on your computer. Check it first (unix / os x):

which ab

AB documentation and installation instructions: http://httpd.apache.org/docs/2.0/programs/ab.html

Once installed, try sending some traffic to your Heroku site.

ab -n 5000 -c 10 http://example.com/

Where N is the total number of requests to make, and C is the number of concurrent requests to allow. Upping C seems to give me the most failed responses.

Remember that an Heroku instance runs behind Varnish, so you may be testing the Varnish cache, not Ruby. Check what 'cache-control' headers your app is sending.


I would also suggest installing the New Relic Add-on. It lets you do basic performance monitoring and helps identify bottlenecks.

0

精彩评论

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