pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: pgsql-performance@postgresql.org
Cc: Tatsuo Ishii <t-ishii@sra.co.jp>
Cc: darcy@wavefire.com
Cc: jd@www.commandprompt.com
Cc: sfrost@snowman.net
Cc: herve@elma.fr
Subject: Re: PostgreSQL clustering VS MySQL clustering
Date: Thu, 20 Jan 2005 19:49:24 -0800
Message-ID: <200501201949.24292.josh@agliodbs.com> (raw)
In-Reply-To: <20050121.104007.74755729.t-ishii@sra.co.jp>
References: <20050120144416.GO10437@ns.snowman.net>
	<200501200929.37228.darcy@wavefire.com>
	<20050121.104007.74755729.t-ishii@sra.co.jp>

Tatsuo,

> Yes. However it would be pretty easy to modify pgpool so that it could
> cope with Slony-I. I.e.
>
> 1) pgpool does the load balance and sends query to Slony-I's slave and
>    master if the query is SELECT.
>
> 2) pgpool sends query only to the master if the query is other than
>    SELECT.
>
> Remaining problem is that Slony-I is not a sync replication
> solution. Thus you need to prepare that the load balanced query
> results might differ among servers.

Yes, please, some of us are already doing the above ad-hoc.

The simple workaround to replication lag is to calculate the longest likely 
lag (<3 seconds if Slony is tuned right) and have the dispatcher (pgpool) 
send all requests from that connection to the master for that period.   Then 
it switches back to "pool" mode where the slaves may be used.

Of course, all of the above is only useful if you're doing a web app where 96% 
of query activity is selects.   For additional scalability, put all of your 
session maintenance in memcached, so that you're not doing database writes 
every time a page loads.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco



view thread (131+ messages)  latest in thread

Message-ID: <200501201949.24292.josh@agliodbs.com>
Permalink:  ../200501201949.24292.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200501201949.24292.josh@agliodbs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: josh@agliodbs.com, t-ishii@sra.co.jp, darcy@wavefire.com, jd@www.commandprompt.com, sfrost@snowman.net, herve@elma.fr
  Subject: Re: PostgreSQL clustering VS MySQL clustering
  In-Reply-To: <200501201949.24292.josh@agliodbs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox