Can you help me with my capacity planning?
I am planning to hosing an rails application + Mysql in dedicated server
maximum 200 replicated rails application with 200 unique databases
simply for understanding
www.client1.product.com use client1 rails application connected with database name client1 www.client2.product.com use client2 rails application connected with database name client2
Each database has 90 tables, so client1 will use one Database with 90 tables
we can calculate for 200 rails app means 200 databases so (200 * 90 tables = 18000 tables)
What my question is whether the following server hardware configuration can able to handle 200 unique rails app phusion passenger instance with 200 unique databases
Total Server Load Assumptions:
Average concurrent http connections to my server is 300
At peak Day time http connections may vary from 500 to 2000
Each client will have maximum db size of 1 GB (if my application runs beyond 4 years) , so 200 clients * 1 GB DB = 200 GB (ie each DB of 1 GB size)
OS - Centos or Ubuntu
Dedicated server configuration:
CPU AMD Opteron™ 3280 Quantity Octo-Core Clock Rate 8x 2.4 GHz (so total 19.2 GHz) Processor passmark score is 5722 [http://www.cpubenchmark.net/cpu.php?cpu=AMD+Opteron+3280] Main Memory Capacity 32 GB RAM Type DIMM (DDR3) Hard Disks Quantity 2 Capacity 2,000 GB (ie) 2 TB + 2 TB Type SATA II, 7,200 rpm, 8 MB RAID RAID 1 by software Mainboard Chipset AMD 880G Network Broadcom BCM57780
For simple understanding , Rails application source code is same but with different databases. Each client should have seperate DB and separate rails instance. I am replicating - duplicating code for each client with separate folders and giving different database names and so each serving as an different instance.
I am having one primary temp domain
For each client i need to have separate sub domain mapped to same server with same port(80) but with different rails instance name
www.client1.product.com www.client2.product.com www.clientn.product.com
With Phusion Passenger + Nginx, the easiest way to achieve VHOST.
my project in different folders :
/var/www/rails/client1/ /var/www/rails/client2/ /var/www/rails/client3/ /var/www/rails/client4/ Then make a VHOST file for each of your client in /etc/apache2/sites-available/client1.product.com
ServerName client1.product.com DocumentRoot /var/www/rails/client1/current/public
<Directory /var/www/rails/client1/current/public> Allow from all Options -MultiViews </Directory>
Any reviews and comments about server configuration and application architecture are always welcome and i am glad to take it.