大网数据广告活动
服务器运维问答

pgbouncer:is it OK putting on localhost or it's better on another server?

· 52CE 我爱测

I'm about to migrate my (tiny) server farm to Google Cloud Platform and so giving the architecture a small restyling. One of the changes I'm about to commit is the introduction of pgBouncer, to manage pooling (ATM I'm having only…

问题原文

原帖链接 · Morenz · CC BY-SA 3.0

I'm about to migrate my (tiny) server farm to Google Cloud Platform and so giving the architecture a small restyling. One of the changes I'm about to commit is the introduction of pgBouncer, to manage pooling (ATM I'm having only one DB server with Debian Jessie).

But I cant' find anywhere (or I need improving my Googling skills :-) ) this kind of information:

If I install pgBouncer on the same machine where PostgreSQL runs, will it impact performance? (my primary concerns are about I/O, while CPU and memory can always be improved). Is it better to install it somewhere else?

Thanks in advance

已采纳解答

原帖链接 · Craig Miskell · CC BY-SA 3.0

Unless you're on the very extremes of performance requirements (or on woefully underpowered hardware), I wouldn't expect running pgbouncer on the DB server would be noticeable. However, what you might like to consider is the network connection between the DB clients and the server. Specifically, if you put pgbouncer on the client, then it will make the 'over-the-network' connections to the DB server and keep them alive avoiding repeated TCP handshakes, and the client will then be making a really quick local connection to pgbouncer. If you put pgbouncer on the DB server, then there is no advantage network connection-wise (the client has to make a TCP connection to the remote DB server), and all pgbouncer is doing is being a connection pool.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-02-23)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。