Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

multi-worker-process: Add multiple worker assign syntax description #619

Merged
merged 1 commit into from
Feb 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions docs/v1.0/multi-process-workers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,82 @@ Some plugins don't work on multi process worker, e.g. `in_tail`. For such plugin

With this directive, you can mix multi-process ready and non-multi-process ready plugins in 1 instance.

### <worker N-M> directive

As of Fluentd v1.4.0, `<worker N-M>` syntax has been introduced:

:::text
<system>
workers 6
</system>

<worker 0-1>
<source>
@type forward
</source>

<filter test>
@type record_transformer
enable_ruby
<record>
worker_id ${ENV['SERVERENGINE_WORKER_ID']}
</record>
</filter>

<match test>
@type stdout
</match>
</worker>
# work on worker 0 and worker 1.

<worker 2-3>
<source>
@type tcp
<parse>
@type none
</parse>
tag test
</source>

<filter test>
@type record_transformer
enable_ruby
<record>
worker_id ${ENV['SERVERENGINE_WORKER_ID']}
</record>
</filter>

<match test>
@type stdout
</match>
</worker>
# work on worker 2 and worker 3.

<worker 4-5>
<source>
@type udp
<parse>
@type none
</parse>
tag test
</source>

<filter test>
@type record_transformer
enable_ruby
<record>
worker_id ${ENV['SERVERENGINE_WORKER_ID']}
</record>
</filter>

<match test>
@type stdout
</match>
</worker>
# work on worker 4 and worker 5.

With this directive, you can specify multiple workers per worker directive.

### root_dir/@id parameter

These parameters must be specified when you use file buffer.
Expand Down