I use these two configuration for my little Rails app. 5 mongrel instances, balanced and externally served with Perlbal. It can still be refined to let Perlbal serves the public/ folder. But this is good enough for me at this point: mongrel_cluster.yml:

log_file: log/mongrel.log port: 4000 pid_file: tmp/pids/mongrel.pid servers: 5 load-balancer.conf for Perlbal CREATE POOL my_servers POOL my_servers ADD 127.0.0.1:4000 POOL my_servers ADD 127.0.0.1:4001 POOL my_servers ADD 127.0.0.1:4002 POOL my_servers ADD 127.0.0.1:4003 POOL my_servers ADD 127.0.0.1:4004 CREATE SERVICE balancer SET listen = 0.0.0.0:3000 SET role = reverse_proxy SET pool = my_servers SET persist_client = off SET persist_backend = off SET verify_backend = off ENABLE balancer

Labels: mongrel, perl, perlbal, rails, ruby



blog comments powered by Disqus