my notes on Jim's presentation last night - on the part about scaling PostgreSQL

From: Aleksey Tsalolikhin <atsaloli(dot)tech(at)gmail(dot)com>
To: lapug(at)postgresql(dot)org
Subject: my notes on Jim's presentation last night - on the part about scaling PostgreSQL
Date: 2009-10-20 23:57:41
Message-ID: d17c5b140910201657v7173a562sc702ae6baf009b87@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: lapug

my rough notes on Jim(at)enterprisedb(dot)com's presentation, especially the
part about how to scale postgres database:

0. use connection pooling from the very beginning (e.g. pgpool-II)

1. bigger box (more CPU's, more memory, tweak postgres.conf to use
the added resources). this is scaling vertically.

2. put memcached in front of database to cache reads.

3. use database shards - split the database. (some tables in database
A, some in database B). this is scaling horizontally. the big sites
do it this way.

4. use slony to replicate to multiple servers; then use pgpool-II to
balance the (read) query load across multiple servers. use slony for
your writes. (requires application logic to differentiate DB reads
and writes.)

5. offload processing to the application tier which is easier to scale
by adding multiple instances - for example, instead of having your DB
sort the results, have your app sort the results. don't use stored
procedures or triggers to further reduce load on the DB.

I've emailed Jim asking him for a copy of his slides.

Nice to meet you, folks!

Best,
-at

Responses

Browse lapug by date

  From Date Subject
Next Message Richard Broersma 2009-10-21 14:01:12 Re: my notes on Jim's presentation last night - on the part about scaling PostgreSQL
Previous Message Richard Broersma 2009-10-19 14:07:43 LAPUG meeting tonight