bulk_request_throttle

bulk_request_throttle #

Description #

bulk_request_throttle 过滤器用来对 Elasticsearch 的 Bulk 请求进行限速。

Configuration Example #

A simple example is as follows:

flow:
  - name: bulk_request_mutate
    filter:
      - bulk_request_throttle:
          indices:
            test:
              max_requests: 5
              action: drop
              message: "test writing too fast。"
              log_warn_message: true
            filebeat-*:
              max_bytes: 512
              action: drop
              message: "filebeat indices writing too fast。"
              log_warn_message: true

Parameter Description #

NameTypeDescription
indicesmapThe indices which wanted to throttle
indices.[NAME].intervalstring评估限速的单位时间间隔,默认为 1s
indices.[NAME].max_requestsintMaximum request count limit in the interval
indices.[NAME].burst_requestsintBurst request count limit in the interval
indices.[NAME].max_bytesintMaximum request traffic limit in the interval
indices.[NAME].burst_bytesintBurst request traffic limit in the interval
indices.[NAME].actionstringProcessing action after traffic control is triggered. The value can be set as retry or drop and the default value is retry.
indices.[NAME].statusstringStatus code returned after traffic control conditions are met. The default value is 429.
indices.[NAME].messagestringRejection message returned for a request, for which traffic control conditions are met
indices.[NAME].retry_delay_in_msintInterval for traffic control retry, in milliseconds. The default value is 10.
indices.[NAME].max_retry_timesintMaximum retry count in the case of traffic control retries. The default value is 1000.
indices.[NAME].failed_retry_messagestringRejection message returned for a request, for which the maximum retry count has been reached
indices.[NAME].log_warn_messageboolWhether to log warn message
Edit Edit this page