Web Hosting Talk







View Full Version : Server cluster design


netserve
09-02-2001, 05:38 PM
I'm putting together a design for an appication server cluster for a private intranet. Relaibility and data integrity are important. Key packages are apache, PHP and MySQL. I'm looking to use between 4 and 8 servers.

What would everyone recommend as a good layout for the servers?

BTW as it's an intranet we're not worried about DNS, or failover for apache etc as if www.domain.com is down we want to access the same packages and data via www2.domain.com on the second or third web server, users will be aware that in the event of a problem www2 is the backup.

eg
1) 2 file servers, 2 to 4 servers running apache, php, mysql.
or
2) 2 fileservers, 2 servers running mysql and 2 servers with apache and php.
3) Something else?

Are there any issues here that I should consider?

I'm working on the basis that 1) is good. File server is easy to mirror on a second server (Best software for this??)

Apache, php and mysql are simple enough to run on the same server and in the event of one server failing users would be able to access the live data easily via any one of the other web servers as they'd still be accessing the same file server.

Anyone have experience of this that could point out pitfalls and or alternatives?

madmatty
09-04-2001, 08:50 PM
Without all the info its hard to tell, I know that the design of these types of things is hard to explain so heres how I would do it.

If you want to elaborate on the setup of the website static databesed content etc. please post.

2 servers running apache and php with the second server mirroring the content from the first server. (probably lots of options on how to do this, simplest being a cron job). 2 other servers running mysql in replication mode. If the first sql server falls over the second one kicks in.

netserve
09-05-2001, 06:49 AM
Basically it's an online application. There are a series of databases one for each user. Each user will have their own 'web site' which is their copy of the application talking to their own database. I'm using php for the code and MySQL for the database.

At the moment the best plan that I have is.

1 BIG live file server using NFS holding the sites and database files.
1 backup file server. I'll probably use some real time mirror/sync package to keep the backup server within 5 mins of the live server.

xx number of servers running Apache, PHP and Mysql.

The only stumbling block that I have is that I'd like all of the web servers to be able to access the same database on the file server. ie 1 set of database files on the file server that are accessible by all the servers.

Hence accessing site from any of the web servers will allow the user to access their database. I'm guessing that Mysql will be able to cope with several servers accessing one set of files in a cluster type setup?

Is this making any sense?

madmatty
09-05-2001, 10:43 PM
If its as big an application as it sounds, I would keep mysql totally seperate from the apache machines.
If your file server thing is beefed up enough then it could probably serve the apache server (servers) through nfs.

If you want to talk more just give me a guick email at include@softhome.net

netserve
09-06-2001, 12:37 PM
I've been looking into the MySQL server.

I'm working now on running mysql on the file server and keeping apache and php on the web servers. I'm going to see if NFS is up to the job of keeping it all going.

The bottle necks are going to probably be the MySQL server as it's going to be handling requests from several web servers.

(Only alternative to that is to have mysql on each web server but to store the data for each server in a different /var/lib/ directory on the file server)

Helicon
09-06-2001, 01:30 PM
Get a real database, mysql doesnt support true load balancing, in your case, you might as well seperate database server from your webserver.

Use oracle or something