Hi, We have faced this kind of problem for our main web site. When a single server was not enough any more (2 years ago), we have separated the database from Apache server. Last year, we added 3 more Apache servers with load-balancing and upgraded the database server with a faster machine (2x1GHz Pentium III, 2Gb RAM, HW RAID1). With this configuration, we serve around 80 million pages/month (all pages are dynamic and make requests to the database) and MySQL is serving an average of 400 queries/s and up to 800 on peak hours. As we plan to add at least 3 more Apache frontends this year, we have started using database replication: each Apache frontend is also a mysql slave server and some "almost static" tables are replicated and SELECTs on these tables are run on the slaves.
Of these 3 solutions (DB on dedicated server, Apache load-balancing, MySQL replication), setting up a dedicated DB server was the easiest to setup: you move the database to a new machine, change DB hostname in your applications and that's all! Replication is the hardest: we had to find out which tables where suitable for replication (some of our tables have more insert/update than select and we need to be sure that selects return latest data; we don't replicate them). Since you don't have too much time, I would suggest that you move your database to a dedicated server. Also, you don't say what language you use for your CGI; we use Perl and we got a big performance improvement (3 to 10x execution speed!) when we migrated from pure CGI to Apache mod_perl. Hope this helps -- Joseph Bueno NetClub/Trader.com Jason Yates wrote: >Currently our MySQL server runs around 20-30 queries per second. The >upper management decided they wanted to add about 4 times the customers >in the next two or three weeks. I'm worried that MySQL on this >particular box won't be able to handle the load of around 100-120 >queries per second. Not to mention the CGI scripts are also getting run >on the same box with apache. > >The system has 1gb of RAM, 1 Pentium III 700Mhz, and some ultrascsi HDs >(no raid), running Red Hat 7.1 and Linux 2.4.6. > >What are my options here? > >Replication? I not sure about that since the box is about 60-70% select >and the rest inserts and deletes. Won't I lose "real-time" data. > >I not familiar with any type of load balancing with MySQL? SQL Relay? > >I also thought of separating the Apache server and MySQL server. > >I'll take any ideas. I need them pretty bad. > >-Jason > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php