ApsaraDB MyBase for MySQL Master-replica Edition supports multiple types of architectures, including the architecture that contains one primary instance and multiple read-only instances. You can create up to five read-only instances for an ApsaraDB MyBase for MySQL Master-replica Edition instance. This topic describes three common architectures and also describes how to create instances for these architectures.
Prerequisites
ApsaraDB MyBase for MySQL hosts are created. For information about how to create a host, see Create a host in an ApsaraDB MyBase for MySQL dedicated cluster.Architectures
Architecture | Description | Advantages and disadvantages | Scenarios |
---|---|---|---|
Single node | This architecture contains only one primary instance and no read-only instances. |
|
|
Two nodes | This architecture contains one primary instance and one read-only instance. | Advantages:
Note After the previous primary instance fails to run as expected, all read traffic is allocated to the new primary instance. If the read traffic is high, the new primary instance may become unavailable. |
|
Three nodes | This architecture contains one primary instance and two read-only instances. |
|
|
Create an instance
- In the left-side navigation pane, choose .
- Click Create Instance. The following list describes how to create a single-node instance, a dual-node instance, and a triple-node instance.
- Create a single-node instance. In the Create Instance panel, specify Standalone as the architecture type of the instance.
- Create a dual-node instance. The following table describes how to configure the Recommended Architecture and Read-only Instance parameters to create a dual-node instance.
Parameter Description Recommended Architecture Select Master-replica. Read-only Instance Specify the zone where you want to deploy the read-only instance, a vSwitch, and whether to enable the automatic failover feature. To ensure the high availability of your service and to perform dual-data center disaster recovery, we recommend that you configure the read-only instance based on the following suggestions: - Zone: Specify a zone that is different from the zone of the primary instance.
- Failover: Use the default configuration. The failover feature is enabled.
- Create a triple-node instance. The following table describes how to configure the Recommended Architecture and Read-only Instance parameters to create a triple-node instance.
Parameter Description Recommended Architecture Select Master-replica. Read-only Instance Create two read-only instances. You can click Create Read-Only Instance to add a read-only instance. Specify a zone and a vSwitch, and configure the Failover parameter for each read-only instance. To ensure the high availability of your service and to perform triple-data center disaster recovery, we recommend that you configure the read-only instances based on the following suggestions: - Zone: Specify different zones for different instances. Note You can create up to five read-only instances in three zones for an ApsaraDB MyBase for MySQL Master-replica Edition instance.
- Failover: Enable the failover feature for one read-only instance and disable this feature for the other read-only instance.
Note We recommend that you configure the read and write weights for the primary and read-only instances based on the information that is described in the following list:- Distribute 20% to 25% of the read traffic to the read-only instance for which the failover feature is enabled.
- Distribute more than 75% of the read traffic to the read-only instance for which the failover feature is not enabled.
- Distribute less than 10% of the read traffic to the primary instance.
- Zone: Specify different zones for different instances.
Note For information about how to configure parameters to create an instance, see Create an ApsaraDB MyBase for MySQL instance. - Click Create.After the instance is created, you can go to the instance details page and click Service Availability in the left-side navigation pane to view the topology of the instance. For information about how to view the topology of an instance, see View the topology of an instance.Note You can view the status of the instance by choosing.
- Sample topology of a single-node instance
- Sample topology of a dual-node instance
- Sample topology of a triple-node instance