influxdb - 通过线路协议写入 InfluxDB 优于 Json 协议的优势
问题描述
我正在使用 Python InfluxDBClient 写入 InfluxDB 服务器。我可以通过 JSON 或这种所谓的“线路协议”发送数据。
使用 Line 协议优于 Json 协议有什么优势?
写入吞吐量有改善吗?有什么缺点吗?
解决方案
According the the dev blog post Line Protocol is recommended (https://www.influxdata.com/blog/optimizing-influxdb-performance-for-high-velocity-data/):
- Payloads over the wire get much smaller. This helps efficiency…and budget.
- 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.
- 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.
推荐阅读
- ruby - 如何为 pre ruby 1.9.1 实现 string.codepoints
- oracle - PostgreSQL 中的 Oracle DBMS_APPLICATION_INFO.SET_MODULE 等效项
- react-native - 减速器方法不调用?
- javascript - 在Angular 6上解析和忽略多维数组中的空数据
- ios - 您可以在同一个 iOS 企业帐户上使用不同的分发证书来签署应用程序吗?
- android - 如何从图库中裁剪图像并在 imageview 中设置
- c# - 使用不同 DPI 捕获控件的屏幕截图
- tensorflow - 如何使用 Intel 推理引擎 (OpenVINO) 优化带有 batchnorm 层的 keras 模型?
- javascript - 使用 MathJax 从 Mathml 转换为 SVG 失败
- javascript - 我收到一个错误:VIDEOJS: ERROR: (CODE:0 MEDIA_ERR_CUSTOM) 当我使用 video.js 播放视频时