Hacker News new | ask | show | jobs
by simonw 430 days ago
"Tables (apps) are never really split up. Even in the perfect world, two apps developed by the same company will need to talk to each other"

I don't understand why this sentence appears to treat "tables" and "apps" as the same concept. Is this a use of the term "app" that I'm not familiar with?

---

TLDR of this post is that it's promoting a new open source (AGPL) horizontal sharding solution for PostgreSQL called PgDog: https://github.com/pgdogdev/pgdog

Looks like the trick this one uses is to parse your SQL queries inside a custom router/load-balancer and redirect them based on introspecting the WHERE clause of a SELECT/UPDATE/DELETE or the VALUES clause of an INSERT to identify sharding keys: https://docs.pgdog.dev/features/sharding/query-routing/

1 comments

There was a MySQL proxy a decade or two ago that did that.
Do you mean this one? https://github.com/mysql/mysql-proxy

It let you do all sorts of clever tricks with Lua scripting, though oddly enough it looks like the repo was archived back in 2024 (and the last commit to it was 11 years ago), and the linked docs on https://dev.mysql.com/doc/mysql-proxy/en/ are a 404 now.

MySQL also has https://github.com/vitessio/vitess which is alive and well.