Search
Categories
- Categories
- Cogniance biz news (3)
- Cogniance life (2)
- HR and recruitment (1)
- Marketing & Optimization (6)
- Mobile technologies (4)
- Quality Assurance and testing (5)
- Uncategorized (11)
- Web 2.0 business (4)
- Web 2.0 technologies (11)
Archives
Meta
Posts Tagged ‘ruby’
Scaling Ruby applications
Wednesday, August 12th, 2009The question “how you gonna build scalable Ruby application” is quite usual for our potential clients. While it is (naturally) impossible to answer this question within several minutes, there are some aspects to the answer, which we see important to mention. Here are these aspects:
1. First of all, we’ve recently moved from the schema with Apache as a load-balancer with Mongrel servers farm behind to the schema with Zeus (http://www.zeus.com/products/zxtmlb/index.html) as load balancer and farm of Apache with Phusion Passenger module which ‘plays’ Ruby scripts (http://www.modrails.com/). We find this approach to be more effective than Apache+Mongrels, including more effective handling of caching strategies.
2. Talking specifically about database level caching, we use either cashing on Active Record level or external cashing libraries. Our favorite is Memcache (www.danga.com/memcached/).
3. Talking again about DB optimization, we put much attention to effective DB indexing and optimization of SQL queries, including (in some rare cases) usage of stored procs.
4. In some specific cases, which include very heavy usage (10-12 000 web quieries per minute) we use nginx (http://sysoev.ru/nginx/) web server which works (as we’ve found out) more effectively with static, cashable data then Apache. It is also worth mentioning though that both Apache and nginx are able to work with memcached via pluggable modules.
As mentioned, these are just some aspects, but general rule is that you choose specific cashing approach for eash app you build – depending on functionality of this app, its architecture and of course level of load it experiences.
Cogniance