Jan Wieck JanWieck
Mon Jul 5 13:21:35 PDT 2004
On 7/1/2004 8:23 AM, Ramon Salvad? wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>  
> Hello,
> 
> ~    I am currently learning how slony works ( I have a master-slave
> cluster working as intended ). I would like to know the following if
> possible (or some advice about it):
> 
> ~    1) Is it wise to use slony to replicate a database of about 80GB
> (1 Master and 2 or 3 slaves) (about 100 application users concurrently).

The size of the database isn't the determining factor. What counts is 
the read/write ratio of your application. Slony has for example no 
problem to replicate even the Order-Mix of a TPC-W benchmark, which is 
about 10-15% write queries with defined think times on the client side 
(like a real web application). But it has little chance to keep up with 
a pgbench, which is 75% write queries done by libpq clients hammering 
transaction after transaction as fast as they can (not really any kind 
of realistic application).

> 
> ~    2) Would it be possible to use LVS to access db slaves as a
> cluster from the client application (web application)? Is it a good idea?

I would think that depends on the application, and I don't know exactly 
how LVS works. Each replica is independant, so they can possibly all 
represent a different point in time. That means, if a user gets a search 
result from one server, and then tries to do a detail view and the load 
balancer sends this request to another server, this detail might not 
have been propagated to this server yet.

If the load balancer honors session ID's and directs all requests 
belonging to one session to the same server, then there should not be 
any problem.


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck at Yahoo.com #



More information about the Slony1-general mailing list