Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th July 2007, 09:33
Pichi_B Pichi_B is offline
Junior Member
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Question on Loadbalanced High-Availability MYSQL/Apache Cluster

Hello,

I just finished setting up the How To's for Falkos High Availability Apache Cluster and High Availibility MYSQL Cluster. I did this on Debian Etch servers. So I could see that the differneces in the setups were the contents of the ldirectord.cf file. This is the file that controls the virtual server.

My question is:

Is there a way to combine the two virtaul servers (apache and mysql). I mean each How To tells us how to cluster one service i.e MYSQL or Apache. What I would like to do is cluster MYSQL and Apache on the same servers. Does the ldirectord.cf allow for more than one service to be virtualized?

I would go ahead and try this but I dont want to blow up what took me a few days to set up. I am a complete noob to LINUX and so I am doing all this slowly and trying to learn as much as possible.

Thank you for your help and especially to Falko for his great documentation,

Pete
Granada Spain
Reply With Quote
Sponsored Links
  #2  
Old 25th July 2007, 13:57
Pichi_B Pichi_B is offline
Junior Member
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK after a while I got brave and changed the ldirectord.cf file myself. I included the two services (MYSQL & Apache) like so:

Code:
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes

virtual=192.168.0.105:80
        real=192.168.0.101:80 gate
        real=192.168.0.102:80 gate
        fallback=127.0.0.1:80 gate
        service=http
        request="ldirector.html"
        receive="Elvis has left the building!"
        scheduler=rr
        protocol=tcp
        checktype=negotiate


# Global Directives
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes

virtual = 192.168.0.105:3306
        service = mysql
        real = 192.168.0.101:3306 gate
        real = 192.168.0.102:3306 gate
        checktype = negotiate
        login = "ldirector"
        passwd = "ldirectorpassword"
        database = "ldirectordb"
        request = "SELECT * FROM connectioncheck"
        scheduler = wrr
I then rebooted the two load balancers and issued the following command:

Code:
bubba:/home/pete# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  192.168.0.105:80 rr
  -> 192.168.0.101:80             Route   1      0          0
  -> 192.168.0.102:80             Route   1      0          0
TCP  192.168.0.105:3306 wrr
  -> 192.168.0.101:3306           Route   1      0          0
  -> 192.168.0.102:3306           Route   1      0          0
bubba:/home/pete#
Seeing this was what I wanted. I was able to access both services via the virtual address 192.168.0.105. I added rsync for Apache using this How To:

http://www.howtoforge.com/mirroring_with_rsync

This gave me all the functionality I was looking for:

1. Replicated MYSQL databases
2. Mirrored Apapche Servers
3. Loadbalancing of services
4. Fault-tolerence of services

My next question would be how can I take advantage of this technology for my mail server which really is the most important service I have.

Thanks again to anyone who can help,

Pete
Granada Spain
Reply With Quote
  #3  
Old 26th July 2007, 19:18
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

Quote:
Originally Posted by Pichi_B
My next question would be how can I take advantage of this technology for my mail server which really is the most important service I have.
I think the best would be to create backup MX: http://www.howtoforge.com/postfix_backup_mx
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
pete89 (27th July 2007)
  #4  
Old 27th July 2007, 10:18
Pichi_B Pichi_B is offline
Junior Member
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Production ready??

Hello Again,

Having finished the How To's High Availability Apache Cluster , High Availibility MYSQL Cluster, and Mirroring with Rsync I am wondering if I can go ahead and put this into a production enviroment?

The reason I am unsure is the version for MYSQL-MAX (now called MAXDB)in the How To is 5.0 and the currrent version is 7.5. I am unaware of how older versions of software are updated in the LINUX world. Are older versions safe to use?

So simply put would you feel comfortable running mysql-max 5.0 on a publically available server?

Another reason we are reluctant to use 7.5 is that it requires X and that could lead to security issues.

Thanks again,

P.
Reply With Quote
  #5  
Old 28th July 2007, 09:53
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

MaxDB != MySQL. Take a look here: http://en.wikipedia.org/wiki/MaxDB

The latest stable MySQL version is 5.0.45, AFAIK.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 16th August 2007, 07:27
chris.zeman chris.zeman is offline
Junior Member
 
Join Date: Jul 2006
Location: Silver Lake, WI
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have two questions regarding this tutorial.


1. Can I configure the cluster using a clean lamp install, or do I need to follow everything step-by-step?
2. Can I omit the second load-balancer?

Thank you,
Chris
Reply With Quote
  #7  
Old 17th August 2007, 16:23
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

Quote:
Originally Posted by chris.zeman
1. Can I configure the cluster using a clean lamp install, or do I need to follow everything step-by-step?
I recommend to do it step-by-step, but you can also start with a clean LAMP system.
Quote:
Originally Posted by chris.zeman
2. Can I omit the second load-balancer?
Yes, but then you lose high-availability because the load balancer that is left becomes a single point of failure.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #8  
Old 18th August 2007, 04:01
chris.zeman chris.zeman is offline
Junior Member
 
Join Date: Jul 2006
Location: Silver Lake, WI
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you, Falko. I might just have to see what I can do about getting just one more server. I'll probably wipe the clean LAMP install of Ubuntu I have on the two MySQL nodes and do it step-by-step like you said.

Thanks!
Chris
Reply With Quote
  #9  
Old 19th August 2007, 04:09
chris.zeman chris.zeman is offline
Junior Member
 
Join Date: Jul 2006
Location: Silver Lake, WI
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am to the point of install UltraMonkey, but I am having the following problem:
Code:
cybernetics@LoadBalancer1:/var/lib/mysql-cluster$ sudo apt-get install ultramonkey libdbi-perl libdbd-mysql-perl libmysqlclient14-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libmysqlclient14-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libalps-heap1-dev
E: Package libmysqlclient14-dev has no installation candidate
cybernetics@LoadBalancer1:/var/lib/mysql-cluster$
Should I install libalps-heap1-dev instead, or use libmysqlclient15-dev?

Thank you,
Chris
Reply With Quote
  #10  
Old 19th August 2007, 05:27
chris.zeman chris.zeman is offline
Junior Member
 
Join Date: Jul 2006
Location: Silver Lake, WI
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

I went ahead and installed libmysqlclient15-dev.

Now, I tried to bring up lo:0, but here's what happened:
Code:
cybernetics@Automation:/var/lib/mysql-cluster$ sudo ifup lo:0
SIOCSIFFLAGS: Cannot assign requested address
lo:0 is up, so can I just ignore the error message?

Thank you,
Chris
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Public and private network + High Availability Apache Cluster teleted HOWTO-Related Questions 11 28th January 2008 14:29
High Availability Samba cluster - DRBD + Heartbeat djalex Server Operation 58 25th May 2007 19:38
Question about the hardware requirement for mysql cluster with load balancing??? johN5Five^ HOWTO-Related Questions 3 12th April 2007 17:06
Question about nfs cluster Jan VdV HOWTO-Related Questions 5 20th February 2007 00:47
Loadbalanced Apache Cluster Help brianwebb01 Installation/Configuration 2 18th October 2006 17:01


All times are GMT +2. The time now is 07:41.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.