Connect to the instance

Updated at:
Copy as MD

TSDB exposes an HTTP API compatible with the OpenTSDB protocol. Before your application can read or write data, it must connect to the instance over a Virtual Private Cloud (VPC) network or a public network. VPC is the default connection type — Alibaba Cloud provisions a VPC access link for every TSDB instance automatically.

For public network access, see Network connection.

Prerequisites

Before you begin, ensure that you have:

  • A TSDB instance

  • The IP address of the connecting host, to add to the IP address whitelist

Connect over a VPC network

Step 1: Configure the IP address whitelist and get the VPC network address

The VPC network address is only displayed after you configure an IP address whitelist. The whitelist controls which hosts can access the instance.

  1. In the TSDB console, go to the Instance Details page of your instance.

  2. In the Basic Information section, locate the VPC Network Address field.

    • If the whitelist is already configured, the VPC network address (domain name and port) is displayed in the field.

    • If the whitelist is not yet configured, click Set the IP address whitelist and add the IP addresses of hosts that are allowed to access the instance. After saving, the VPC network address appears automatically.

Step 2: Connect your application to the instance

Use the VPC network address — which includes the domain name and port — as the endpoint in your API calls. TSDB accepts HTTP requests in the OpenTSDB protocol format.

The connection string follows this pattern:

http://<vpc-network-address>:<port>

Replace the placeholders with your actual values:

PlaceholderDescriptionWhere to find it
<vpc-network-address>Domain name of the VPC network addressInstance Details page, Basic Information section
<port>Port number included in the VPC network addressSame location as the domain name

Once connected, your application can issue HTTP read and write requests against the instance.

Troubleshooting

Connection timed out

If your application receives a Connection timed out error, the connecting host is not in the same VPC as the instance.

  • Same region as the instance: Add the host to the VPC where the instance is located.

  • Different region from the instance: Use the ClassLink feature to create a channel between the classic network and the VPC.

What's next

  • Network connection — Set up public network access when your application cannot reach the instance over a VPC.