Skip to content

Commit 9cf06e3

Browse files
authored
Merge pull request #392 from daipom/enable-server-plugins-to-specify-so_linger
1.0: describe new option `linger_timeout` of transport section
2 parents 10ba2d2 + 3ede782 commit 9cf06e3

File tree

4 files changed

+104
-6
lines changed

4 files changed

+104
-6
lines changed

input/forward.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ With this configuration, the emitted tag is `prod.INCOMING_TAG`, e.g. `prod.app.
8686

8787
The timeout used to set the linger option.
8888

89+
This parameter is deprecated since v1.14.6. Use `<transport>` directive instead.
90+
8991
### `resolve_hostname`
9092

9193
| type | default | version |
@@ -156,7 +158,29 @@ This iterates incoming events. So, if you send larger chunks to `in_forward`, it
156158

157159
### `<transport>` Section
158160

159-
This section is for using SSL transport:
161+
This section is for setting TLS transport or some general transport configurations.
162+
163+
#### General configuration
164+
165+
##### `linger_timeout`
166+
167+
| type | default | available transport type | version |
168+
| :--- | :--- | :--- | :--- |
169+
| integer | 0 | tcp, tls | 1.14.6 |
170+
171+
The timeout \(seconds\) to set `SO_LINGER`.
172+
173+
The default value `0` is to send RST rather than FIN to avoid lots of connections sitting in TIME_WAIT on closing.
174+
175+
You can set positive value to send FIN on closing.
176+
177+
```text
178+
<transport tcp>
179+
linger_timeout 1
180+
</transport>
181+
```
182+
183+
#### TLS configuration
160184

161185
```text
162186
<transport tls>

input/http.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,29 @@ Respond status code with 204. This option will be deprecated at v2 because fluen
166166
| :--- | :--- | :--- | :--- |
167167
| enum | tcp | tcp, tls | 1.5.0 |
168168

169-
This section is for using TLS transport.
169+
This section is for setting TLS transport or some general transport configurations.
170+
171+
#### General configuration
172+
173+
##### `linger_timeout`
174+
175+
| type | default | available transport type | version |
176+
| :--- | :--- | :--- | :--- |
177+
| integer | 0 | tcp, tls | 1.14.6 |
178+
179+
The timeout \(seconds\) to set `SO_LINGER`.
180+
181+
The default value `0` is to send RST rather than FIN to avoid lots of connections sitting in TIME_WAIT on closing.
182+
183+
You can set positive value to send FIN on closing.
184+
185+
```text
186+
<transport tcp>
187+
linger_timeout 1
188+
</transport>
189+
```
190+
191+
#### TLS configuration
170192

171193
```text
172194
<transport tls>

input/tcp.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,35 @@ You will get something like below:
137137

138138
| type | default | available values | version |
139139
| :--- | :--- | :--- | :--- |
140-
| enum | udp | tls | 0.14.12 |
140+
| enum | tcp | tcp, tls | 0.14.12 |
141141

142-
This section is for using TLS transport.
142+
This section is for setting TLS transport or some general transport configurations.
143+
144+
#### General configuration
145+
146+
##### `linger_timeout`
147+
148+
| type | default | available transport type | version |
149+
| :--- | :--- | :--- | :--- |
150+
| integer | 0 | tcp, tls | 1.14.6 |
151+
152+
The timeout \(seconds\) to set `SO_LINGER`.
153+
154+
The default value `0` is to send RST rather than FIN to avoid lots of connections sitting in TIME_WAIT on closing.
155+
156+
You can set positive value to send FIN on closing.
157+
158+
```text
159+
<source>
160+
@type tcp
161+
# other plugin parameters
162+
<transport tcp>
163+
linger_timeout 1
164+
</transport>
165+
</source>
166+
```
167+
168+
#### TLS configuration
143169

144170
```text
145171
<transport tls>
@@ -148,6 +174,8 @@ This section is for using TLS transport.
148174
</transport>
149175
```
150176

177+
See [**How to Enable TLS Encryption**](#how-to-enable-tls-encryption) section for how to use and see [Configuration Example](../plugin-helper-overview/api-plugin-helper-server.md#configuration-example) for all supported parameters.
178+
151179
Without `<transport tls>`, `in_tcp` uses raw TCP.
152180

153181
### `<security>` Section

plugin-helper-overview/api-plugin-helper-server.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,31 @@ end
160160

161161
## Configuration example
162162

163-
Here is some TLS configuration examples:
163+
### General configuration
164+
165+
#### `linger_timeout`
166+
167+
| type | default | available transport type | version |
168+
| :--- | :--- | :--- | :--- |
169+
| integer | 0 | tcp, tls | 1.14.6 |
170+
171+
The timeout \(seconds\) to set `SO_LINGER`.
172+
173+
The default value `0` is to send RST rather than FIN to avoid lots of connections sitting in TIME_WAIT on closing.
174+
175+
You can set positive value to send FIN on closing.
176+
177+
```text
178+
<source>
179+
@type tcp
180+
# other plugin parameters
181+
<transport tcp>
182+
linger_timeout 1
183+
</transport>
184+
</source>
185+
```
186+
187+
### TLS configuration: Basic examples
164188

165189
1. Use existing certs \(signed by public CA or self signed CA\)
166190
2. Use certs automatically generated by Fluentd
@@ -218,7 +242,7 @@ If `ca_cert_path` and `ca_private_key_path` are specified, certs generation is e
218242
</source>
219243
```
220244

221-
### `cert_verifier` example
245+
### TLS configuration: `cert_verifier` example
222246

223247
`cert_verifier` is supported since v1.10.0.
224248

0 commit comments

Comments
 (0)