Rich
12-10-2007, 11:53 PM
Hi Everyone,
I am going to describe two scenarios, I need to know which one is better and why, preferrably with a really good explanation.
Let's argue that we're running 600 php/MySQL CMS websites that are entirely database driven. We'll say phpNuke for the sake of this scenario. Most of them are essentially the same anyway.
Now for the scenarios.
Scenario A
You have 600 accounts setup in WHM, each is hosting it's own seperate Nuke installation with a seperate database and seperate set of PHP files.
Scenario B
You have 600 accounts setup in WHM, each has simply index.php and no other php files. Each site has it's own seperate database, but only only index.php which contains the mysql connection info for the sites database, as well as code that connections to the servers RAM disk where the phpNuke files are stored. In this scenario, you are essentially running all 600 sites off one set of phpNuke files from the RAM disk, thereby eliminating redundency in duplicate files.
My thinking: Over the course of maybe 1000, 5000, or 10,000 sites the upwards scalability of the method in Scenario B, hypothetically, seems to really increase because you save on storage space but more importantly seek time and processing power. Because there is little to no seeking, there are less resources used for the CPU/MEM and you should be able to host a lot more sites on the same server.
Which scenario actually is better? In addition to answering my question, can you think of a better solution for efficiently hosting 600 seperate sites off the same files with the same database? Also note that we mention the use of RAM Disk in an effort to both a) reduce seek time and b) make the files accessible to all domains, whereas openbasedir and phpsuexec would have previously made it impossible through standards fread() functionality.
I really appreciate any input you guys can provide. Thanks in advance.
I am going to describe two scenarios, I need to know which one is better and why, preferrably with a really good explanation.
Let's argue that we're running 600 php/MySQL CMS websites that are entirely database driven. We'll say phpNuke for the sake of this scenario. Most of them are essentially the same anyway.
Now for the scenarios.
Scenario A
You have 600 accounts setup in WHM, each is hosting it's own seperate Nuke installation with a seperate database and seperate set of PHP files.
Scenario B
You have 600 accounts setup in WHM, each has simply index.php and no other php files. Each site has it's own seperate database, but only only index.php which contains the mysql connection info for the sites database, as well as code that connections to the servers RAM disk where the phpNuke files are stored. In this scenario, you are essentially running all 600 sites off one set of phpNuke files from the RAM disk, thereby eliminating redundency in duplicate files.
My thinking: Over the course of maybe 1000, 5000, or 10,000 sites the upwards scalability of the method in Scenario B, hypothetically, seems to really increase because you save on storage space but more importantly seek time and processing power. Because there is little to no seeking, there are less resources used for the CPU/MEM and you should be able to host a lot more sites on the same server.
Which scenario actually is better? In addition to answering my question, can you think of a better solution for efficiently hosting 600 seperate sites off the same files with the same database? Also note that we mention the use of RAM Disk in an effort to both a) reduce seek time and b) make the files accessible to all domains, whereas openbasedir and phpsuexec would have previously made it impossible through standards fread() functionality.
I really appreciate any input you guys can provide. Thanks in advance.
