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

前端 未结 3 482
夕颜
夕颜 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: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.

提交回复
热议问题