Updated on 2024-06-18 GMT+08:00

Instance Usage Suggestions

DB Instances

  • Primary/Standby
    • A primary/standby pair provides an HA architecture.
    • When a primary instance is being created, a standby instance is provisioned along with it to provide data redundancy. The standby instance is invisible to you after being created.
    • If a failover occurs due to a primary instance failure, your database client will be disconnected for a short period of time. The client needs to be able to reconnect to the instance.
  • Single
    • A single-node architecture is used.
    • If a fault occurs on a single instance, the instance cannot recover in a timely manner.

Database Connection

  • Set database parameters based on the complexity of your workloads.
  • Keep an appropriate number of active connections.
  • Periodically release persistent connections because maintaining them may generate a large cache and use up memory.

Reliability and Availability

  • Select primary/standby DB instances for production databases.
  • Select an instance class and storage space appropriate to your workloads.

Backup and Restoration

  • To prevent backup failures, perform manual backups during off-peak hours.
  • Both automated and manual backups are deleted after your instance is unsubscribed from.

Routine O&M

  • Periodically check slow query logs and error logs to identify problems in advance.
  • Monitor instance metrics. If any metric is beyond its expected range, address related issues as soon as possible.
  • Run the SELECT statement before deleting or modifying a record.

Security

  • Prevent your instance from being accessed from the Internet. If you want to allow the access from the Internet, bind an EIP to your instance.