Skip to content

Commit 9fd28f3

Browse files
authored
add zstd compression support (#591)
Signed-off-by: Daijiro Fukuda <[email protected]>
1 parent 39a9a9a commit 9fd28f3

File tree

3 files changed

+52
-22
lines changed

3 files changed

+52
-22
lines changed

configuration/buffer-section.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,9 @@ Following are the configuration parameters for buffer plugin and its chunks:
411411
fd resources when output destination has a problem. This parameter
412412

413413
mitigates such situations.
414-
* `compress` \[enum: `text`/`gzip`\]
414+
* `compress` \[ enum: `text` / `gzip` / `zstd`\(since v1.19.0\) \]
415415
* Default: `text`
416-
* If `gzip` is set, Fluentd compresses data records before writing to
416+
* If `gzip`/`zstd` is set, Fluentd compresses data records before writing to
417417

418418
buffer chunks.
419419

output/file.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,20 @@ The suffix for output result.
162162

163163
### `compress`
164164

165-
Compresses flushed files using `gzip`. No compression is performed by default.
165+
| type | default |
166+
| :--- | :--- |
167+
| enum | text |
168+
169+
Compresses flushed files.
170+
171+
No compression is performed by default.
172+
173+
Supported values:
174+
175+
* `text`
176+
* `gz`
177+
* `gzip`
178+
* `zstd` (since v1.19.0)
166179

167180
### `recompress`
168181

output/forward.md

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,42 @@ Enable client-side DNS round robin. Uniform randomly pick an IP address to send
293293

294294
Ignores DNS resolution and errors at startup time.
295295

296+
### `compress`
297+
298+
| type | default | version |
299+
| :--- | :--- | :--- |
300+
| enum | text | 0.14.7 |
301+
302+
Since v0.14.7, Fluentd supports transparent data compression. You can use this feature to reduce the transferred payload size.
303+
304+
Example:
305+
306+
```text
307+
<match debug.**>
308+
@type forward
309+
compress gzip
310+
<server>
311+
host 192.168.1.2
312+
port 24224
313+
</server>
314+
</match>
315+
```
316+
317+
You do not need any configuration in the receiving server. Data compression is auto-detected and handled transparently by the destination node.
318+
319+
Supported values:
320+
321+
* `text`
322+
* `gzip`
323+
* `zstd` (Experimental) (since v1.19.0)
324+
325+
{% hint style='info' %}
326+
`zstd` is an experimental feature supported since v1.19.0.
327+
Please make sure that the destination server also supports this feature before using it.
328+
329+
* [in_forward plugin](../input/forward.md) supports it since v1.19.0.
330+
{% endhint %}
331+
296332
### `tls_version`
297333

298334
| type | default | available | version |
@@ -604,25 +640,6 @@ If you want to connect to a server that requires [password authentication](../in
604640

605641
Note that, as to the option `self_hostname`, you need to set the name of the server on which your `out_forward` instance is running. In the current implementation, it is considered invalid if your `in_forward` and `out_forward` share the same `hostname`.
606642

607-
### How to enable `gzip` compression?
608-
609-
Since v0.14.7, Fluentd supports transparent data compression. You can use this feature to reduce the transferred payload size.
610-
611-
To enable this feature, set the `compress` option as follows:
612-
613-
```text
614-
<match debug.**>
615-
@type forward
616-
compress gzip
617-
<server>
618-
host 192.168.1.2
619-
port 24224
620-
</server>
621-
</match>
622-
```
623-
624-
You do not need any configuration in the receiving server. Data compression is auto-detected and handled transparently by the destination node.
625-
626643
### What is a Phi accrual failure detector?
627644

628645
Fluentd implements an adaptive failure detection mechanism called "Phi accrual failure detector". Here is how it works:

0 commit comments

Comments
 (0)