Re: Replication & web apps

From: Christopher Browne <cbbrowne(at)acm(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Replication & web apps
Date: 2006-03-17 03:12:44
Message-ID: 87ek11rcgj.fsf@wolfe.cbbrowne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In the last exciting episode, Leonardo(dot)Francalanci(at)CommProve(dot)com (Leonardo Francalanci) wrote:
> In other words: how can asynchronous replication be used in an
> application???

Yes, this is an issue.

Asynchronous replication is NOT suitable in cases where you point
applications that need forcibly up-to-date information to a replica
that is (even just a little) behind.

We *have to* point all of the applications that need
up-to-the-instance balance information to the "master" system.

But there are doubtless plenty of places where you could use data that
isn't *forcibly* up to date.

- For instance, running temporal reports against a replica should turn
out fine.

- We run the WHOIS service against replicas; we don't promise
instantaneous propagation, and nobody worries too much if they get
information that, in a few cases, is a few seconds out of date.

- In a web sales system, I'd be inclined to run "normal" queries
against a replica for the portion of the workflow that involves
users assembling their "basket" of products. And move to
pointing to the "master" when it comes time to "check out" the
order, so that the final order gets the most up-to-date data.

Asynchronous replication isn't good for *everything*, but you'll
generally find ways to use replicas, when you have them...
--
let name="cbbrowne" and tld="ntlug.org" in String.concat "@" [name;tld];;
http://linuxfinances.info/info/lsf.html
"The best design is not predicated on how brain-dead you can be and
still operate it." -- David C. Wright

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2006-03-17 03:32:59 Re: How do I make a timestamp column default to current time
Previous Message Chris 2006-03-17 03:11:19 Re: full text indexing