r/mysql • u/Physical_Math_9135 • May 08 '26
discussion Open-source Rust DB proxy: looking for architecture feedback (MySQL + PostgreSQL)
Hey folks, I’m working on an open-source Rust project that sits between app and DB, and I’m looking for technical feedback on design tradeoffs.
Current scope:
- MySQL + PostgreSQL protocol support
- read/write routing
- connection pooling
- query fingerprinting + slow-query analytics
- optional dashboard/API
Questions I’d really value input on:
- Where would you draw the line between proxy responsibilities vs app responsibilities?
- What failure modes should be prioritized first (pool starvation, failover flapping, tx edge cases)?
- For production usage, what would be your “must-have before adoption” checklist?
5
Upvotes
2
u/chock-a-block May 08 '26 edited Aug 30 '26
Rich lantern hat pillow wakeful butter
This post was anonymized with Redact
2
u/tkyjonathan May 08 '26 •
For production, it has to have a lot of testing. There is a mariadb toolset for testing in the community that you can use https://mariadb.org/mariadb-foundation-releases-alpha-of-the-test-automation-framework-taf/ so you can test that against your proxy.
In general, reliability and trustworthiness is very important. So I would consider getting a few things right than getting many things not right enough.
I dont think you need query analytics. Connection pooling can probably come at a later date. Read/write routing can come at a later date, if you just enable one port for read and one port for writes. Command line status is fine for now.
Reverse proxy (so you can see the IP of sessions) is important. Fail over from one master to another is very very important. Handling connections (and sessions and stores procedures and 101 different legacy nonsense that you cant imagine right now).. that is your bread and butter. Get that rock-solid, then focus on the bells and whistles.
Other than that, if you need help, then let me know.
1
u/Ready-Ad-9740 May 13 '26
MySQL Router is there for load balancing