Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0: describe new option linger_timeout of transport section #392

Merged
merged 1 commit into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
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
26 changes: 25 additions & 1 deletion input/forward.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ With this configuration, the emitted tag is `prod.INCOMING_TAG`, e.g. `prod.app.

The timeout used to set the linger option.

This parameter is deprecated since v1.14.6. Use `<transport>` directive instead.

### `resolve_hostname`

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

### `<transport>` Section

This section is for using SSL transport:
This section is for setting TLS transport or some general transport configurations.

#### General configuration

##### `linger_timeout`

| type | default | available transport type | version |
| :--- | :--- | :--- | :--- |
| integer | 0 | tcp, tls | 1.14.6 |

The timeout \(seconds\) to set `SO_LINGER`.

The default value `0` is to send RST rather than FIN to avoid lots of connections sitting in TIME_WAIT on closing.

You can set positive value to send FIN on closing.

```text
<transport tcp>
linger_timeout 1
</transport>
```

#### TLS configuration

```text
<transport tls>
Expand Down
24 changes: 23 additions & 1 deletion input/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,29 @@ Respond status code with 204. This option will be deprecated at v2 because fluen
| :--- | :--- | :--- | :--- |
| enum | tcp | tcp, tls | 1.5.0 |

This section is for using TLS transport.
This section is for setting TLS transport or some general transport configurations.

#### General configuration

##### `linger_timeout`

| type | default | available transport type | version |
| :--- | :--- | :--- | :--- |
| integer | 0 | tcp, tls | 1.14.6 |

The timeout \(seconds\) to set `SO_LINGER`.

The default value `0` is to send RST rather than FIN to avoid lots of connections sitting in TIME_WAIT on closing.

You can set positive value to send FIN on closing.

```text
<transport tcp>
linger_timeout 1
</transport>
```

#### TLS configuration

```text
<transport tls>
Expand Down
32 changes: 30 additions & 2 deletions input/tcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,35 @@ You will get something like below:

| type | default | available values | version |
| :--- | :--- | :--- | :--- |
| enum | udp | tls | 0.14.12 |
| enum | tcp | tcp, tls | 0.14.12 |

This section is for using TLS transport.
This section is for setting TLS transport or some general transport configurations.

#### General configuration

##### `linger_timeout`

| type | default | available transport type | version |
| :--- | :--- | :--- | :--- |
| integer | 0 | tcp, tls | 1.14.6 |

The timeout \(seconds\) to set `SO_LINGER`.

The default value `0` is to send RST rather than FIN to avoid lots of connections sitting in TIME_WAIT on closing.

You can set positive value to send FIN on closing.

```text
<source>
@type tcp
# other plugin parameters
<transport tcp>
linger_timeout 1
</transport>
</source>
```

#### TLS configuration

```text
<transport tls>
Expand All @@ -148,6 +174,8 @@ This section is for using TLS transport.
</transport>
```

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.

Without `<transport tls>`, `in_tcp` uses raw TCP.

### `<security>` Section
Expand Down
28 changes: 26 additions & 2 deletions plugin-helper-overview/api-plugin-helper-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,31 @@ end

## Configuration example

Here is some TLS configuration examples:
### General configuration

#### `linger_timeout`

| type | default | available transport type | version |
| :--- | :--- | :--- | :--- |
| integer | 0 | tcp, tls | 1.14.6 |

The timeout \(seconds\) to set `SO_LINGER`.

The default value `0` is to send RST rather than FIN to avoid lots of connections sitting in TIME_WAIT on closing.

You can set positive value to send FIN on closing.

```text
<source>
@type tcp
# other plugin parameters
<transport tcp>
linger_timeout 1
</transport>
</source>
```

### TLS configuration: Basic examples

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

### `cert_verifier` example
### TLS configuration: `cert_verifier` example

`cert_verifier` is supported since v1.10.0.

Expand Down