Multi-master cluster (Limitless)

更新时间:
复制 MD 格式

PolarDB for MySQL Multi-master Cluster (Limitless) upgrades the single-writer, multiple-reader architecture to support multiple writers and readers through multiple primary nodes. It targets high-concurrency read/write workloads such as multi-tenant SaaS, online gaming, and e-commerce.

Note

Join our DingTalk group for Multi-master Cluster (Limitless) support. You can @mention an expert in the group.

DingTalk Group ID: 36005007387

The following figure shows the architecture of Multi-master Cluster (Limitless) Edition.multi-master architecture

When you connect through the cluster endpoint, PolarProxy routes SQL statements to the correct primary node.

Core advantages

  • Write scale-out in seconds

    Concurrent data writes to databases on up to 63 compute nodes are supported. Dynamic failover of nodes for databases can be implemented within seconds to improve the overall concurrent read and write capabilities of clusters.

  • Multiple-mater backup (no read-only nodes).

    If a primary node fails, failover to another low-traffic primary node can be implemented in seconds. The costs are halved because no additional idle resources are deployed for hot standby.

  • Global read-only nodes

    You can read data from all write nodes on global read-only nodes, which facilitates processing aggregation database requests. For more information, see Global read-only nodes.

Scenarios

Multi-master Cluster (Limitless) Edition is suitable for scenarios such as multitenancy in SaaS, gaming, and e-commerce. These scenarios feature high-concurrency read and write requests.

  • Multitenancy in SaaS: high concurrency and load balance between tenants

    Scenario: The number of databases of tenants rapidly changes, and the load volume undergoes substantial changes. Users must schedule database resources among different instances to deliver optimal experience.

    Solution: Multi-master Cluster (Limitless) Edition helps customers switch between different primary nodes of databases of tenants or add new primary nodes in seconds to process burst traffic. This implements load balancing.

  • Global gaming server and e-commerce scenarios: scaling in minutes to cater to fast-growing business requests

    Scenario: The middleware-based or business-based database and table sharding solution is often used. During version updates and major promotions, sharp scale-out of cluster capacity is required. Quick scale-in is necessary when version updates and major promotions end. However, the scaling of traditional clusters involves complex steps for data migration.

    Solution: The scale-out in seconds and transparent routing features of Multi-master Cluster (Limitless) Edition can be used together with the middleware-based or business-based database and table sharding solution to shorten the scale-out process from several days to several minutes.

  • Gaming applications deployed on different servers: better performance and scalability

    Scenario: During the growth period of a game, database loads are heavy and feature continual increase. During this period, the number of databases keeps growing. As a result, the loads of primary nodes also increase. During the decline period of a game, database loads are significantly reduced, and databases are merged. As a result, the loads of primary nodes are also decreased.

    Solution: During the growth period, you can switch some databases to new primary nodes to implement load balance. During the decline period, you can aggregate databases to a few primary nodes to reduce operating costs.

Limitations

  • The database engine must be MySQL 8.0.

  • You cannot directly convert a Cluster edition cluster to a Multi-master Cluster (Limitless) cluster. To upgrade the cluster's product edition, see Major version upgrade.

Performance improvement

After tests, the overall concurrent read and write capabilities of a cluster show a linear increase because the databases of the cluster are switched to more primary nodes. The following code snippet provides an example of stress testing:

  • Test background: The cluster contains eight databases and eight primary nodes.

  • Test procedure: At the beginning of a test, eight databases share one primary node. Data is synchronized to all databases at the same time to perform the same stress test. During the stress testing period, eight databases are scheduled to two primary nodes, four primary nodes, and eight primary nodes respectively. View the change trend of the overall performance of the cluster.

  • The following figure shows the change trend of QPS.performanceimprove

In the preceding figure, as databases are scheduled to more primary nodes, the overall concurrent read and write capabilities of the cluster are significantly improved and show a linear increase.

Node specifications and billing

Get started

  1. Purchase a Multi-master Cluster (Limitless) cluster.

  2. Configure basic settings: create a database account, configure the cluster whitelist, and connect to the database.

  3. Create a database.

    In a Multi-master Cluster (Limitless), each database or data object routes writes through a single node. When creating a database, specify a primary node or set loose_innodb_mm_default_master_id to 0 to let the system randomly select a primary node.

  4. Query data with SELECT statements.

    PolarProxy routes queries to the correct primary node automatically. No node specification is needed.

Usage notes.