View previous topic :: View next topic |
Author |
Message |
kmj0377 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/2869102474443844b83b0f.jpg)
Joined: 26 Sep 2003 Posts: 397
|
Posted: Fri Apr 20, 2007 2:34 pm Post subject: Apache/MySQL Clustering |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mudrii l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 26 Jun 2003 Posts: 789 Location: Singapore
|
Posted: Fri Apr 20, 2007 3:32 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
kmj0377 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/2869102474443844b83b0f.jpg)
Joined: 26 Sep 2003 Posts: 397
|
Posted: Fri Apr 20, 2007 5:13 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
thebigslide l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/gallery/Southpark/avatar21.gif)
Joined: 23 Dec 2004 Posts: 792 Location: under a car or on top of a keyboard
|
Posted: Sat Apr 21, 2007 1:59 am Post subject: |
|
|
I put web directories on an NFS share. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kmj0377 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/2869102474443844b83b0f.jpg)
Joined: 26 Sep 2003 Posts: 397
|
Posted: Sat Apr 21, 2007 3:40 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
thebigslide l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/gallery/Southpark/avatar21.gif)
Joined: 23 Dec 2004 Posts: 792 Location: under a car or on top of a keyboard
|
Posted: Sat Apr 21, 2007 5:08 pm Post subject: |
|
|
rsync? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kmj0377 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/2869102474443844b83b0f.jpg)
Joined: 26 Sep 2003 Posts: 397
|
Posted: Sun Apr 22, 2007 3:13 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Bad Penguin Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/14405804604419c4f7bf468.png)
Joined: 18 Aug 2004 Posts: 507
|
Posted: Sun Apr 22, 2007 4:56 am Post subject: Re: Apache/MySQL Clustering |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
kmj0377 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/2869102474443844b83b0f.jpg)
Joined: 26 Sep 2003 Posts: 397
|
Posted: Tue Apr 24, 2007 9:15 pm Post subject: Re: Apache/MySQL Clustering |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
kmj0377 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/2869102474443844b83b0f.jpg)
Joined: 26 Sep 2003 Posts: 397
|
Posted: Tue Apr 24, 2007 11:01 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
kmj0377 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/2869102474443844b83b0f.jpg)
Joined: 26 Sep 2003 Posts: 397
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Bad Penguin Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/14405804604419c4f7bf468.png)
Joined: 18 Aug 2004 Posts: 507
|
Posted: Wed Apr 25, 2007 1:33 pm Post subject: |
|
|
Just curious, why the need for filesystem replication? Why not just use normal package management to handle it? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kmj0377 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/2869102474443844b83b0f.jpg)
Joined: 26 Sep 2003 Posts: 397
|
Posted: Wed Apr 25, 2007 6:58 pm Post subject: |
|
|
Bad Penguin wrote: |
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 |
|
![](templates/gentoo/images/spacer.gif) |
joyo222 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 18 May 2006 Posts: 44
|
Posted: Wed May 02, 2007 7:45 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|