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

前端 未结 3 441
夕颜
夕颜 2020-12-23 09:38

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.

相关标签:
3条回答
  • 2020-12-23 10:19

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

    0 讨论(0)
  • 2020-12-23 10:21

    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.

    0 讨论(0)
  • 2020-12-23 10:28

    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.

    0 讨论(0)
提交回复
热议问题