So if that server fails completely, there'll be no switch. End of story.
Cheers,
Arjen.
--
Arjen Lentz, Exec.Director @ Open Query (http://openquery.com)
Exceptional Services for MySQL at a fixed budget.
Follow our blog at http://openquery.com/blog/
OurDelta: enhanced builds for MySQL @ http://ourdelta.org
> Yes, you get the point, What we have is only two servers which
> will be setup as Dual master mysql database environment, no more
> servers in production environment any more(add a server means cost and
> is denied ).
Then if you want to use MMM, the best you can do is set up the monitor
on the passive master. If the passive master dies, there is nothing
to fail over to anyway, so you lose nothing.
But, if you switch active-passive, then you'd better log in quickly
and switch the monitor to the other node, because now your monitor and
active server are the same, and you won't have failover if it dies.
There are a lot of reasons why this is a bad situation, and why MMM is
not the right choice here, but you can at least get a one-way failover
if you want.
The real problem is, you're trying to get HA on a budget. Good|cheap:
pick one. Sometimes the cost is simply what it is -- you either pay
the money or you don't have HA. Whoever is denying you the money but
demanding the HA needs to be told that they are denying themselves HA.
I have a question also, during test, even I kill mmm_monitor and
mmm_agent on servers,
the floating IP (my writer IP) still can work, IS that designed to do
so?
How long these floating IP will be available ? because while my
passive server has some trouble, but active server is fine,
I want application still can access normally via the floating Writer
IP address :)
On 03/10/2009, at 6:45 AM, Tomas wrote:
> I have a question also, during test, even I kill mmm_monitor and
> mmm_agent on servers,
> the floating IP (my writer IP) still can work, IS that designed to
> do so?
Depends on how you kill 'em.
In MMM 1.2.x, if somehow MMM shuts down gracefully, the virtual IP
addresses are removed.
Which is nasty.
In MMM 2 they stay.
There are a few other conditions where MMM 1.2.x does the wrong thing,
from Open Query's experience.
For new deployments of MMM we use 2.x now, but we still have a few
clients on MMM 1.2.x.
> How long these floating IP will be available ?
The IP will stay active where it is, unless you were to reboot the
server that has it.
That would make the IP disappear since it's not part of the auto
configuration on startup.
Cheers,
Arjen.
--
Arjen Lentz, Exec.Director @ Open Query (http://openquery.com)
Exceptional Services for MySQL at a fixed budget.
Follow our blog at http://openquery.com/blog/
On 03/10/2009, at 8:59 AM, Tomas wrote:
> And beside that, I also have slave in another subnet replicate from
> those Dual server through SSH tunnel.
I'd recommend using just an SSL slave connection using MySQL's
internal SSL capabilities.
It's a bit of extra work to set up, but less can go wrong - if the
connection drops MySQL will be able to reconnect; if you use SSH, it
can drop and MySQL would not be able to reconnect or do anything about
it.
> I have another question here, from my understanding, this slave 'd
> better point to passive mysql db, not any of the read virtual IP
> address, am i right ?
Usually you'd point slaves at the active master (and MMM can manage
that), since that means they'd be the most up to date when something
happens.
When MMM manages that, it points slaves at the internal IP address of
whatever master it connects to (rather than the virtual IP), so it can
control exactly when a switchover occurs. You can't just flip a slave
to another master with virtualIP as the binlog filename/position would
be different!
Cheers,
Arjen.
--
Arjen Lentz, Exec.Director @ Open Query (http://openquery.com)
Exceptional Services for MySQL at a fixed budget.
Follow our blog at http://openquery.com/blog/
On 03/10/2009, at 3:29 AM, Baron Schwartz wrote:
> The real problem is, you're trying to get HA on a budget. Good|cheap:
> pick one. Sometimes the cost is simply what it is -- you either pay
> the money or you don't have HA. Whoever is denying you the money but
> demanding the HA needs to be told that they are denying themselves HA.
I think these are wise words.
MMM solutions are pretty low budget anyway, but you can't skimp
further on it without compromising the HA capability.
If you do MMM with only 2 machines, then a) there are conditions it
can't deal with and b) every event will involve manual work, making
mistakes and other problems more likely. In my opinion, and I'm sure
Baron will agree with this also, it's bad economy. An extra machine
does not cost much.
In a VM environment, it's a small extra VM on a different physical box.
In a physical hosting environment, it can be any other box.
So if you have say a webserver or a vm/box for reporting, anything
like that, you would run the MMM monitor there.
Cheers,
Arjen.
--
Arjen Lentz, Exec.Director @ Open Query (http://openquery.com)
Exceptional Services for MySQL at a fixed budget.
Follow our blog at http://openquery.com/blog/
On 03/10/2009, at 8:51 AM, Tomas wrote:
> if use DRDB, I may need install heartbeat or HAproxy to work for
> failover, right ? So I need think about more
> for failure handling, like DRDB error, HA proxy failure and Heartbeat
> failure also, those possibility of failure , i think , will also
> increase the unavailability of DB.
DRBD+Heartbeat is another way of doing things, but it's not the same
as MMM. It covers different situations and your backup server is not
live - so you can't do schema changes (add index, etc) or other
operations on it. It can be a valid choice, depending on your needs.
HAproxy has nothing to do with DRBD/Heartbeat.
> if use HAproxy, maybe I need another server to host the monitor, or
> the judge role.(correct me if I am wrong, I do not good at HAproxy
> yet.)
> here is the link for that :
> http://www.alexwilliams.ca/blog/2009/08/10/using-haproxy-for-mysql-failover-and-redundancy/
That blog is not quite complete.
Open Query uses HAproxy on its own infrastructure, since we have
masters in separate datacentres and thus we can't have a floating IP.
There are a couple of interesting issues with that which we're still
exploring.
HAproxy too is a different solution from MMM, depending on how you
set it up it will not be exactly the same as MMM.
Cheers,
Arjen.
--
Arjen Lentz, Exec.Director @ Open Query (http://openquery.com)
Exceptional Services for MySQL at a fixed budget.
Follow our blog at http://openquery.com/blog/
On 06/10/2009, at 9:41 AM, Tomas wrote:
> Thanks a lot for your advice.
> In your comment, you point out if use only 2 servers,
> b) every event will involve manual work, making
> mistakes and other problems more likely.
>
> I am not sure about that, If I use MMM, application will be
> transparent of DB status,
> and the failover will be done automatically to the passive DB while
> the active DB is not workable,
> Why i still need manually involved?
You want to be running MMM on the passive master.
So when the active master changes, you need to stop MMM on that server
and change it to the other.
And mind you, MMM can change masters even when the active master is
not completely dead, this can happen due to timing and other issues.
Normally that's fine and harmless, but in your case it'll involve a
risk every time, namely that if MMM keeps running on the active master
machine, if the machine actually fails there won't be failover
happening.
So, more babysitting required. I still don't think it's a good idea,
but it's your infra.
Cheers,
Arjen.
--
Arjen Lentz, Exec.Director @ Open Query (http://openquery.com)
Exceptional Services for MySQL at a fixed budget.
Follow our blog at http://openquery.com/blog/