I've deployed a "Hello World" sinatra app via trinidad, behind an apache load balancer on an AWS micro instance. When i use apache benchmark, the app will max out the CPU:
ab -kc 20 -n 500 http://mysite.com/
Requests take an average of 0.5 seconds to serve, which seems really slow for a hello world app (the same app with nginx/unicorn on MRI is much faster on the same machine).
I also tried load testing it with "siege". The response times were identical, but the CPU was stayed under 20%, presumably because the requests are not concurrent.
I suspect I need to change some simple config option. Thanks for any advice.
Sinatra App
require "sinatra/base" class MyApp < Sinatra::Base get '/' do "Hello World" end end
Apache httpd.conf
<Proxy balancer://trini> BalancerMember ajp://127.0.0.1:8099 </Proxy> ProxyPass / balancer://trini/
trinidad.yml
ajp: port: 8099 allowTrace: true web_apps: default: context_path: / web_app_dir: .
start trinidad command
--jruby -S trinidad --config trinidad.yml
Has recibido este mensaje porque estás suscrito al grupo "Rails Trinidad" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a rails-trinida...@googlegroups.com.
Para publicar una entrada en este grupo, envía un correo electrónico a rails-t...@googlegroups.com.
Visita este grupo en http://groups.google.com/group/rails-trinidad?hl=es.
Para obtener más opciones, visita https://groups.google.com/groups/opt_out.