Search code examples
mysqldatabasedistributed

Is MySQL a Distributed Database by Design


Is MySQL a database that (1) can be configured via increasing the number of replicas (2) without losing the ability to be updated anywhere and stay in sync everywhere.

In other words, is MySQL distributed by design or is it something that lives on a single machine and if I want to scale horizontally, I would have to do manual work like implement sharding/consistent hashing?


Solution

  • Is MySQL a Distributed Database by Design

    No. MySQL is a centralized database by design.

    Is MySQL a database that (1) can be configured via increasing the number of replicas (2) without losing the ability to be updated anywhere and stay in sync everywhere.

    Also no. MySQL replication generally depends on a master-slave architecture. Under this architecture, all writes must be applied through the (single) master, so there is no "ability to be updated everywhere". Multi-master architectures are possible, but only on a limited scale, and even then only with significant caveats.