Elasticsearch

Elasticsearch #

Defining a Resource #

INFINI Gateway supports multi-cluster access and different versions. Each cluster serves as one Elasticsearch back-end resource and can be subsequently used by INFINI Gateway in multiple locations. See the following example.

elasticsearch:
- name: local
  enabled: true
  endpoint: https://127.0.0.1:9200
- name: dev
  enabled: true
  endpoint: https://192.168.3.98:9200
  basic_auth:
    username: elastic
    password: pass
- name: prod
  enabled: true
  endpoint: http://192.168.3.201:9200
  discovery:
    enabled: true
    refresh:
      enabled: true
      interval: 10s
  basic_auth:
    username: elastic
    password: pass

The above example defines a local development test cluster named local and a development cluster named dev. Authentication is enabled in the development cluster, in which corresponding usernames and passwords are also defined. In addition, one production cluster named prod is defined, and the auto node topology discovery and update of the cluster are enabled through the discovery parameter.

Parameter Description #

NameTypeDescription
namestringName of an Elasticsearch cluster
projectstringproject name
location.providerstringthe service provider region info of the cluster
location.regionstringthe region info of the cluster
location.dcstringthe data center info of the cluster
location.rackstringthe rack info of the cluster
labelsmapcluster labels
tagsarraycluster tags
enabledboolWhether the cluster is enabled
endpointstringElasticsearch access address, for example, http://localhost:9200
endpointsarrayList of Elasticsearch access addresses. Multiple entry addresses are supported for redundancy.
schemastringProtocol type: http or https
hoststringElasticsearch host, in the format of localhost:9200. Either the host or endpoint configuration mode can be used.
hostsarrayElasticsearch host list. Multiple entry addresses are supported for redundancy.
request_timeoutintRequest timeout duration, in seconds, default 30
request_compressboolWhether to enable Gzip compression
basic_authobjectAuthentication information
basic_auth.usernamestringUsername
basic_auth.passwordstringPassword
discoveryobjectCluster discovery settings
discovery.enabledboolWhether to enable cluster topology discovery
discovery.refreshobjectCluster topology update settings
discovery.refresh.enabledboolWhether to enable auto cluster topology update
discovery.refresh.intervalstringInterval of auto cluster topology update
traffic_controlobjectNode-level overall traffic control of the cluster
traffic_control.enabledboolWhether to enabled traffic control
traffic_control.max_bytes_per_nodeintMaximum allowable number of request bytes per second
traffic_control.max_qps_per_nodeintMaximum allowable number of requests per second, regardless of read or write requests
traffic_control.max_connection_per_nodeintMaximum allowable number of connections per node
traffic_control.max_wait_time_in_msintIn case of throttled, the maximum allowable waiting time in ms, the default is 10000
allow_access_when_master_not_foundboolStill allow access to visit this elasticsearch when it is in error master_not_discovered_exception , default value is false
Edit Edit this page