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
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!
lapug by date
|Next:||From: Richard Broersma||Date: 2009-10-21 14:01:12|
|Subject: Re: my notes on Jim's presentation last night - on the part about scaling PostgreSQL|
|Previous:||From: Richard Broersma||Date: 2009-10-19 14:07:43|
|Subject: LAPUG meeting tonight|