Thread: Alternative to Multi-Master Replication with 2 Data centers??

Alternative to Multi-Master Replication with 2 Data centers??

From
ethode
Date:
We are load balancing 2 data centers.

Our current approach was using a software layer in our CMS to send data
between data centers, but write/update frequency made this approach
difficult and bug laden.

Currently we're considering several options, of which Multi-master
replication appears to be the top option.

BOTH data centers need to be writable, otherwise we could use Master/Slave.
If DC1 goes down our LB is failing over to DC2.  The failure causing
failover could be DB related OR be web server related.

It doesn't appear to be realistic to keep both DC's updated on inserts
and/or updates without using Multi-master or some other 3rd party software
that appear to do the same thing as Multi-master.

Any other solutions I should be considering



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Alternative-to-Multi-Master-Replication-with-2-Data-centers-tp5797886.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: Alternative to Multi-Master Replication with 2 Data centers??

From
John R Pierce
Date:
On 3/29/2014 11:35 AM, ethode wrote:
> Currently we're considering several options, of which Magic
> replication appears to be the top option.

fixed that for you, hope that helps!

kidding aside, there's no magic bullet here that does what you describe
without introducing its own complex set of problems and performance
issues, not the least of which is transaction conflict resolution.




--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



Re: Alternative to Multi-Master Replication with 2 Data centers??

From
jaime soler
Date:
On sáb, 2014-03-29 at 12:50 -0700, John R Pierce wrote:
> On 3/29/2014 11:35 AM, ethode wrote:
> > Currently we're considering several options, of which Magic
> > replication appears to be the top option.
>
> fixed that for you, hope that helps!
>
> kidding aside, there's no magic bullet here that does what you describe
> without introducing its own complex set of problems and performance
> issues, not the least of which is transaction conflict resolution.

checkout xDB Replication Server v5.0 Multi-Master
http://www.enterprisedb.com/products-services-training/products-overview/xdb-replication-server-multi-master
maybe it adjust to your requirements.



>
>
>
>
> --
> john r pierce                                      37N 122W
> somewhere on the middle of the left coast
>
>
>




Re: Alternative to Multi-Master Replication with 2 Data centers??

From
Paul Jungwirth
Date:
> We are load balancing 2 data centers.

Chapter 8 of Scalable Internet Architectures has a good discussion of
running master-master setups in separate data centers. I'd read that
whole chapter for some of the challenges you'll face.

> If DC1 goes down our LB is failing over to DC2.

This sounds like it will bring down both databases. In general using
the same machine for both load balancing and failover means that in
practice you have no failover, because if one box goes down doubling
the traffic will overwhelm the other one. If you want high
availability you should have a separate warm standby in each
datacenter, for four machines total. Otherwise you're just spending
lots of time and money for the appearance of failover but not the
reality. Or at least test it and make sure one failure won't cascade
to the whole system.

Good luck!

Paul



On Sat, Mar 29, 2014 at 11:35 AM, ethode <joshua@ethode.com> wrote:
> We are load balancing 2 data centers.
>
> Our current approach was using a software layer in our CMS to send data
> between data centers, but write/update frequency made this approach
> difficult and bug laden.
>
> Currently we're considering several options, of which Multi-master
> replication appears to be the top option.
>
> BOTH data centers need to be writable, otherwise we could use Master/Slave.
> If DC1 goes down our LB is failing over to DC2.  The failure causing
> failover could be DB related OR be web server related.
>
> It doesn't appear to be realistic to keep both DC's updated on inserts
> and/or updates without using Multi-master or some other 3rd party software
> that appear to do the same thing as Multi-master.
>
> Any other solutions I should be considering
>
>
>
> --
> View this message in context:
http://postgresql.1045698.n5.nabble.com/Alternative-to-Multi-Master-Replication-with-2-Data-centers-tp5797886.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general



--
_________________________________
Pulchritudo splendor veritatis.


Re: Alternative to Multi-Master Replication with 2 Data centers??

From
ethode
Date:

Paul, I will read through Chapter 8, sounds like it'll be tremendously helpful.

For the second piece here let me be more specific if I may.

We currently have 1 DB and 1 Web server in each DC.

The load balancer could detect 500 errors on the behalf of either DC so if a DB server went down the LB would eliminate one DC within seconds.

The DB server in each data center would be running MM, so if one goes down the entire DC will be down, and when it is put backonline MM logic will look to get updated information from WAL and re-synch it self.

 

 

 

On 2014-03-31 11:54, Paul Jungwirth [via PostgreSQL] wrote:

> We are load balancing 2 data centers.

Chapter 8 of Scalable Internet Architectures has a good discussion of
running master-master setups in separate data centers. I'd read that
whole chapter for some of the challenges you'll face.

> If DC1 goes down our LB is failing over to DC2.

This sounds like it will bring down both databases. In general using
the same machine for both load balancing and failover means that in
practice you have no failover, because if one box goes down doubling
the traffic will overwhelm the other one. If you want high
availability you should have a separate warm standby in each
datacenter, for four machines total. Otherwise you're just spending
lots of time and money for the appearance of failover but not the
reality. Or at least test it and make sure one failure won't cascade
to the whole system.

Good luck!

Paul



On Sat, Mar 29, 2014 at 11:35 AM, ethode <[hidden email]> wrote:


> We are load balancing 2 data centers.
>
> Our current approach was using a software layer in our CMS to send data
> between data centers, but write/update frequency made this approach
> difficult and bug laden.
>
> Currently we're considering several options, of which Multi-master
> replication appears to be the top option.
>
> BOTH data centers need to be writable, otherwise we could use Master/Slave.
> If DC1 goes down our LB is failing over to DC2.  The failure causing
> failover could be DB related OR be web server related.
>
> It doesn't appear to be realistic to keep both DC's updated on inserts
> and/or updates without using Multi-master or some other 3rd party software
> that appear to do the same thing as Multi-master.
>
> Any other solutions I should be considering
>
>
>
> --
> View this message in context: http://postgresql.1045698.n5.nabble.com/Alternative-to-Multi-Master-Replication-with-2-Data-centers-tp5797886.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-general mailing list ([hidden email])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general


--
_________________________________
Pulchritudo splendor veritatis.


--
Sent via pgsql-general mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



To unsubscribe from Alternative to Multi-Master Replication with 2 Data centers??, click here.
NAML

 

 


View this message in context: Re: Alternative to Multi-Master Replication with 2 Data centers??
Sent from the PostgreSQL - general mailing list archive at Nabble.com.