Quantcast

mysql in active-passive linux-ha cluster

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

mysql in active-passive linux-ha cluster

SebastianR
Hi,

I plan to setup a two node active-passive linux-ha based cluster, without a
shared storage.

I can have the mysqld running on the active host, and rsync the database
files every some minutes to the passive host, but I guess, this could cause
trouble in case of a takeover, especially, when the rsync is in the middle
of syncing the database files.

So  I already figured out, the mysql database can do replication.
The easiest way for me would be to setup the mysqld as a clone, meaning
haveing it running on both hosts. That would mean, they should be capable to
being replication master and slave at the same time. So that when a takeover
in the cluster happens, the replications goes flawlessly in the other
direction.
Or in case an instance cannot be replication master and slave at the same
time, can I trigger it with an external command to switch the state, in case
of a takeover in the cluster?

last question, in case one of the mysqld instances is down, but from the
other node, there is data to be replicated, what happens to this data?
Will it replicated later, when the second instance comes online again?

kind regards
Sebastian




--
MySQL Cluster Mailing List
For list archives: http://lists.mysql.com/cluster
To unsubscribe:    http://lists.mysql.com/cluster?unsub=lists@...

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: mysql in active-passive linux-ha cluster

Mark Callaghan
If you deploy one master with one or more slaves, then it can be very
difficult to automate failover in a way that will handle most of the failure
cases.

These will work, and none of them require shared storage.
1) master-master replication - as soon as you add slaves to either of the
masters failover gets complicated. The other options (NDB, DRBD) require
less code from you to automate failover and recovery.
2) NDB (MySQL Cluster)
3) DRBD

I think that the 'cluster' in this list means NDB, so hopefully others chime
in.

On Thu, Jun 5, 2008 at 3:39 AM, Sebastian Reitenbach <
[hidden email]> wrote:

> Hi,
>
> I plan to setup a two node active-passive linux-ha based cluster, without a
> shared storage.
>
> I can have the mysqld running on the active host, and rsync the database
> files every some minutes to the passive host, but I guess, this could cause
> trouble in case of a takeover, especially, when the rsync is in the middle
> of syncing the database files.
>
> So  I already figured out, the mysql database can do replication.
> The easiest way for me would be to setup the mysqld as a clone, meaning
> haveing it running on both hosts. That would mean, they should be capable
> to
> being replication master and slave at the same time. So that when a
> takeover
> in the cluster happens, the replications goes flawlessly in the other
> direction.
> Or in case an instance cannot be replication master and slave at the same
> time, can I trigger it with an external command to switch the state, in
> case
> of a takeover in the cluster?
>
> last question, in case one of the mysqld instances is down, but from the
> other node, there is data to be replicated, what happens to this data?
> Will it replicated later, when the second instance comes online again?
>
> kind regards
> Sebastian
>
>
>
>
> --
> MySQL Cluster Mailing List
> For list archives: http://lists.mysql.com/cluster
> To unsubscribe:
> http://lists.mysql.com/cluster?unsub=mcallaghan@...
>
>


--
Mark Callaghan
[hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: mysql in active-passive linux-ha cluster

SebastianR
In reply to this post by SebastianR
Hi,

"Mark Callaghan" <[hidden email]> wrote:

> If you deploy one master with one or more slaves, then it can be very
> difficult to automate failover in a way that will handle most of the failure
> cases.
>
> These will work, and none of them require shared storage.
> 1) master-master replication - as soon as you add slaves to either of the
> masters failover gets complicated. The other options (NDB, DRBD) require
> less code from you to automate failover and recovery.
> 2) NDB (MySQL Cluster)
> 3) DRBD
Master-Master replication sounds good, need to investigate. drbd will not work
for me, as I am actually on OpenBSD, that doesn't support such stuff.

>
> I think that the 'cluster' in this list means NDB, so hopefully others chime
> in.
I just heard about 'NDB' here the first time, also sounds interesting, need to
investigate too.

thanks
Sebastian


>
> On Thu, Jun 5, 2008 at 3:39 AM, Sebastian Reitenbach <
> [hidden email]> wrote:
>
> > Hi,
> >
> > I plan to setup a two node active-passive linux-ha based cluster, without a
> > shared storage.
> >
> > I can have the mysqld running on the active host, and rsync the database
> > files every some minutes to the passive host, but I guess, this could cause
> > trouble in case of a takeover, especially, when the rsync is in the middle
> > of syncing the database files.
> >
> > So  I already figured out, the mysql database can do replication.
> > The easiest way for me would be to setup the mysqld as a clone, meaning
> > haveing it running on both hosts. That would mean, they should be capable
> > to
> > being replication master and slave at the same time. So that when a
> > takeover
> > in the cluster happens, the replications goes flawlessly in the other
> > direction.
> > Or in case an instance cannot be replication master and slave at the same
> > time, can I trigger it with an external command to switch the state, in
> > case
> > of a takeover in the cluster?
> >
> > last question, in case one of the mysqld instances is down, but from the
> > other node, there is data to be replicated, what happens to this data?
> > Will it replicated later, when the second instance comes online again?
> >
> > kind regards
> > Sebastian
> >
> >
> >
> >
> > --
> > MySQL Cluster Mailing List
> > For list archives: http://lists.mysql.com/cluster
> > To unsubscribe:
> > http://lists.mysql.com/cluster?unsub=mcallaghan@...
> >
> >
>
>
> --
> Mark Callaghan
> [hidden email]
>


--
MySQL Cluster Mailing List
For list archives: http://lists.mysql.com/cluster
To unsubscribe:    http://lists.mysql.com/cluster?unsub=lists@...

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: mysql in active-passive linux-ha cluster

Matteo Vadagnini-2
Hi
Actually I am running a mysql cluster with 2 ndb data nodes and the query node
in active-standby with heartbeat, and an extra management node.
The only thing that I have not implemented till now is
the /var/lib/mysql-cluster directory replication through drbd (I had very few
time to get live, so I had no time to test it), so when I create a user or a
database I need to replicate the queries on all the query nodes by hand.

I think that you could easily use drbd to replicate the data folder of the
query nodes (not the data nodes, that are yet in a failover configuration),
as explained in the white papers you find here (you need to register to the
mysql site with no charge):
http://www.mysql.com/products/enterprise/drbd.html

I don't know if it is the best way to do it, anyway...

Mat


Il Sunday 08 June 2008 13:51:50 Sebastian Reitenbach ha scritto:

> Hi,
>
> "Mark Callaghan" <[hidden email]> wrote:
> > If you deploy one master with one or more slaves, then it can be very
> > difficult to automate failover in a way that will handle most of the
> > failure cases.
> >
> > These will work, and none of them require shared storage.
> > 1) master-master replication - as soon as you add slaves to either of the
> > masters failover gets complicated. The other options (NDB, DRBD) require
> > less code from you to automate failover and recovery.
> > 2) NDB (MySQL Cluster)
> > 3) DRBD
>
> Master-Master replication sounds good, need to investigate. drbd will not
> work for me, as I am actually on OpenBSD, that doesn't support such stuff.
>
> > I think that the 'cluster' in this list means NDB, so hopefully others
> > chime in.
>
> I just heard about 'NDB' here the first time, also sounds interesting, need
> to investigate too.
>
> thanks
> Sebastian
>
> > On Thu, Jun 5, 2008 at 3:39 AM, Sebastian Reitenbach <
> >
> > [hidden email]> wrote:
> > > Hi,
> > >
> > > I plan to setup a two node active-passive linux-ha based cluster,
> > > without a shared storage.
> > >
> > > I can have the mysqld running on the active host, and rsync the
> > > database files every some minutes to the passive host, but I guess,
> > > this could cause trouble in case of a takeover, especially, when the
> > > rsync is in the middle of syncing the database files.
> > >
> > > So  I already figured out, the mysql database can do replication.
> > > The easiest way for me would be to setup the mysqld as a clone, meaning
> > > haveing it running on both hosts. That would mean, they should be
> > > capable to
> > > being replication master and slave at the same time. So that when a
> > > takeover
> > > in the cluster happens, the replications goes flawlessly in the other
> > > direction.
> > > Or in case an instance cannot be replication master and slave at the
> > > same time, can I trigger it with an external command to switch the
> > > state, in case
> > > of a takeover in the cluster?
> > >
> > > last question, in case one of the mysqld instances is down, but from
> > > the other node, there is data to be replicated, what happens to this
> > > data? Will it replicated later, when the second instance comes online
> > > again?
> > >
> > > kind regards
> > > Sebastian
> > >
> > >
> > >
> > >
> > > --
> > > MySQL Cluster Mailing List
> > > For list archives: http://lists.mysql.com/cluster
> > > To unsubscribe:
> > > http://lists.mysql.com/cluster?unsub=mcallaghan@...
> >
> > --
> > Mark Callaghan
> > [hidden email]



--
Matteo Vadagnini
h-care s.r.l.
www.h-care.it
Via Sile 51
31056 - Roncade (TV)
+39 0422 789611
+39 331 6645021


--
MySQL Cluster Mailing List
For list archives: http://lists.mysql.com/cluster
To unsubscribe:    http://lists.mysql.com/cluster?unsub=lists@...

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: mysql in active-passive linux-ha cluster

SebastianR
In reply to this post by SebastianR
Hi,

Matteo Vadagnini <[hidden email]> wrote:
> Hi
> Actually I am running a mysql cluster with 2 ndb data nodes and the query node

> in active-standby with heartbeat, and an extra management node.
> The only thing that I have not implemented till now is
> the /var/lib/mysql-cluster directory replication through drbd (I had very few
> time to get live, so I had no time to test it), so when I create a user or a
> database I need to replicate the queries on all the query nodes by hand.
>
> I think that you could easily use drbd to replicate the data folder of the
> query nodes (not the data nodes, that are yet in a failover configuration),
> as explained in the white papers you find here (you need to register to the
> mysql site with no charge):
> http://www.mysql.com/products/enterprise/drbd.html
>
> I don't know if it is the best way to do it, anyway...
>
> Mat
>
after some more research, if nbd would work at all, then it should be considered
alpha on OpenBSD.
But the master-master replicastion, despite it is asynchroneous, seems to be
easy to setup and more than just sufficient for me.

thank you all
Sebastian

>
> Il Sunday 08 June 2008 13:51:50 Sebastian Reitenbach ha scritto:
> > Hi,
> >
> > "Mark Callaghan" <[hidden email]> wrote:
> > > If you deploy one master with one or more slaves, then it can be very
> > > difficult to automate failover in a way that will handle most of the
> > > failure cases.
> > >
> > > These will work, and none of them require shared storage.
> > > 1) master-master replication - as soon as you add slaves to either of the
> > > masters failover gets complicated. The other options (NDB, DRBD) require
> > > less code from you to automate failover and recovery.
> > > 2) NDB (MySQL Cluster)
> > > 3) DRBD
> >
> > Master-Master replication sounds good, need to investigate. drbd will not
> > work for me, as I am actually on OpenBSD, that doesn't support such stuff.
> >
> > > I think that the 'cluster' in this list means NDB, so hopefully others
> > > chime in.
> >
> > I just heard about 'NDB' here the first time, also sounds interesting, need
> > to investigate too.
> >
> > thanks
> > Sebastian
> >
> > > On Thu, Jun 5, 2008 at 3:39 AM, Sebastian Reitenbach <
> > >
> > > [hidden email]> wrote:
> > > > Hi,
> > > >
> > > > I plan to setup a two node active-passive linux-ha based cluster,
> > > > without a shared storage.
> > > >
> > > > I can have the mysqld running on the active host, and rsync the
> > > > database files every some minutes to the passive host, but I guess,
> > > > this could cause trouble in case of a takeover, especially, when the
> > > > rsync is in the middle of syncing the database files.
> > > >
> > > > So  I already figured out, the mysql database can do replication.
> > > > The easiest way for me would be to setup the mysqld as a clone, meaning
> > > > haveing it running on both hosts. That would mean, they should be
> > > > capable to
> > > > being replication master and slave at the same time. So that when a
> > > > takeover
> > > > in the cluster happens, the replications goes flawlessly in the other
> > > > direction.
> > > > Or in case an instance cannot be replication master and slave at the
> > > > same time, can I trigger it with an external command to switch the
> > > > state, in case
> > > > of a takeover in the cluster?
> > > >
> > > > last question, in case one of the mysqld instances is down, but from
> > > > the other node, there is data to be replicated, what happens to this
> > > > data? Will it replicated later, when the second instance comes online
> > > > again?
> > > >
> > > > kind regards
> > > > Sebastian
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > MySQL Cluster Mailing List
> > > > For list archives: http://lists.mysql.com/cluster
> > > > To unsubscribe:
> > > > http://lists.mysql.com/cluster?unsub=mcallaghan@...
> > >
> > > --
> > > Mark Callaghan
> > > [hidden email]
>
>
>
> --
> Matteo Vadagnini
> h-care s.r.l.
> www.h-care.it
> Via Sile 51
> 31056 - Roncade (TV)
> +39 0422 789611
> +39 331 6645021
>
>
> --
> MySQL Cluster Mailing List
> For list archives: http://lists.mysql.com/cluster
> To unsubscribe:  
http://lists.mysql.com/cluster?unsub=sebastia@...
>
>


--
MySQL Cluster Mailing List
For list archives: http://lists.mysql.com/cluster
To unsubscribe:    http://lists.mysql.com/cluster?unsub=lists@...

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: mysql in active-passive linux-ha cluster

Geert Vanderkelen
In reply to this post by Matteo Vadagnini-2
Hi Matteo, Sebastian,

On Jun 8, 2008, at 14:55 , Matteo Vadagnini wrote:

> Hi
> Actually I am running a mysql cluster with 2 ndb data nodes and the  
> query node
> in active-standby with heartbeat, and an extra management node.
> The only thing that I have not implemented till now is
> the /var/lib/mysql-cluster directory replication through drbd (I had  
> very few
> time to get live, so I had no time to test it), so when I create a  
> user or a
> database I need to replicate the queries on all the query nodes by  
> hand.

Erm, maybe I got you wrong there, but I'll just say:  
_do_not_use_DRBD_to_replicate_Data_Nodes_Datadir :)

You say you have the 'query node', correct name is SQL Node, in an  
'active-standby' configuration. If this is MySQL 5.0 you are using,  
then I can imagine when you are doing binary logging, it makes sense.  
But with MySQL 5.1 and the binary injector, there is no need to keep  
one 'standby'. Your applications should use them both all the time,  
with a load-balancer or so which kicks one out when one goes out  
(Maybe MySQL Proxy?). Why not even adding more SQL Nodes? I would make  
use of them, not letting them idle (with MySQL Cluster 5.1-6.2).

> I think that you could easily use drbd to replicate the data folder  
> of the
> query nodes (not the data nodes, that are yet in a failover  
> configuration),
> as explained in the white papers you find here (you need to register  
> to the
> mysql site with no charge):
> http://www.mysql.com/products/enterprise/drbd.html

Makes it all to complex. Like you said, if you do the DDL changes and  
adding users manually, it's much easier to do and less headaches than  
monitoring and administrating your DRBD setups. And it's platform  
indipentend

-Geert

>
> Il Sunday 08 June 2008 13:51:50 Sebastian Reitenbach ha scritto:
>> Hi,
>>
>> "Mark Callaghan" <[hidden email]> wrote:
>>> If you deploy one master with one or more slaves, then it can be  
>>> very
>>> difficult to automate failover in a way that will handle most of the
>>> failure cases.
>>>
>>> These will work, and none of them require shared storage.
>>> 1) master-master replication - as soon as you add slaves to either  
>>> of the
>>> masters failover gets complicated. The other options (NDB, DRBD)  
>>> require
>>> less code from you to automate failover and recovery.
>>> 2) NDB (MySQL Cluster)
>>> 3) DRBD
>>
>> Master-Master replication sounds good, need to investigate. drbd  
>> will not
>> work for me, as I am actually on OpenBSD, that doesn't support such  
>> stuff.
>>
>>> I think that the 'cluster' in this list means NDB, so hopefully  
>>> others
>>> chime in.
>>
>> I just heard about 'NDB' here the first time, also sounds  
>> interesting, need
>> to investigate too.
>>
>> thanks
>> Sebastian
>>
>>> On Thu, Jun 5, 2008 at 3:39 AM, Sebastian Reitenbach <
>>>
>>> [hidden email]> wrote:
>>>> Hi,
>>>>
>>>> I plan to setup a two node active-passive linux-ha based cluster,
>>>> without a shared storage.
>>>>
>>>> I can have the mysqld running on the active host, and rsync the
>>>> database files every some minutes to the passive host, but I guess,
>>>> this could cause trouble in case of a takeover, especially, when  
>>>> the
>>>> rsync is in the middle of syncing the database files.
>>>>
>>>> So  I already figured out, the mysql database can do replication.
>>>> The easiest way for me would be to setup the mysqld as a clone,  
>>>> meaning
>>>> haveing it running on both hosts. That would mean, they should be
>>>> capable to
>>>> being replication master and slave at the same time. So that when a
>>>> takeover
>>>> in the cluster happens, the replications goes flawlessly in the  
>>>> other
>>>> direction.
>>>> Or in case an instance cannot be replication master and slave at  
>>>> the
>>>> same time, can I trigger it with an external command to switch the
>>>> state, in case
>>>> of a takeover in the cluster?
>>>>
>>>> last question, in case one of the mysqld instances is down, but  
>>>> from
>>>> the other node, there is data to be replicated, what happens to  
>>>> this
>>>> data? Will it replicated later, when the second instance comes  
>>>> online
>>>> again?
>>>>
>>>> kind regards
>>>> Sebastian
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> MySQL Cluster Mailing List
>>>> For list archives: http://lists.mysql.com/cluster
>>>> To unsubscribe:
>>>> http://lists.mysql.com/cluster?unsub=mcallaghan@...
>>>
>>> --
>>> Mark Callaghan
>>> [hidden email]
>
>
>
> --
> Matteo Vadagnini
> h-care s.r.l.
> www.h-care.it
> Via Sile 51
> 31056 - Roncade (TV)
> +39 0422 789611
> +39 331 6645021
>
>
> --
> MySQL Cluster Mailing List
> For list archives: http://lists.mysql.com/cluster
> To unsubscribe:    http://lists.mysql.com/cluster?
> unsub=[hidden email]
>

--
Geert Vanderkelen, MySQL Senior Support Engineer
Sun Microsystems GmbH     Sonnenallee 1, D-85551 Kirchheim-Heimstetten

Geschaeftsfuehrer: Thomas Schroeder, Wolfang Engels, Dr. Roland Boemer
Vorsitz d. Aufs.rat.: Martin Haering                    HRB MUC 161028









--
MySQL Cluster Mailing List
For list archives: http://lists.mysql.com/cluster
To unsubscribe:    http://lists.mysql.com/cluster?unsub=lists@...

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: mysql in active-passive linux-ha cluster

Matteo Vadagnini-2
Thanks Geert for your reply.

Il Monday 09 June 2008 10:22:17 Geert Vanderkelen ha scritto:

> Hi Matteo, Sebastian,
>
> On Jun 8, 2008, at 14:55 , Matteo Vadagnini wrote:
> > Hi
> > Actually I am running a mysql cluster with 2 ndb data nodes and the
> > query node
> > in active-standby with heartbeat, and an extra management node.
> > The only thing that I have not implemented till now is
> > the /var/lib/mysql-cluster directory replication through drbd (I had
> > very few
> > time to get live, so I had no time to test it), so when I create a
> > user or a
> > database I need to replicate the queries on all the query nodes by
> > hand.
>
> Erm, maybe I got you wrong there, but I'll just say:
> _do_not_use_DRBD_to_replicate_Data_Nodes_Datadir :)
>

Never suggested ;)

> You say you have the 'query node', correct name is SQL Node, in an
> 'active-standby' configuration. If this is MySQL 5.0 you are using,
> then I can imagine when you are doing binary logging, it makes sense.

Sorry for the inaccuracy of the terms. yes, I am using 5.0 (Debian).
Should I replicate something between the 2 SQL nodes? I thought they were
completely independent...


> But with MySQL 5.1 and the binary injector, there is no need to keep
> one 'standby'. Your applications should use them both all the time,
> with a load-balancer or so which kicks one out when one goes out
> (Maybe MySQL Proxy?). Why not even adding more SQL Nodes? I would make
> use of them, not letting them idle (with MySQL Cluster 5.1-6.2).

Actually I am using MySQL with tomcat datasource connection pooling, so I need
a specific IP to connect to with persistent connections. I use heartbeat to
put the mysqld process in failover and connect the pool to the VIP of the
service.
If I were using direct connection inside my webapps or through cgi scripts, I
would have used sort of load balancing between the SQL nodes, but needing
persistent connection I thought it was better to have a single SQL node... If
I am wrong, or there if is a better way to do it, please tell me, I'm not so
skilled about such things...

>
> > I think that you could easily use drbd to replicate the data folder
> > of the
> > query nodes (not the data nodes, that are yet in a failover
> > configuration),
> > as explained in the white papers you find here (you need to register
> > to the
> > mysql site with no charge):
> > http://www.mysql.com/products/enterprise/drbd.html
>
> Makes it all to complex. Like you said, if you do the DDL changes and
> adding users manually, it's much easier to do and less headaches than
> monitoring and administrating your DRBD setups. And it's platform
> indipentend
>
> -Geert
>
> > Il Sunday 08 June 2008 13:51:50 Sebastian Reitenbach ha scritto:
> >> Hi,
> >>
> >> "Mark Callaghan" <[hidden email]> wrote:
> >>> If you deploy one master with one or more slaves, then it can be
> >>> very
> >>> difficult to automate failover in a way that will handle most of the
> >>> failure cases.
> >>>
> >>> These will work, and none of them require shared storage.
> >>> 1) master-master replication - as soon as you add slaves to either
> >>> of the
> >>> masters failover gets complicated. The other options (NDB, DRBD)
> >>> require
> >>> less code from you to automate failover and recovery.
> >>> 2) NDB (MySQL Cluster)
> >>> 3) DRBD
> >>
> >> Master-Master replication sounds good, need to investigate. drbd
> >> will not
> >> work for me, as I am actually on OpenBSD, that doesn't support such
> >> stuff.
> >>
> >>> I think that the 'cluster' in this list means NDB, so hopefully
> >>> others
> >>> chime in.
> >>
> >> I just heard about 'NDB' here the first time, also sounds
> >> interesting, need
> >> to investigate too.
> >>
> >> thanks
> >> Sebastian
> >>
> >>> On Thu, Jun 5, 2008 at 3:39 AM, Sebastian Reitenbach <
> >>>
> >>> [hidden email]> wrote:
> >>>> Hi,
> >>>>
> >>>> I plan to setup a two node active-passive linux-ha based cluster,
> >>>> without a shared storage.
> >>>>
> >>>> I can have the mysqld running on the active host, and rsync the
> >>>> database files every some minutes to the passive host, but I guess,
> >>>> this could cause trouble in case of a takeover, especially, when
> >>>> the
> >>>> rsync is in the middle of syncing the database files.
> >>>>
> >>>> So  I already figured out, the mysql database can do replication.
> >>>> The easiest way for me would be to setup the mysqld as a clone,
> >>>> meaning
> >>>> haveing it running on both hosts. That would mean, they should be
> >>>> capable to
> >>>> being replication master and slave at the same time. So that when a
> >>>> takeover
> >>>> in the cluster happens, the replications goes flawlessly in the
> >>>> other
> >>>> direction.
> >>>> Or in case an instance cannot be replication master and slave at
> >>>> the
> >>>> same time, can I trigger it with an external command to switch the
> >>>> state, in case
> >>>> of a takeover in the cluster?
> >>>>
> >>>> last question, in case one of the mysqld instances is down, but
> >>>> from
> >>>> the other node, there is data to be replicated, what happens to
> >>>> this
> >>>> data? Will it replicated later, when the second instance comes
> >>>> online
> >>>> again?
> >>>>
> >>>> kind regards
> >>>> Sebastian
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> MySQL Cluster Mailing List
> >>>> For list archives: http://lists.mysql.com/cluster
> >>>> To unsubscribe:
> >>>> http://lists.mysql.com/cluster?unsub=mcallaghan@...
> >>>
> >>> --
> >>> Mark Callaghan
> >>> [hidden email]
> >
> > --
> > Matteo Vadagnini
> > h-care s.r.l.
> > www.h-care.it
> > Via Sile 51
> > 31056 - Roncade (TV)
> > +39 0422 789611
> > +39 331 6645021
> >
> >
> > --
> > MySQL Cluster Mailing List
> > For list archives: http://lists.mysql.com/cluster
> > To unsubscribe:    http://lists.mysql.com/cluster?
> > unsub=[hidden email]



--
Matteo Vadagnini
h-care s.r.l.
www.h-care.it
Via Sile 51
31056 - Roncade (TV)
+39 0422 789611
+39 331 6645021


--
MySQL Cluster Mailing List
For list archives: http://lists.mysql.com/cluster
To unsubscribe:    http://lists.mysql.com/cluster?unsub=lists@...

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: mysql in active-passive linux-ha cluster

Geert Vanderkelen
Hi Matteo,

On Jun 9, 2008, at 15:51 , Matteo Vadagnini wrote:
..
> Sorry for the inaccuracy of the terms. yes, I am using 5.0 (Debian).
> Should I replicate something between the 2 SQL nodes? I thought they  
> were
> completely independent...

When using 5.0, and you use MySQL Replication, you can only have 1  
mysqld accepting queries which update data (UPDATE, INSERT, ..). But  
if you are not, then you can put 10 SQL nodes and just update on any  
of them, or select. The great thing about MySQL Cluster, except for  
the HA, is that you can scale out on SQL nodes.
With 5.1, we introduced the binary log injector, and this makes it  
possible to updates on all SQL nodes, and still have 1 SQL node doing  
binary logging for replication.

>> But with MySQL 5.1 and the binary injector, there is no need to keep
>> one 'standby'. Your applications should use them both all the time,
>> with a load-balancer or so which kicks one out when one goes out
>> (Maybe MySQL Proxy?). Why not even adding more SQL Nodes? I would  
>> make
>> use of them, not letting them idle (with MySQL Cluster 5.1-6.2).
>
> Actually I am using MySQL with tomcat datasource connection pooling,  
> so I need
> a specific IP to connect to with persistent connections. I use  
> heartbeat to
> put the mysqld process in failover and connect the pool to the VIP  
> of the
> service.
..

If it works, it works. But you miss out on something.
I haven't done this myself, but you can configure the connection pool  
to multiple MySQL Servers. So, if you have like 10 SQL nodes, all on  
the same MySQL Cluster (aka same data) you scale better. And actually  
no need for the heartbeat stuff (I think), less complexity.

How to do that, is something for you to hack on. We can tell where the  
candy is :)

Cheers,

Geert

--
Geert Vanderkelen, MySQL Senior Support Engineer
Sun Microsystems GmbH     Sonnenallee 1, D-85551 Kirchheim-Heimstetten

Geschaeftsfuehrer: Thomas Schroeder, Wolfang Engels, Dr. Roland Boemer
Vorsitz d. Aufs.rat.: Martin Haering                    HRB MUC 161028









--
MySQL Cluster Mailing List
For list archives: http://lists.mysql.com/cluster
To unsubscribe:    http://lists.mysql.com/cluster?unsub=lists@...

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

HA with cluster

Disaro Massimo
In reply to this post by Matteo Vadagnini-2
Hi,
i have a cluster mysql. To ménage easy the add of other SQL nodes, I need to use a proxy (don't want to manage the application every time). How can I garanty the HA? If the mysqlproxy go away I get the cluster out of service.

Any idea? Thanks

Max

--
MySQL Cluster Mailing List
For list archives: http://lists.mysql.com/cluster
To unsubscribe:    http://lists.mysql.com/cluster?unsub=lists@...

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: HA with cluster

Massimo-6
Ciao Massimo,

you can install the proxy in the same server of the application, in this
way you don't have another single point of failure.

Of course to guarantee the HA, i supporse you have more than 1 server
running your app...

Massimo

Disaro Massimo ha scritto:
> Hi,
> i have a cluster mysql. To ménage easy the add of other SQL nodes, I need to use a proxy (don't want to manage the application every time). How can I garanty the HA? If the mysqlproxy go away I get the cluster out of service.
>
> Any idea? Thanks
>
> Max
>
>  

--
MySQL Cluster Mailing List
For list archives: http://lists.mysql.com/cluster
To unsubscribe:    http://lists.mysql.com/cluster?unsub=lists@...

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: mysql in active-passive linux-ha cluster

Matteo Vadagnini-2
In reply to this post by Geert Vanderkelen
Il Monday 09 June 2008 16:14:30 Geert Vanderkelen ha scritto:

> Hi Matteo,
>
> On Jun 9, 2008, at 15:51 , Matteo Vadagnini wrote:
> ..
>
> > Sorry for the inaccuracy of the terms. yes, I am using 5.0 (Debian).
> > Should I replicate something between the 2 SQL nodes? I thought they
> > were
> > completely independent...
>
> When using 5.0, and you use MySQL Replication, you can only have 1
> mysqld accepting queries which update data (UPDATE, INSERT, ..). But
> if you are not, then you can put 10 SQL nodes and just update on any
> of them, or select. The great thing about MySQL Cluster, except for
> the HA, is that you can scale out on SQL nodes.
> With 5.1, we introduced the binary log injector, and this makes it
> possible to updates on all SQL nodes, and still have 1 SQL node doing
> binary logging for replication.
>

So, since I am using 5.0 Mysql cluster (NDB) I need nothing to share between
the 2 sql nodes.

> >> But with MySQL 5.1 and the binary injector, there is no need to keep
> >> one 'standby'. Your applications should use them both all the time,
> >> with a load-balancer or so which kicks one out when one goes out
> >> (Maybe MySQL Proxy?). Why not even adding more SQL Nodes? I would
> >> make
> >> use of them, not letting them idle (with MySQL Cluster 5.1-6.2).
> >
> > Actually I am using MySQL with tomcat datasource connection pooling,
> > so I need
> > a specific IP to connect to with persistent connections. I use
> > heartbeat to
> > put the mysqld process in failover and connect the pool to the VIP
> > of the
> > service.
>
> ..
>
> If it works, it works. But you miss out on something.
> I haven't done this myself, but you can configure the connection pool
> to multiple MySQL Servers. So, if you have like 10 SQL nodes, all on
> the same MySQL Cluster (aka same data) you scale better. And actually
> no need for the heartbeat stuff (I think), less complexity.
>

I must investigte it... But in the datasource definition I thought I could put
only one URL. I will search infos about it.

> How to do that, is something for you to hack on. We can tell where the
> candy is :)

Yes, and MySQL is full of candies... Do you know a good dentist :D ?

Mat

--
Matteo Vadagnini
h-care s.r.l.
www.h-care.it
Via Sile 51
31056 - Roncade (TV)
+39 0422 789611
+39 331 6645021


--
MySQL Cluster Mailing List
For list archives: http://lists.mysql.com/cluster
To unsubscribe:    http://lists.mysql.com/cluster?unsub=lists@...

Loading...