bulk-udp.asciidoc 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. [[docs-bulk-udp]]
  2. == Bulk UDP API
  3. A Bulk UDP service is a service listening over UDP for bulk format
  4. requests. The idea is to provide a low latency UDP service that allows
  5. to easily index data that is not of critical nature.
  6. The Bulk UDP service is disabled by default, but can be enabled by
  7. setting `bulk.udp.enabled` to `true`.
  8. The bulk UDP service performs internal bulk aggregation of the data and
  9. then flushes it based on several parameters:
  10. `bulk.udp.bulk_actions`::
  11. The number of actions to flush a bulk after,
  12. defaults to `1000`.
  13. `bulk.udp.bulk_size`::
  14. The size of the current bulk request to flush
  15. the request once exceeded, defaults to `5mb`.
  16. `bulk.udp.flush_interval`::
  17. An interval after which the current
  18. request is flushed, regardless of the above limits. Defaults to `5s`.
  19. `bulk.udp.concurrent_requests`::
  20. The number on max in flight bulk
  21. requests allowed. Defaults to `4`.
  22. The allowed network settings are:
  23. `bulk.udp.host`::
  24. The host to bind to, defaults to `network.host`
  25. which defaults to any.
  26. `bulk.udp.port`::
  27. The port to use, defaults to `9700-9800`.
  28. `bulk.udp.receive_buffer_size`::
  29. The receive buffer size, defaults to `10mb`.
  30. Here is an example of how it can be used:
  31. [source,js]
  32. --------------------------------------------------
  33. > cat bulk.txt
  34. { "index" : { "_index" : "test", "_type" : "type1" } }
  35. { "field1" : "value1" }
  36. { "index" : { "_index" : "test", "_type" : "type1" } }
  37. { "field1" : "value1" }
  38. --------------------------------------------------
  39. [source,js]
  40. --------------------------------------------------
  41. > cat bulk.txt | nc -w 0 -u localhost 9700
  42. --------------------------------------------------