TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: PgDog, Load Balancer for PostgreSQL

2 pointsby levkk4 months ago
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 months ago
Looks interesting! Why did you decide to make a new one rather than improving pgCat?