Updated on 2023-10-19 GMT+08:00

Description of Each IP Address

If you create a GaussDB(for MySQL) instance with one primary node and a read replica, there are up to four different IP addresses.

If you connect your application to a node of the DB instance through a private IP address for read and the node becomes faulty, the IP address cannot be accessed before the fault is rectified.

  1. Private IP address for read of the primary node (not recommended)

    After a DB instance is created, the system assigns a private IP address for read to the primary node. If your applications are deployed on a server that is in the same VPC as the DB instance, you can use the IP address to connect to the instance for read and write operations. But if a failover occurs and the primary node becomes a read replica, the IP address can only be used for read operations.

  2. Private IP address for read of a read replica (not recommended).

    After a DB instance is created, the system assigns a private IP address to the read replica. If your applications are deployed on a server that is in the same VPC as the DB instance, you can use this IP address to connect to the instance for read operations. But if a failover occurs and the read replica is promoted to primary, the IP address can be used for read and write operations.

  3. Private IP address

    After a DB instance is created, the system assigns a private IP address to the primary node. If your applications are deployed on a server that is in the same VPC as the DB instance, you can use the IP address to connect to the instance for read and write operations. But this IP address is always bound to the primary node. If a failover occurs, the IP address is reassigned to the new primary node, and can then still be used for read and write operations.

  4. Public IP address (EIP)

    After you buy a DB instance, you can bind an EIP to the instance to enable public accessibility, but can also unbind it later if needed. Just like a private IP address, an EIP is always bound to the primary node for read and write operations.

Failover

By default, a GaussDB(for MySQL) instance contains at least two nodes, one primary node (read/ write node) and one read replica (only-read node). You can create multiple read replicas if needed.

If the primary node becomes faulty, the system promotes a read replica to primary and demotes the primary node to read replica status.