Обсуждение: will slony work for this ?

Поиск
Список
Период
Сортировка

will slony work for this ?

От
Tony Caduto
Дата:
I have two Postgresql 8.1 servers each one is in a DMZ and each one has
a apache server running on it.
What I want to do is have real time 2 way replication between the two
databases so I can use DNS fail over, i.e when the primary goes down the
secondary would take over.
Then when the primary comes backup it should get all the changes that
happened to the secondary while it was down.

Or would PGCluster be a better option?

Thanks,

Tony

Re: will slony work for this ?

От
"Joshua D. Drake"
Дата:
Tony Caduto wrote:
>
> I have two Postgresql 8.1 servers each one is in a DMZ and each one
> has a apache server running on it.
> What I want to do is have real time 2 way replication between the two
> databases so I can use DNS fail over, i.e when the primary goes down
> the secondary would take over.
> Then when the primary comes backup it should get all the changes that
> happened to the secondary while it was down.
Slony or Replicator will handle that but keep in mind they are both Async.

>
> Or would PGCluster be a better option?
>
> Thanks,
>
> Tony
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>


Re: will slony work for this ?

От
Robert Treat
Дата:
On Thursday 16 March 2006 14:46, Joshua D. Drake wrote:
> Tony Caduto wrote:
> > I have two Postgresql 8.1 servers each one is in a DMZ and each one
> > has a apache server running on it.
> > What I want to do is have real time 2 way replication between the two
> > databases so I can use DNS fail over, i.e when the primary goes down
> > the secondary would take over.
> > Then when the primary comes backup it should get all the changes that
> > happened to the secondary while it was down.
>
> Slony or Replicator will handle that but keep in mind they are both Async.
>

I have some doubts. If the primary fails, how will the secondary know to take
over?  In slony at least, you'll have to issue a failover command (switchover
wont work on the downed primary) which means you downed primary will be in an
untrustable state. The importance of this being that there will be no way for
it to just "get all the changes"; you'll have to rebuild it.  My
understanding is the same is true for replicator, but perhaps you can
elaborate on that?

--
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

Re: will slony work for this ?

От
Guy Fraser
Дата:
On Thu, 2006-16-03 at 19:05 -0500, Robert Treat wrote:
> On Thursday 16 March 2006 14:46, Joshua D. Drake wrote:
> > Tony Caduto wrote:
> > > I have two Postgresql 8.1 servers each one is in a DMZ and each one
> > > has a apache server running on it.
> > > What I want to do is have real time 2 way replication between the two
> > > databases so I can use DNS fail over, i.e when the primary goes down
> > > the secondary would take over.
> > > Then when the primary comes backup it should get all the changes that
> > > happened to the secondary while it was down.
> >
> > Slony or Replicator will handle that but keep in mind they are both Async.
> >
>
> I have some doubts. If the primary fails, how will the secondary know to take
> over?  In slony at least, you'll have to issue a failover command (switchover
> wont work on the downed primary) which means you downed primary will be in an
> untrustable state. The importance of this being that there will be no way for
> it to just "get all the changes"; you'll have to rebuild it.  My
> understanding is the same is true for replicator, but perhaps you can
> elaborate on that?
I would concur, and add that DNS fail over is not reliable if a server
fails, it is only good for pseudo load balancing. It is better to use
either a hardware load balancing product, or use a High Availability
Fail Over monitoring application that can take over the IP of the
downed server. There are tons of examples on the Net just waiting to
be perused. If you don't need redundant comparative response analysis,
then off the shelf hardware and open source solutions are available.