Skip to main content

Connect to Clusters

Use a Dedicated cluster endpoint when your application needs the full Collection API, including schema management, insert, upsert, delete, search, query, and hybrid search.

📘Note

This page demonstrates how to connect to a Dedicated serving cluster. To connect to a Free or Serverless cluster, see Free & Serverless Clusters. For on-demand compute over a project endpoint, see Connect for On-Demand Search.

Endpoint formats

Cluster typeEndpoint patternNotes
Dedicatedhttps://{cluster-id}.{region}.vectordb.zillizcloud.com:19530Dedicated clusters use the real-time serving endpoint with port 19530.

Before you begin

Before connecting to a Dedicated cluster, ensure that:

  • You have registered an account with Zilliz Cloud. For details, see Register with Zilliz Cloud.

  • You have created a Dedicated cluster.

  • You have installed a Milvus SDK for your use case. For details, refer to Install SDKs.

  • You have the cluster public endpoint.

  • You have an authentication token. This can be an API key with access to the target cluster or a cluster credential in username:password format.

You can obtain the cluster public endpoint from the Zilliz Cloud console. Navigate to the Cluster Details page of the target cluster. On the Connect card, copy the cluster public endpoint.

📘Note

If you use RESTful APIs instead of SDKs, a continuous connection is not established because HTTP follows a request-response communication model.

Install SDKs

Install the SDK for your application language.

bash
pip install pymilvus

For Java, Node.js, and Go projects, install the corresponding Milvus SDK in your project before using the examples below.

Connect to a Dedicated cluster

Use the cluster endpoint and token consistently across SDKs. YOUR_CLUSTER_ENDPOINT is the public endpoint copied from the cluster Connect card, and YOUR_CLUSTER_TOKEN is either an API key with access to the target cluster or a cluster credential in username:password format.

python
from pymilvus import MilvusClient

CLUSTER_ENDPOINT = "YOUR_CLUSTER_ENDPOINT"
TOKEN = "YOUR_CLUSTER_TOKEN"

client = MilvusClient(
uri=CLUSTER_ENDPOINT,
token=TOKEN,
)

Verify the connection

After connecting with an SDK, run a lightweight operation such as listing collections.

python
collections = client.list_collections()
print(collections)

Next steps

Once connected, use the same client instance to create collections, load data, and run real-time search or query operations against the Dedicated cluster.

For Free or Serverless serving clusters, see Free & Serverless Clusters. For on-demand compute through a project endpoint, see Connect for On-Demand Search.

Ctrl I