Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I need to run Linux-Apache-PHP-MySQL application (Moodle e-learning platform) for a large number of concurrent users - I am aiming 5000 users. By concurrent I mean that 5000 people should be able to work with the application at the same time. "Work" means not only do database reads but writes as well.

The application is not very typical, since it is doing a lot of inserts/updates on the database, so caching techniques are not helping to much. We are using InnoDB storage engine. In addition application is not written with performance in mind. For instance one Apache thread usually occupies about 30-50 MB of RAM.

I would be greatful for information what hardware is needed to build scalable configuration that is able to handle this kind of load.

We are using right now two HP DLG 380 with two 4 core processors which are able to handle much lower load (typically 300-500 concurrent users). Is it reasonable to invest in this kind of boxes and build cluster using them or is it better to go with some more high-end hardware?

I am particularly curious

  • how many and how powerful servers are needed (number of processors/cores, size of RAM)
  • what network equipment should be used (what kind of switches, network cards)
  • any other hardware, like particular disc storage solutions, etc, that are needed

Another thing is how to put together everything, that is what is the most optimal architecture. Clustering with MySQL is rather hard (people are complaining about MySQL Cluster, even here on Stackoverflow).

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Discs. LOTS of FAST discs behind a proper RAID controller. I personally use a SuperMicro 2 rack unit cage that has splace for 24 2.5" discs, together with WD Velociraptor 10k RPM discs - good enough for me. You can easily stack those boxes to address more discs - the Raid controller I use (Adaptec 5805) can address around 190 discs. When talking high end database, withi nserts and updates, discs WILL be your issue.

Get X of those (x >1) for redundancy and master / slave them database wise (no a mySQL Expert here).

network: Possibly 1gbit internally in the cluster. efore you go 10gbit - look at Infiniband (12gbit). With proper boards that is cheaper than using 10gbit ethernet and has a better latency.

Then use smaller / other boxes for front end. Both supermicro as well as Tyan have multi node cages - you can get a 2 rack unit system which is 4 individual computers, each with 2 processors. Cluster the front end ;) Modern processors thank heaven can address a significant amount of RAM, so 50mb / apache process is not that bad from that side. Get used to machines with 32 or 64 gigabytes of ram ;)

Alterantively, you may want to look nito blades for the front end, but I never could make financial sense out of them (WAY too expensive, PLUS the cage - hello?).

share|improve this answer
    
Thanks for your answer, it gives a good insight –  Piotr K. Mar 16 '10 at 19:33

Forget clustering - it can not work well when everybody needs to write to a database.

Maybe you can partition your data - using several databases. For example users which substring(md5sum(username) for 1)="0" connect to database databasename_0 on server databaseserver_0, substring(md5sum(username) for 1)="2" connect to database databasename_2 on server databaseserver_2.

You can scale this way from 1 server up to 16. For example for 2 servers - DNS names databaseserver_0 to databaseserver_7 would point to server1 and databaseserver_8 to databaseserver_f would point to server2. If one server is more powerful than the other you can make it run more databases.

This way you can scale easily and on cheap.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.