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?

  • kaotic@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    2 days ago

    I work for a company that handles this In a few ways. We set up read replicas to handle large read queries. To offload the reads from the primary server. Data is replicated to the read replicas so reporting can be run from that server. And not add load to the primary server.

    The second approach is sharding. Sharding breaks a large table into smaller, more manageable chunks, distributing them across systems. This reduces the burden on any one server, improves performance, and enables scaling out as data or traffic increases.

  • MNByChoice@midwest.social
    link
    fedilink
    arrow-up
    0
    ·
    2 days ago

    A common approach is something like a UV 3000.

    Likely not what you want, but it is important to remember that there are ways to solve it with money.

    • Otto@programming.devOP
      link
      fedilink
      arrow-up
      0
      ·
      2 days ago

      By UV 3000 you probably don’t mean the ultraviolet lamp that is the first page of Google is full of when searching with this term…? I doubt UV - whatever it is - is a common approach.

  • bremen15@feddit.org
    link
    fedilink
    arrow-up
    0
    ·
    2 days ago

    That depends entirely on your load. A common approach is sharding. Often memcache can help, too.