# NodeRed compress writes to InfluxDBv2?

**URL:** <https://discourse.nodered.org/t/nodered-compress-writes-to-influxdbv2/87751>\
**Category:** General\
**Created:** [6 May 2024 13:59 UTC](https://discourse.nodered.org/t/nodered-compress-writes-to-influxdbv2/87751 "2024-05-06T13:59:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Starfoxfs](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/starfoxfs/32/69119_2.png) [@Starfoxfs](https://discourse.nodered.org/u/Starfoxfs)\
**Post date:** [6 May 2024 13:59 UTC](https://discourse.nodered.org/t/nodered-compress-writes-to-influxdbv2/87751/1 "2024-05-06T13:59:38Z")

</div>

Hi,

is there a way to compress the Writes to InfluxDBv2 with Node-Red ?

InfluxDBv2 is faster when using gzip compression to Write Data

> **[Optimize writes to InfluxDB | InfluxDB OSS v2 Documentation](https://docs.influxdata.com/influxdb/v2/write-data/best-practices/optimize-writes/#use-gzip-compression)**
>
> Simple tips to optimize performance and system overhead when writing data to InfluxDB.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [6 May 2024 17:12 UTC](https://discourse.nodered.org/t/nodered-compress-writes-to-influxdbv2/87751/2 "2024-05-06T17:12:54Z")

</div>

> [@Starfoxfs](#):
>
> InfluxDBv2 is faster when using gzip compression to Write Data

I think that depends on whether your network overheads are significant. What aspects of the write are you having a problem with?

Can you point to a reference confirming in what way it is faster?

---

<div class="post-metadata">

**Author:** ![Starfoxfs](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/starfoxfs/32/69119_2.png) [@Starfoxfs](https://discourse.nodered.org/u/Starfoxfs)\
**Post date:** [6 May 2024 18:03 UTC](https://discourse.nodered.org/t/nodered-compress-writes-to-influxdbv2/87751/3 "2024-05-06T18:03:57Z")

</div>

I wan´t to reduce the written Data because of wear out SSD or SD Card.

My assumption was that with Gzip the data would be transferred in a more compressed manner and therefore smaller amounts of data would be written.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [6 May 2024 18:24 UTC](https://discourse.nodered.org/t/nodered-compress-writes-to-influxdbv2/87751/4 "2024-05-06T18:24:47Z")

</div>

I don't believe it affects the amount of data written to disc. I believe it is just to reduce the network bandwidth, which for high throughput influxdb systems (many thousands of records a second) can be the limiting factor. The data is compressed by the client (node red in this case), passed to the server and then decompressed by the server, so the CPU used is increased but the network bandwidth is reduced.

I may be wrong though, so I suggest you research the subject and let us know what you find out.

> [@Starfoxfs](#):
>
> I wan´t to reduce the written Data because of wear out SSD or SD Card.

Don't use an SD card for influx unless you have only a very small amount of data.  
How many channels are you recording and at what rate? Unless you are talking of hundreds of data points a second then a good quality SSD is not going to worry about it. In fact probably it will not worry unless you are talking about thousands a second.

---

<div class="post-metadata">

**Author:** ![Starfoxfs](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/starfoxfs/32/69119_2.png) [@Starfoxfs](https://discourse.nodered.org/u/Starfoxfs)\
**Post date:** [7 May 2024 07:46 UTC](https://discourse.nodered.org/t/nodered-compress-writes-to-influxdbv2/87751/5 "2024-05-07T07:46:22Z")

</div>

I have only 2 write accesses to Influxdb, one Mqtt from AhoyDTU with 10 Data Points and the second Mqtt from Energymeter with 2 Data Points.

So I think I don't have to worry about this. It was just out of interest because I discovered Influxdb's article about Gzip compression.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [5 August 2024 07:47 UTC](https://discourse.nodered.org/t/nodered-compress-writes-to-influxdbv2/87751/6 "2024-08-05T07:47:02Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
