Query-Aware Database Proxy

db-proxy transparently splits reads and writes, load-balances replicas, and caches query results — built in-repo, replacing an external proxy previously used for this.

  • Transparent read/write splitting: writes route to the primary, reads to replicas, even for clients with no split logic of their own. Session state (`SET`/`PREPARE`/`DECLARE`/temp tables/open transactions) pins subsequent queries to the primary per connection.
  • Reads are load-balanced round-robin across all healthy replicas via an atomic counter that skips unhealthy ones.
  • Security/query filtering: SQL-injection heuristics plus per-tenant blocked/allowed resource enforcement on the live path, hot-reloadable.
  • High availability via blue/green primary switching and optional multi-write; a tenant-scoped, TTL’d, table-tag-invalidated Redis cache sits in front of query results.
  • Proxies MySQL, PostgreSQL, and Redis wire protocols; configuration (routes, security policy, cache policy) is dynamic, read from a Redis config bus and written by the manager service.

← Back to all features

Full technical documentation →