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.

- name: local
  enabled: true
- name: dev
  enabled: true
    username: elastic
    password: pass
- name: prod
  enabled: true
    enabled: true
      enabled: true
      interval: 10s
    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 #

namestringName of an Elasticsearch cluster
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
request_compressboolWhether to enable Gzip compression
basic_authobjectAuthentication information
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.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