Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache/MySQL Clustering
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
kmj0377
Guru
Guru


Joined: 26 Sep 2003
Posts: 397

PostPosted: Fri Apr 20, 2007 2:34 pm    Post subject: Apache/MySQL Clustering Reply with quote

What is the best way to go about this? I've seen several topics on this but not many replies to any of them.

The services I need in the cluster are just apache and mysql for now. Later on I may do a mail server cluster with postfix and courier-imap and if anyone has any thoughts on that subject, input is appreciated. And I also have a LDAP box which may need clustering too and I've seen very little about that on the internet.

I'm stuck on what to use for it. LVS and Linux-HA stuff is much talked about, but my boss doesn't like the idea of the load balancer and sees it as a single point of failure and also sees it as a waste to cluster those as well. He's interested in wackamole, but I see very little on the internet about it as far as discussion. Their mailing list is also very bare.

I'm also going to need 1 or more partitions to stay synced up on them. I've looked at drdb, but AFAIK it really only supports 2 nodes. I've tried to find info on using cluster filesystems in Gentoo, but haven't had much success.

And as far as clustering mysql, I've seen it's better to go with replication as opposed to using the ndb storage. Is this the case? Has anyone set up two master replication nodes in that case? I'm not going for failover, but really two or more nodes for load balancing and high availability.

So if anyone has done any of these, could they share what they did and how it worked out?
Back to top
View user's profile Send private message
mudrii
l33t
l33t


Joined: 26 Jun 2003
Posts: 789
Location: Singapore

PostPosted: Fri Apr 20, 2007 3:32 pm    Post subject: Reply with quote

Try to keep it simple
Separate the servers apache from mysql run on separate servers
Mysql runs in HA very good on replication and very bad on clustering as mysql 5.0.x cluster put every thing in RAM which is bad thing if you have a big DB.
For apache HA keepalive or heartbet should do it and keep it simple as much as possible if is not a very big complex cluster you build.
Regards
_________________
www.gentoo.ro
Back to top
View user's profile Send private message
kmj0377
Guru
Guru


Joined: 26 Sep 2003
Posts: 397

PostPosted: Fri Apr 20, 2007 5:13 pm    Post subject: Reply with quote

Any recommendations for filesystems to keep the web directories and such synced up? GFS or drdb looks like they might do what I need, but I'm not sure which to go with.
Back to top
View user's profile Send private message
thebigslide
l33t
l33t


Joined: 23 Dec 2004
Posts: 792
Location: under a car or on top of a keyboard

PostPosted: Sat Apr 21, 2007 1:59 am    Post subject: Reply with quote

I put web directories on an NFS share.
Back to top
View user's profile Send private message
kmj0377
Guru
Guru


Joined: 26 Sep 2003
Posts: 397

PostPosted: Sat Apr 21, 2007 3:40 pm    Post subject: Reply with quote

thebigslide wrote:
I put web directories on an NFS share.

Although we do have a box with RAID5 on it that could be used as a NFS share, that still creates a single point of failure. I'm more in need of a filesystem that replicates between them.
Back to top
View user's profile Send private message
thebigslide
l33t
l33t


Joined: 23 Dec 2004
Posts: 792
Location: under a car or on top of a keyboard

PostPosted: Sat Apr 21, 2007 5:08 pm    Post subject: Reply with quote

rsync?
Back to top
View user's profile Send private message
kmj0377
Guru
Guru


Joined: 26 Sep 2003
Posts: 397

PostPosted: Sun Apr 22, 2007 3:13 am    Post subject: Reply with quote

thebigslide wrote:
rsync?

I'm going to need them synced up more than rsync can provide. A file could be modified on any of them, so I can't have them rsyncing up to every other one.
Back to top
View user's profile Send private message
Bad Penguin
Guru
Guru


Joined: 18 Aug 2004
Posts: 507

PostPosted: Sun Apr 22, 2007 4:56 am    Post subject: Re: Apache/MySQL Clustering Reply with quote

kmj0377 wrote:
What is the best way to go about this? I've seen several topics on this but not many replies to any of them.

The services I need in the cluster are just apache and mysql for now. Later on I may do a mail server cluster with postfix and courier-imap and if anyone has any thoughts on that subject, input is appreciated. And I also have a LDAP box which may need clustering too and I've seen very little about that on the internet.

It really depends on why you want to cluster - failover, high availability, distributing/balancing the load, etc...

LVS is extremely easy to do when using keepalived to implement it. One fairly simple config file to set up all of the services, it also will do hot failover between multiple LVS routers.

As far as mysql things are not as simple because you have to do replication. You could always configure your apps to do read-only access to a specific load balanced set of servers, any writes/updates/deletes/inserts to the master...
Back to top
View user's profile Send private message
kmj0377
Guru
Guru


Joined: 26 Sep 2003
Posts: 397

PostPosted: Tue Apr 24, 2007 9:15 pm    Post subject: Re: Apache/MySQL Clustering Reply with quote

Bad Penguin wrote:
kmj0377 wrote:
What is the best way to go about this? I've seen several topics on this but not many replies to any of them.

The services I need in the cluster are just apache and mysql for now. Later on I may do a mail server cluster with postfix and courier-imap and if anyone has any thoughts on that subject, input is appreciated. And I also have a LDAP box which may need clustering too and I've seen very little about that on the internet.

It really depends on why you want to cluster - failover, high availability, distributing/balancing the load, etc...

LVS is extremely easy to do when using keepalived to implement it. One fairly simple config file to set up all of the services, it also will do hot failover between multiple LVS routers.

As far as mysql things are not as simple because you have to do replication. You could always configure your apps to do read-only access to a specific load balanced set of servers, any writes/updates/deletes/inserts to the master...

I'm going for high availability and load balancing.

I suppose my main problem is replicating partitions. Right now DRBD would work for me since I only have 2 nodes, the problem comes when I want to add more and since all will be active nodes, that creates a bigger issue.
Back to top
View user's profile Send private message
kmj0377
Guru
Guru


Joined: 26 Sep 2003
Posts: 397

PostPosted: Tue Apr 24, 2007 11:01 pm    Post subject: Reply with quote

Just stumbled onto Fex. It appears that could do what I need by having them import each other. I'll also have a server possibly across the internet as a failover box through DNS round robin or something and this would work well for this since I don't have access to make the filesystem whatever I want. Intermezzo may do what I want as well, but it seems overly complicated and a node must be explicitly set as client or server.
Back to top
View user's profile Send private message
kmj0377
Guru
Guru


Joined: 26 Sep 2003
Posts: 397

PostPosted: Wed Apr 25, 2007 12:10 am    Post subject: Reply with quote

I think I've fairly well made up my mind on what to use. Any suggestions/comments are welcome.

1. LVS for load balancing.
2. MySQL replication as shown in http://www.onlamp.com/pub/a/onlamp/2006/04/20/advanced-mysql-replication.html?page=1
3. Fex for filesystem replication.
Back to top
View user's profile Send private message
Bad Penguin
Guru
Guru


Joined: 18 Aug 2004
Posts: 507

PostPosted: Wed Apr 25, 2007 1:33 pm    Post subject: Reply with quote

kmj0377 wrote:
I think I've fairly well made up my mind on what to use. Any suggestions/comments are welcome.

1. LVS for load balancing.
2. MySQL replication as shown in http://www.onlamp.com/pub/a/onlamp/2006/04/20/advanced-mysql-replication.html?page=1
3. Fex for filesystem replication.


Just curious, why the need for filesystem replication? Why not just use normal package management to handle it?
Back to top
View user's profile Send private message
kmj0377
Guru
Guru


Joined: 26 Sep 2003
Posts: 397

PostPosted: Wed Apr 25, 2007 6:58 pm    Post subject: Reply with quote

Bad Penguin wrote:
kmj0377 wrote:
I think I've fairly well made up my mind on what to use. Any suggestions/comments are welcome.

1. LVS for load balancing.
2. MySQL replication as shown in http://www.onlamp.com/pub/a/onlamp/2006/04/20/advanced-mysql-replication.html?page=1
3. Fex for filesystem replication.


Just curious, why the need for filesystem replication? Why not just use normal package management to handle it?

It's not to handle the stuff Gentoo installs, but to keep the web directory synced.
Back to top
View user's profile Send private message
joyo222
n00b
n00b


Joined: 18 May 2006
Posts: 44

PostPosted: Wed May 02, 2007 7:45 pm    Post subject: Reply with quote

hi, have you heard of sequoia?

http://sequoia.continuent.org/HomePage

it's another option for clustering DB servers w/out using NDB. I haven't used it, but we are currently looking at it as a possible solution to some of our mysql replication problems.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum