Usually, first replication, then ProxySQL. But often the devs can optimize the app that uses it in parallel, eg. with caching some things in RAM, on disk or in redis or not selecting * when they only need two fields of the table etc..
this post was submitted on 02 May 2025
8 points (100.0% liked)
Database
159 readers
1 users here now
founded 5 years ago
MODERATORS
Places I have worked at have used sharding but that was kind of outside of my scope so I left it there.
At work we use maxscale, which acts as a proxy delegating traffic to multiple mariadb-nodes, with a single node acting as the primary handling the writes.
The other nodes are eventually consistent, so if you need to do write+read to the same node, things need to be wrapped in a transaction (or a hint needs to be added to the query specifying which node needs to handle the query).
We don't manage this ourselves, as we use a managed service for this, so no idea how complicated it is to manage.