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
 

What are your strategies when a MySQL/MariaDB database server grows to have too much traffic for a single host to handle, i.e. scaling CPU/RAM is not an option anymore? Do you deploy ProxySQL to start splitting the traffic according to some rule to two different hosts? What would the rule be, and how would you split the data? Has anyone migrated to TiDB? In that case, what was the strategy to detect if the SQL your app uses is fully compatible with TiDB?

you are viewing a single comment's thread
view the rest of the comments
[–] zombaya01@lemmy.world 1 points 2 months ago

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.