views:

185

answers:

3

I am setting up a web server for a client. They will be using a web app (PHP/LAMP) that I am building. The server will be sitting within their network locally. There will also be a MySQL database on the same server. The load on the server will only be 20-25 concurrent users, but uptime and performance is still very important.

The application itself will be using a back-end CMS (TBD) to display content to the user using JQuery on the front-end and PHP on the back-end.

So, my question is: Is there a good set of server system requirements in terms of CPU, Cache and memory (size/type) to provide a relatively cheap solution, but still provide quality performance.

+1  A: 

Just make sure you have 2 of everything ... 2 Power supplies 2 hard drives (raid 1) or better more with raid 5. Depending on how important uptime is you may even want to have an entire fail over server. As for performance you haven't given us enough info ... how heavy are the queries how much data is in the database.

trent
+3  A: 

To tell you the truth, hardware isn't the biggest factor, it's coding. If you develop your application correctly and optimally, then you should be able to run at least 100 users concurrently on a machine running with 1ghz, 512mb ram, and a 5200rpm hard drive.

I recommend using VMWare to create virtual machines and separate the MySQL server from the web server. This also gives you the ability to replicate, migrate, or upgrade the machine without reconfiguring and reinstalling.

Also, run your LAMP configuration on an operating system without a GUI (Debian, Ubuntu, Fedora, etc. with no X-Window installed). These are servers, they shouldn't be wasting resources displaying pretty windows.

Finally, like Trent said, RAID configuration is a great idea, but RAID is not a backup solution. If you have two of the same hard-drives, it is very likely that if one fails, the other will shortly after. Always have a backup solution (NAS, Tape, DVD, Floppy Disk, whatever).

St. John Johnson
+1  A: 

Without knowing details about the application that will be running on the server, any specific recommendations (i.e. X GB of RAM, Y processor with Z cache) will be meaningless. That said, I would strongly recommend to not skimp on the RAM, especially for a database-driven application - the more data that you can keep in RAM without hitting the hard drive, the better your performance will be. As the developer, though, never forget that copious hardware resources are no substitute for proper indexes and code optimization!

I also want to echo some of the other recommendations here - RAID your drives (I've preferred RAID 10 in the past for database servers), get some sort of offline backup (tape, DVD-R, USB drives, etc.) and make sure that you're keeping backups offsite (in case of floods, fires, or other physical disaster). And don't forget to regularly test restoring from your backups - there's no worse feeling than discovering that your backups don't work when it's too late.

Daft Viking
Thx...I added this paragraph:The application itself will be using a back-end CMS (TBD) to display content to the user using JQuery on the front-end and PHP on the back-end.
Bamerza