|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|
|||
MySQL High Availability FreeBSD Cluster
Hi,
My boss has asked me to build a High Availability FreeBSD MySQL cluster so Im trying to research on guides or howtos to do it in FreeBSD 7.0. I've been reading that I need to use heartbeat to achieve high availablity. is this enough? How will i able to keep the database information between each node sync? Any helpful hints or links would be great. Thanks in Advance.. |
|
||||
Hello businessgeeks,
I in process of building such a cluster. I will eventually write such a procedure after everything is working + tested. In fact, there are many ways to achieve such a task. What task will your cluster be built for? How critical is your application? What resources do you have (hardware, time)? Heartbeat is only a part of the solution. You will also need to replicate your data from one machine to another. There are multiple ways to do this. You can setup basic replication between your MySQL nodes. You can also build a fancy MySQL Cluster (separates data from management and from API nodes). This approach is much more scalable but a little more costly on the resources side. I recommend you check out those links: http://dev.mysql.com/doc/refman/5.0/en/replication.html http://dev.mysql.com/doc/refman/5.0/...l-cluster.html Once all your nodes have the same data, you can check out heartbeat, carp and even MySQL on how to switch from one machine to the other in case of failure or on how to distribute the load as evenly as possible. Let me know if you have any questions.
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." |
|
|||
Hi Stukov,
Thank you for the reference links. It would seem that a mysql cluster is the way to go since im still in the R&D stage. If you dont mind, I'd like to ask some follow up quesions but to answer your questions: 1. The cluster will be hosting a localize version of youtube so availablility and performance are both being targetted here. 2. currently im in R&D stage so im pretty much playing around with a set of boxes. Here are my questions. 1. Can you provide references on how to setup heartbeat, carp (what is carp anyway?) in a freebsd system? 2. Are there alternatives to replication, I friend told me to check out DBRD but says its linux only. Im also looking into building a High Availability and Hi performance Web Server, and I hear this can be done with heartbeat alone, is this correct? will this setup work with lighttpd? Regards, BusinessGeeks |
|
||||
Quote:
You can read more about CARP here (wikipedia explanation) and here (from counterseige). Most appropriate for FreeBSD users, however, is the likely this link.
__________________
Network Firefighter |
|
|||
Quote:
heartbeat; installs from ports (Version 2 is not really what you need if not using python client) install it on both servers and then set this minimum in ha.cf file /usr/local/etc/ha.cf: logfile /var/log/ha-log keepalive 2 deadtime 10 bcast eth0 # name of the ETH you have # you should have 2 ETH so that HA controls don't go on service's ETH node server2 node server1 edit /etc/hosts # handle so that the 2 severs know each other ip_srv_2 server2 ip_srv_1 server1 handle so that Apache binds on cluster's IP (Apache will only run if the node is set as active) later you could sync the apache's files in /var/www or /usr/home's dirs. I suggest to use csync2 to do this. edit haresources server1 192.168.0.100 (this is the cluster's ip) apache (or apache2) start heartbeat on both servers. that's all. Later you could handle it better ie:daemonizing logs, adding services, etc. Don't know if LighHttpd works. Last edited by marco64; 26th May 2008 at 10:03 PM. |
|
|||
Thanks for the inputs anyone. I am currently looking the recommendations.
I also came across MYSQL PROXY http://forge.mysql.com/wiki/MySQL_Proxy Anyone here has experience with it in FreeBSD? |
|
|||
I think you should also check hardware load balancers like Foundry, Alteon.
They are very reliable. As now in mysql 5 you can have a master to master relation between mysql servers, so i guess now load balancing of read/write queries is same. Later in mysql 4 people used to setup one master DB and other Slaves(read-only), so only read queries were load balanced. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
freebsd cluster how to | t4y4n | FreeBSD General | 18 | 18th September 2008 06:11 PM |
PC Weasel availability? | ocicat | Off-Topic | 10 | 19th July 2008 07:48 PM |
Mysql Cluster Questions . . Help! | dcreatorx | FreeBSD Ports and Packages | 3 | 3rd July 2008 01:06 PM |
How to compile MySQL in FreeBSD 7? | invarbrass | FreeBSD General | 1 | 23rd May 2008 06:25 AM |
mysql on freebsd 7 | nijikon | FreeBSD General | 0 | 20th May 2008 12:47 PM |