This is a discussion on asking opinion on hosting database and web on one server within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hello all, Should MySQL and Apache be hosted on separate servers or it's ok they being on one server? ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello all,
Should MySQL and Apache be hosted on separate servers or it's ok they being on one server? We're building a compound that includes about 10 websites, all their contents are hosted in MySQL. There will be frequent database updates and the webserver will have to handle heavy traffic. Thanks in advance for sharing your opinion and experience or pointers! Bing |
|
|||
|
dubing@gmail.com wrote in news:1131747381.396063.6170
@g43g2000cwa.googlegroups.com: > Hello all, > > Should MySQL and Apache be hosted on separate servers or it's ok they > being on one server? We're building a compound that includes about 10 > websites, all their contents are hosted in MySQL. There will be > frequent database updates and the webserver will have to handle heavy > traffic. It depends. How heavy? On what kind of network? And on what machine? Everyone has a different frame of reference. You can easily run 10 db-based web sites on a single machine. On the other hand, it might be difficult to run 1 db-based web site on 10 machines. Start out with the database and web server on the same machine. There may even be performance and security advantages to using a local database via a socket. When the time comes, look at your scaling options, which depend on your resources: - tune the application code for better performance - tune the db for better performance - move the database to a dedicated server - move the busiest site to its own web/database server - get a better server - get a better network - get a caching service In short, identify your bottlenecks before making your next step. I've seen small applications completely consume CPU and memory using inefficient SQL statements on tables with only 100 records. I've also seen massive performance improvements by simply adding indexes on large tables. And nothing short of upgrading your network connection is going to help you if the bottleneck is bandwidth-related. Some sites get relatively small amounts of traffic, but experience crippling peaks tied to dates or events, so they look to caching services like Akamai to provide static resources or to temporarily cache pages. Be assured that there are far more underutilized web servers than overworked ones. Fortunately, it's fairly easy to scale a web site, so start out by making the most efficient use of the resources at hand. |
|
|||
|
<dubing@gmail.com> wrote in message
news:1131747381.396063.6170@g43g2000cwa.googlegrou ps.com... > Hello all, > > Should MySQL and Apache be hosted on separate servers or it's ok they > being on one server? We're building a compound that includes about 10 > websites, all their contents are hosted in MySQL. There will be > frequent database updates and the webserver will have to handle heavy > traffic. What is your objective? Reliability? Better with 1. Security? Better with 2. Performance? Only bother with the second if it's cheaper to buy a second machine than to increase the resources avaliable to the first. Alun Harford |
|
|||
|
>>
>> Should MySQL and Apache be hosted on separate servers or it's ok they >> being on one server? We're building a compound that includes about 10 >> websites, all their contents are hosted in MySQL. There will be >> frequent database updates and the webserver will have to handle heavy >> traffic. > Okay, maybe I can give you a benchmark from a web hosting company I work for. We have an Apache server running on one day average of 15 queries/sec. It also runs a MySQL 4.x database average 100 queries/sec over a day average (serves other machines). At "busy" times during the day it runs at about .4 load factor. Hardware, Dell Poweredge, Dual Xeon at 3 GHz, 3 Gig of RAM, Seagate 15K.3 Ultra 320 disks. We saw a BIG performance improvement when we went to RHEL 4 from Redhat. Hope this helps. -- John __________________________________________________ _________________ John Murtari Software Workshop Inc. jmurtari@following domain 315.635-1968(x-211) "TheBook.Com" (TM) http://thebook.com/ |