本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
監控作用中叢集
在 Amazon RDS for MySQL 中監控作用中叢集對於追蹤效能、複寫完整性和節點同步至關重要。您可以連線至叢集中的資料庫執行個體,並執行下列SQL命令來監控作用中叢集:
SELECT * FROM performance_schema.replication_group_members;
您的輸出應ONLINE
會顯示每個資料庫執行個體MEMBER_STATE
的 ,如下列範例輸出所示:
+---------------------------+--------------------------------------+----------------+-------------+--------------+-------------+----------------+----------------------------+
| CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION | MEMBER_COMMUNICATION_STACK |
+---------------------------+--------------------------------------+----------------+-------------+--------------+-------------+----------------+----------------------------+
| group_replication_applier | 9854d4a2-5d7f-11ee-b8ec-0ec88c43c251 | ip-10-15-3-137 | 3306 | ONLINE | PRIMARY | 8.0.35 | MySQL |
| group_replication_applier | 9e2e9c28-5d7f-11ee-8039-0e5d58f05fef | ip-10-15-3-225 | 3306 | ONLINE | PRIMARY | 8.0.35 | MySQL |
| group_replication_applier | a6ba332d-5d7f-11ee-a025-0a5c6971197d | ip-10-15-1-83 | 3306 | ONLINE | PRIMARY | 8.0.35 | MySQL |
+---------------------------+--------------------------------------+----------------+-------------+--------------+-------------+----------------+----------------------------+
3 rows in set (0.00 sec)
如需有關可能MEMBER_STATE
值的資訊,請參閱我的SQL文件中的群組複寫伺服器狀態