Re: Millisecond-precision connect_timeout for libpq - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: Millisecond-precision connect_timeout for libpq
Date
Msg-id 51D72632.2090604@agliodbs.com
Whole thread Raw
In response to Millisecond-precision connect_timeout for libpq  (ivan babrou <ibobrik@gmail.com>)
Responses Re: Millisecond-precision connect_timeout for libpq
Re: Millisecond-precision connect_timeout for libpq
List pgsql-hackers
On 07/05/2013 12:26 PM, Tom Lane wrote:
> ivan babrou <ibobrik@gmail.com> writes:
>> If you can figure out that postgresql is overloaded then you may
>> decide what to do faster. In our app we have very strict limit for
>> connect time to mysql, redis and other services, but postgresql has
>> minimum of 2 seconds. When processing time for request is under 100ms
>> on average sub-second timeouts matter.
> 
> If you are issuing a fresh connection for each sub-100ms query, you're
> doing it wrong anyway ...

It's fairly common with certain kinds of apps, including Rails and PHP.This is one of the reasons why we've discussed
havinga kind of
 
stripped-down version of pgbouncer built into Postgres as a connection
manager.  If it weren't valuable to be able to relocate pgbouncer to
other hosts, I'd still say that was a good idea.

Ivan would really strongly benefit from running pgbouncer on his
appservers instead of connecting directly to Postgres.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Millisecond-precision connect_timeout for libpq
Next
From: Noah Misch
Date:
Subject: Re: sepgsql and materialized views