From: Marek Florianczyk <franki@tpi.pl>
To: Gaetano Mendola <mendola@bigfoot.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: performance problem - 10.000 databases
Date: 31 Oct 2003 13:31:34 +0100
Message-ID: <1067603494.22233.95.camel@franki-laptop.tpi.pl> (raw)
In-Reply-To: <3FA25062.9040900@bigfoot.com>
References: <1067594647.22286.57.camel@franki-laptop.tpi.pl>
<3FA25062.9040900@bigfoot.com>
W liście z pią, 31-10-2003, godz. 13:06, Gaetano Mendola pisze:
> Marek Florianczyk wrote:
>
> > But my problem is that when I hit command:
> > psql -h 127.0.0.1 dbname dbuser
> > I'm waiting about 3-5 sec to enter psql monitor, so every new connection
> > from apache will wait about 3-5 sec to put query to server. Thats a very
> > long time...
>
> Why don't you use a connection manager ?
What is connection manager?
In PostgreSQL related project I only found SQLB ( Load Balancer ) but
it's designed to use with one ( large ) database and maybe with more
than one PostgreSQL server.
The best solution for me, it would by small pogram installed on machine
with apache + php, php would have persistent connection to this small
program troghout unix socket, and client authorization would be done by
this program. This program would have some pool of connection to
PostgreSQL server. So apache could have let's say 3000 persistent
connection to this small program, but this program would have 100
connection to PostgreSQL server and thats enought to process all
queries. If traffic increase, clients, are already connected to local
socket, and more new (tcp/ip) connection to server are made if
necessery.
The only trick is that pg_hba.conf of the PostgreSQL server would have:
host any connectmanager ip_addr netmask md5
And the autorization of the 10.000 clients would be done by small
program istalled on apache server.
I've never heard about souch a software ;)
What is a connection manager ?
greetings
Marek
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: franki@tpi.pl, mendola@bigfoot.com
Subject: Re: performance problem - 10.000 databases
In-Reply-To: <1067603494.22233.95.camel@franki-laptop.tpi.pl>
References: <1067594647.22286.57.camel@franki-laptop.tpi.pl> <3FA25062.9040900@bigfoot.com> <1067603494.22233.95.camel@franki-laptop.tpi.pl>
* 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