4 ms·
We did similar things on our server (though with much much less traffic but all dynamic content + API). We moved from passenger to nginx+unicorn and the perfor
by flexd 16y ago
We did similar things on our server (though with much much less traffic but all dynamic content + API).
We moved from passenger to nginx+unicorn and the performance increase was awesome + it uses less ram (which again means more ram for more app servers!). Our box was a old quad core with 4gb ram so it got a bit tight with everything on one machine. The DB blocking problem could easily be solved with a cheap VPS as a slave DB, then you can do backups off that. :-) Depending on your kind of website, caching with varnish is great, we also made great use of memcached for fragments and other little things. And since our main cpu consuming background task just did one thing in the end it was rewritten in C which also helped a lot. Offloading all files to Amazon S3 is also a very good way of reducing load if you have a lot of them.
- FooBarWidget 16y agoWere you on passenger for apache or passenger for nginx, and were you on passenger 3? Those make quite a difference. Memory usage and performance have been greatly improved in 3, with important parts optimized in C. The dynamic multiprocessing can save you more memory during idle time.
- flexd 16y agoWe were using passenger with apache if i remember correctly. It's a few years ago and i was more on the developer side rather than sysadmin side of things back then. Its probably worth taking another look? For my ruby applications at the moment i use nginx+unicorn, which works really great.