500 requests/s with Ruby on Rails 4 on a 5$ / month server
blog.wiemann.name
blog.wiemann.name
Also there's no mention of what your test actually is?
Complete requests: 40
Failed requests: 13
is far from good
Anyone have any experience profiling these sorts of things that can share some info?
Then figure out how many other connections you'll need outside your server (rails console, cron jobs, commandline) subtract that and you have your number.
I like to have about 10 spare connections.
Running
select name, setting from pg_settings where name = 'max_connections';
in postgres. I see I have 100 max connections.
So that minus 10 gives me a pool size of 90.
BTW, similar result like this can be also achieved with any RoR and jruby 1.7 (for me jruby 1.7 uses much less mem then 1.6). Threads in jruby are quite cheap. And as always database is the bottleneck but jruby is cool because you can embed BerkeleyDB in it (so open temp Berkely DB and cache things like crazy).