Subject: Distributed Database Web Site

From: "Marc G. Fournier" <[email-masked]>
Date: Sat, 14 Aug 2004 17:50:37 -0300 (ADT)

Just curious, how hard would it be to distinguish on the main web site 
between read and write operations?

For instance, if we had a read-only database on a mirror site, replicated 
from the main database using something like Slony ... how hard would it be 
t have 'write operations' sent to the main web site to happen, with all 
read operations being local?

ie. posting news events would happen at http://www.postgresql.org, but 
reading news events would be @ http://www.xx.postgresql.org, but both 
could/would be dynamic?

----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: [email-masked]           Yahoo!: yscrappy              ICQ: 7615664

---

From: Justin Clift <[email-masked]>
Date: Sun, 15 Aug 2004 20:23:49 +1000

Marc G. Fournier wrote:
> For instance, if we had a read-only database on a mirror site, 
> replicated from the main database using something like Slony ... how 
> hard would it be t have 'write operations' sent to the main web site to 
> happen, with all read operations being local?

Thinking about what it would take...

We'd need the pg_hba.conf of the main database set to allow connections 
from the mirror website(s), so the write operations can occur.

Or, perhaps as an alternative, we could look at making the pages that 
generate writes only be on the main PG website.  So, the majority of 
content is mirrored except for a few pages which do stuff like (i.e.) 
submit new stories and stuff.

I haven't really played with Slony in the scenario of multiple mirrors 
that may or may not all be available at any one time, but Jan should be 
able to give input here.

> reading news events would be @ http://www.xx.postgresql.org, but both 

Yep, should be possible.  We just have to think about the technology 
we'd like web mirrors to run, and then ensure it's acceptable and do-able.

:)

Regards and best wishes,

Justin Clift

> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>    (send "unregister YourEmailAddressHere" to [email-masked])

---

From: "Marc G. Fournier" <[email-masked]>
Date: Sun, 15 Aug 2004 12:50:55 -0300 (ADT)

On Sun, 15 Aug 2004, Justin Clift wrote:

> We'd need the pg_hba.conf of the main database set to allow connections from 
> the mirror website(s), so the write operations can occur.
>
> generate writes only be on the main PG website.  So, the majority of content 
> is mirrored except for a few pages which do stuff like (i.e.) submit new 
> stories and stuff.

This second was what I was thinking ...

> we'd like web mirrors to run, and then ensure it's acceptable and 

Now, knowing that all mirrors couldn't do this (or wouldn't), I was 
thinking of having a pseudo-regional master mirror that others could rsync 
static content from ...

----

---

From: Alexey Borzov <[email-masked]>
Date: Mon, 16 Aug 2004 18:26:47 +0400

Hi,

> happen, with all read operations being local?

What's the point? You can't realistically expect permanent high-speed 
connectivity between master and slaves, thus replication will be *extremely* 
asynchronous.

The only obviuos benefit I see is reduced traffic.

> reading news events would be @ http://www.xx.postgresql.org, but both 

It works this way even now.