TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: PgDog, Load Balancer for PostgreSQL

2 点作者 levkk4 个月前
Hi HN,<p>Another month on sabbatical, another Rust project for y&#x27;all to have fun with. This time, I decided to write a load balancer for PostgreSQL. It&#x27;s called pgDog, and it&#x27;s everything I learned about running Postgres at scale, in form of software.<p>pgDog can proxy hundreds of databases, split traffic between primaries and replicas, and reroute queries around hosts experiencing problems, like hardware failure. It speaks Postgres, so much like pgbouncer, and its &quot;spiritual predecessor&quot;, PgCat, it can pool transactions and allow tens of thousands of clients to use one database.<p>Support for more exciting features like sharding is on the roadmap, and with its very own plugin system, pgDog can be customized to arbitrarily send queries to any database in its configuration (or even block queries and return custom results). The plugins are shared libraries loaded at runtime, so they can be written in any language that can expose a C ABI, e.g. Rust, C++, Zig, Java, Go, Ruby, Python, etc.<p>Documentation is on <a href="https:&#x2F;&#x2F;pgdog.dev" rel="nofollow">https:&#x2F;&#x2F;pgdog.dev</a>. The project is of course free and open source software.<p>Cheers!<p>P.S. It&#x27;s still early days, so if you decide to give pgDog a try in your infra, do run a few load tests first!

1 comment

atombender4 个月前
Looks interesting! Why did you decide to make a new one rather than improving pgCat?