Облачная платформаAdvanced

Elasticsearch Cluster Access Methods

Эта статья полезна?

There are many ways to connect to an Elasticsearch cluster. Select the most appropriate access method based on the programming language you prefer. The various access methods support different types of network configurations. The cluster access addresses vary depending on the network configuration you choose. Select an appropriate network configuration method based on your network environment.

Access Methods

Table 1 Cluster access methods

Access Method

Scenario

Details

Kibana (recommended)

  • A graphical user interface
  • Instance monitoring
  • Data management

Language-irrelevant

Cerebro

Open-source Elasticsearch API

Run Curl commands to access and manage Elasticsearch clusters.

Java

Use Java to access and manage Elasticsearch clusters.

To avoid compatibility issues, use the Java client that matches your Elasticsearch cluster version.

Python

Use Python to access and manage Elasticsearch clusters.

MRS Hive

Use the Elasticsearch-Hadoop (ES-Hadoop) connector of MRS to access and manage Elasticsearch clusters using Hive.

Go

Use Go to access and manage Elasticsearch clusters.

LDAP Authentication

Enable Lightweight Directory Access Protocol (LDAP) authentication for an Elasticsearch cluster.

Network Configuration

Configure the network of the Elasticsearch cluster, and ensure that you have a server that can connect to the cluster's network. Obtain the cluster access address based on the selected network. Use this address to access the cluster.

Table 2 Network configuration for the cluster

Network Environment

Access Method

Scenario

Details

Private network

Private IP address

Obtain the private IP address of each node in the cluster and access the cluster by connecting to one of these IP addresses.

How to obtain:

  1. Log in to the CSS management console.
  2. In the navigation pane on the left, choose Clusters > Elasticsearch.
  3. In the cluster list, obtain the target cluster's private IP address from the Private IP Address column. Generally, the IP address format is <host>:<port> or <host>:<port>,<host>:<port>.

    If the cluster has only one node, the IP address and port number of this single node are displayed, for example, 10.62.179.32:9200. If the cluster has multiple nodes and all of them are data nodes, the IP addresses and port numbers of all these nodes are displayed; if some of them are client nodes, only the IP addresses and port numbers of these client nodes are displayed; for example, 10.62.179.32:9200,10.62.179.33:9200.

This is the default method.

Private network

Private IP address of a dedicated load balancer

Associate a dedicated load balancer with the cluster to enable access through the private IP address of this dedicated load balancer.

How to obtain:

  1. Log in to the CSS management console.
  2. In the navigation pane on the left, choose Clusters > Elasticsearch.
  3. In the cluster list, click the name of the target cluster. The cluster information page is displayed.
  4. Choose Cluster Access > Load Balancing. On the Elasticsearch tab, find and record the private or public IP address of the target load balancer.

Public network

Public IP address

Enable public network access for a security-mode cluster that uses HTTPS, and configure a whitelist for access control. The cluster can be accessed from the public network via its public IP address.

How to obtain:

  1. Log in to the CSS management console.
  2. In the navigation pane on the left, choose Clusters > Elasticsearch.
  3. In the cluster list, click the name of the target cluster. The cluster information page is displayed.
  4. Click the Overview tab. In the Configuration area, find and record the IP address used for public network access.

Public network

Public IP address of a dedicated load balancer

Associate with the cluster a dedicated load balancer configured with an EIP to enable access through the public IP address of this dedicated load balancer.

How to obtain:

  1. Log in to the CSS management console.
  2. In the navigation pane on the left, choose Clusters > Elasticsearch.
  3. In the cluster list, click the name of the target cluster. The cluster information page is displayed.
  4. Choose Cluster Access > Load Balancing. On the Elasticsearch tab, find and record the private or public IP address of the target load balancer.