Christopher Browne cbbrowne
Mon Sep 6 23:23:01 PDT 2004
Jason Flatt said:
> Hello folks.
>
> I've got a couple of general newbie questions regarding Slony-I and
> replication.  I understand the basics of replication (from what I've read
> this weekend) and I've read through some of the Slony-I docs on the GBorg
> Web
> site, but I still have questions that I did not see answered in the docs.
>
> 1.  In the overview doc, there is the phrase, "...a reasonably limited
> number
> of slave systems."  Does that mean 1 or 2, or 10, or 100...  Is there some
> number that "reasonably limited" correlates to?

It's not clear yet where the limits lie.

Consider Usenet, taken to an interstellar basis:

This program posts news to billions of machines throughout the galaxy.
Your message will cost the net enough to  bankrupt your entire planet.
As a result your species will be sold into  slavery.  Be sure you know
what you are doing.  Are you absolutely sure you want to do this? [yn] y

Having 10 replicas seems pretty plausible.  As the number increases, the
communications burden would get pretty high, particularly in terms of
configuring firewalls and the like to support bidirectional communications
to all of the nodes.

On a local LAN, one might be able to have 100 replicas; why you'd want
that many is a whole other question.

If the goal is to have something akin to Lotus Notes, where lots of
satellite locations periodically sync against the "master," well, that's
characteristic of the PalmSync-Like Replication Project that hasn't been
started.  Likely a worthwhile endeavour, but nobody has done anything more
than talk about that.

> 2.  In thinking about the previous question, another came to mind, WRT
> distances.  Are there "reasonably limited" distances as well.  Should the
> different systems be in the same room, building, city, country?

Interstellar is unrealistic, at this point :-).

The challenge will come if the long distance link is:

a) Too slow to keep up with updates, or
b) Too unreliable to keep running.

And the real problem would most likely come in the initial "seeding." 
When you provision a new subscriber, it has to take on _all_ of the data
then sitting at its provider, all in one transaction.  That takes a while,
across a slow link, and if that link is not sufficiently reliable, you
might never get the first "sync."

> I realize that for both the previous questions, if I want any sort of
> speed,
> the smaller the number and the smaller the distance the better, but what
> about in terms of Slony-I/PostgreSQL's capabilities?

If you have a reasonably reliable VPN, the primary challenge will be in
getting the bandwidth to do the "bootstrapping" of the slave.

At Afilias, we've got some replicas going across VPN, and once they have
gotten up to date, the traffic gets through gratifyingly quickly.  We're
crossing the Mason-Dixon line, and according to the stats, thus far, the
"slow end" seldom gets more than a few seconds behind.

Jan Wieck did some TPC-W-based work where he intentionally let subscribers
fall way behind, on a "home grade" VPN link, and got it to catch up pretty
quickly.

> 3.  I understand that Slony-I is a "master-slave system", where the slaves
> are
> read-only.  Is there some sort of mechanism for allowing a user who is
> viewing a slave database to be redirected to the master if they need to
> make
> edits?

You could do a query on some of the "sl_" tables to figure out a path to
the master node for a particular table.

Presumably that could be encoded into an application.

That's a Small Matter Of Programming that would be specific to your
application that might well be useless for mine.

There are plans to modify pgpool, a C-based "connection pool" manager to
make it aware of Slony; if you can describe the semantics you need
precisely enough, it might be possible to get them supported.
-- 
(reverse (concatenate 'string "ofni.sailifa@" "enworbbc"))
<http://dev6.int.libertyrms.info/>
Christopher Browne
(416) 646 3304 x4124 (land)


More information about the Slony1-general mailing list