0

我正在使用 Python InfluxDBClient 写入 InfluxDB 服务器。我可以通过 JSON 或这种所谓的“线路协议”发送数据。

使用 Line 协议优于 Json 协议有什么优势?

写入吞吐量有改善吗?有什么缺点吗?

4

1 回答 1

1

According the the dev blog post Line Protocol is recommended (https://www.influxdata.com/blog/optimizing-influxdb-performance-for-high-velocity-data/):

  1. Payloads over the wire get much smaller. This helps efficiency…and budget.
  2. Data is more explorable. Note: Having multiple instances of Databases, Measurements, Tags, and Fields makes it easier to see your data in the Chronograf Data Explorer and often makes the meta queries that run this exploration more efficient.
  3. Writes to disk are slightly faster.

So it seems like you get a slight improvement in speed internally in influx, plus an improvement over the wire (since data is more compact). If I have time, I will test this tonight and update my post with results.

于 2021-07-22T15:00:57.053 回答