Re: How to keep queries low latency as concurrency increases

From: "Kevin Grittner" <kgrittn(at)mail(dot)com>
To: sthomas(at)optionshouse(dot)com
Cc: "Catalin Iacob" <iacobcatalin(at)gmail(dot)com>,pgsql-performance(at)postgresql(dot)org
Subject: Re: How to keep queries low latency as concurrency increases
Date: 2012-10-30 20:07:42
Message-ID: 20121030200742.306930@gmx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Shaun Thomas wrote:
> On 10/30/2012 06:55 AM, Kevin Grittner wrote:

>> Is there a good transaction-based connection pooler in Python?
>> You're better off with a good pool built in to the client
>> application than with a good pool running as a separate process
>> between the client and the database, IMO.
>
> Could you explain this a little more? My experience is almost
> always the exact opposite, especially in large clusters that may
> have dozens of servers all hitting the same database. A
> centralized pool has much less duplication and can serve from a
> smaller pool than having 12 servers each have 25 connections
> reserved in their own private pool or something.
>
> I mean... a pool is basically a proxy server. I don't have 12
> individual proxy servers for 12 webservers.

Sure, if you have multiple web servers and they are not routing
their database requests through a common "model" layer, an external
pooler would make sense. Most of the time I've dealt either with one
web server or multiple servers routing requests at the transaction
level to a single JVM which ran the logic of the transaction --
either of which is a good place to have a connection pool. A dozen
different JVMs all making JDBC requests does kind of beg for an
external layer to concentrate the requests; if it isn't something
that's running the transaction layer, a connection pooler there
would be good.

-Kevin

Browse pgsql-performance by date

  From Date Subject
Next Message Jon Nelson 2012-10-30 21:31:20 Re: set-returning calls and overhead
Previous Message Petr Praus 2012-10-30 19:44:53 Re: Increasing work_mem and shared_buffers on Postgres 9.2 significantly slows down queries