Hi HN,<p>Another month on sabbatical, another Rust project for y'all to have fun with. This time, I decided
to write a load balancer for PostgreSQL. It's called pgDog, and it'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 "spiritual predecessor", 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://pgdog.dev" rel="nofollow">https://pgdog.dev</a>. The project is of course free and open source software.<p>Cheers!<p>P.S. It's still early days, so if you decide to give pgDog a try in your infra, do run a few load tests first!