dongshan9619 2013-05-02 10:03
浏览 50

too long

I've been running some Facebook apps in Heroku-hosted environment with a fair bit of traffic .

These are simple apps using 2 php files (a one-page app plus an AJAX entry-point for data), which are very simple and place no real demands on server memory, the most resources are taken up serving images and the heaviest thing they'll do in terms of CPU load is a curl request to a web API, or a call to a database to get some data.

Due to the traffic and demands on server concurrency (10-20 dynos on average) I've been doing research into how to configure an app for maximum performance, and found that the biggest bottleneck comes from a limitation imposed by Heroku's default boot.sh apache deploy script which sets MaxClients=1 on my application by default.

This has the effect of limiting Apache to 1 thread for handling HTTP requests.

In come the new and improved 2x dynos which cost twice as much and promise twice as much RAM and CPU performance.

Now I can understand that RAM won't make much of a difference when the main bottleneck is handling of HTTP requests, but I would assume the new dynos will set MaxClients=2 (havent been able to check yet) and so I'm wondering whether I'd be better off running my app with half as many 2x dynos than the amount of 1x dynos I normally use. Anyone know the answer?

  • 写回答

1条回答 默认 最新

  • douzhuang2570 2013-05-02 14:28
    关注

    Upping to a 2x dyno won't change your MaxClients. You need to change your application configuration to support more than one concurrent request.

    评论

报告相同问题?

悬赏问题

  • ¥50 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?