Updated on 2022-06-21 GMT+08:00

Connecting a Database

The following table lists the common methods for connecting to a DDS instance.

Table 1 Connection methods

Method

IP Address

Scenario

Description

Private network connection (recommended)

Private IP address

DDS provides a private IP address by default.

  • If your applications are deployed on ECS and located in the same region, AZ, and VPC subnet as the DB instance, you are advised to use a private IP address to connect to the DB instance.
  • By default, a DDS instance is not accessible from an ECS in a different security group. Add an inbound rule to the DDS security group to allow access of the ECS.
  • The default DDS port is 8635. You can change it if you want to access DDS through another port.

Secure and excellent performance

Public network connection

EIP

  • If your applications are running on an ECS that is in a different region from the one where the DDS instance is located, use an EIP to connect the ECS to your DDS instances.
  • If your applications are deployed on other cloud platforms, EIP is recommended.

Low security

Application connection

Private IP address

Connect to the database using different applications.