본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

Remote Cluster Information API (원격 클러스터 정보 API)

원문 보기 위키 갱신

Remote Cluster Information API는 로컬 클러스터에 설정된 모든 원격 OpenSearch 클러스터의 연결 정보를 가져오는 API예요. 연결 상태를 확인하거나, 연결 모드(sniff 또는 proxy)를 조사하거나, 크로스-클러스터 검색 설정의 타임아웃 설정을 검토할 때 사용하면 됩니다.

이 응답은 _cluster/settings 호출보다 더 상세해요. _cluster/settings는 클러스터 별칭과 시드 노드 주소만 반환하지만, 이 API는 활성 연결 수, 연결 모드, 크로스-클러스터 검색 중 사용 불가능한 클러스터를 건너뛸지 여부까지 추가로 알려줍니다.

출처: OpenSearch 문서

본문

Endpoints

GET /_remote/info

Example request

다음 예제는 설정된 모든 원격 클러스터에 대한 정보를 가져옵니다.

REST Python

GET /_remote/info

Copy Copy as cURL

response = client.cluster.remote_info()

Copy

Example response

원격 클러스터가 설정되어 있지 않으면 응답은 빈 객체입니다.

{ }

하나 이상의 원격 클러스터가 sniff 모드로 설정되어 있으면 응답에는 클러스터 별칭을 키로 하는 연결 정보가 포함됩니다.

{
"opensearch-cluster2": {
"connected": true,
"mode": "sniff",
"seeds": [
"172.28.0.2:9300"
],
"num_nodes_connected": 1,
"max_connections_per_cluster": 3,
"initial_connect_timeout": "30s",
"skip_unavailable": false
}
}

원격 클러스터가 proxy 모드로 설정되어 있으면 응답에는 시드 노드 정보 대신 프록시 전용 필드가 포함됩니다.

{
"opensearch-cluster3": {
"connected": true,
"mode": "proxy",
"proxy_address": "192.168.1.50:9443",
"num_proxy_sockets_connected": 5,
"max_proxy_socket_connections": 18,
"initial_connect_timeout": "30s",
"skip_unavailable": true
}
}

Response body fields

응답은 각 키가 원격 클러스터 별칭인 JSON 객체예요. 다음 표는 각 클러스터 항목 안의 필드를 설명합니다.

| Field | Data type | Description | | connected | Boolean | Indicates whether at least one active connection exists to the remote cluster. | | mode | String | The connection mode configured for the remote cluster. Valid values are sniff (discovers nodes through seed addresses) and proxy (routes all requests through a single proxy address). | | initial_connect_timeout | String | The timeout duration for establishing the initial connection to the remote cluster. | | skip_unavailable | Boolean | Indicates whether the remote cluster is skipped when it is unreachable during a cross-cluster search request. When true, the search returns results from available clusters only. When false, the entire search request fails if this cluster is unavailable. | 다음 필드들은 mode가 sniff일 때만 나타납니다.

| Field | Data type | Description | | seeds | Array of strings | The initial seed transport addresses used to discover nodes in the remote cluster. | | num_nodes_connected | Integer | The number of nodes in the remote cluster to which the local cluster currently has open connections. | | max_connections_per_cluster | Integer | The maximum number of connections the local cluster maintains to the remote cluster. | 다음 필드들은 mode가 proxy일 때만 나타납니다.

| Field | Data type | Description | | proxy_address | String | The address (host and port) through which all connections to the remote cluster are routed. | | num_proxy_sockets_connected | Integer | The number of socket connections currently open to the proxy address. | | max_proxy_socket_connections | Integer | The maximum number of socket connections allowed to the proxy address. |

더 알아보기 (Learn more)

크로스-클러스터 검색을 운영 중이라면 원격 클러스터의 연결 상태를 주기적으로 확인하는 게 좋아요. sniff 모드는 시드 주소를 통해 노드를 자동으로 발견하고, proxy 모드는 단일 프록시 주소로 모든 요청을 라우팅합니다. 연결 모드 차이를 이해하면 분산 환경에서 장애를 더 빨리 진단할 수 있습니다.