thejohnbackes
thejohnbackes

Reputation: 1255

What's the maximum number of points I should write to influxdb in a single request?

In influxdb 1.5, the /write path can accept multiple points in a POST request.

What is a reasonable maximum payload size for this? 100 point? 1,000? 10,000? More?

Upvotes: 1

Views: 3153

Answers (2)

Adrian
Adrian

Reputation: 11

I had some problems with 25000 and more points. The points were written by a little python script out of a pandas dataframe. The code was near by the example from influx (dataframe to influxdb with python). It did not matter how many lines and columns were present, the error was reproducible over the sum to be written points. It is better to stay below 20000 points per transfer to avoid exceptions.

Upvotes: 1

WindyFields
WindyFields

Reputation: 2875

Since you question uses the word "should" and I assume that any way of sending metrics to InfluxDB uses /write under the hood, I feel that official docs actually has a generalized answer for your question:

...This means that batching points together is required to achieve high throughput performance. (Optimal batch size seems to be 5,000-10,000 points per batch for many use cases.)

In addition to that, InfluxDB write capabilities are directly related to your hardware sizing.

Note, that 10,000 is not an upper limit, but just an official recommendation. I believe InfluxDB can process way more than that in a single batch. After all, it is the best to check it empirically, particularly on your hardware.

Upvotes: 3

Related Questions