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?