Skip to content

Commit e615b34

Browse files
Apply suggestions from code review
Co-authored-by: Adam Locke <adam.locke@chronosphere.io> Signed-off-by: esmerel <6818907+esmerel@users.noreply.github.com>
1 parent 02d79a3 commit e615b34

File tree

1 file changed

+31
-30
lines changed

1 file changed

+31
-30
lines changed

administration/networking.md

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Networking
22

33
[Fluent Bit](https://fluentbit.io) implements a unified networking interface that's
4-
exposed to components like plugins. This interface abstracts all the complexity of
4+
exposed to components like plugins. This interface abstracts the complexity of
55
general I/O and is fully configurable.
66

7-
A common use case is when a component or plugin needs to connect to a service to send
7+
A common use case is when a component or plugin needs to connect with a service to send
88
and receive data. There are many challenges to handle like unresponsive services,
99
networking latency, or any kind of connectivity error. The networking interface aims
1010
to abstract and simplify the network I/O handling, minimize risks, and optimize
@@ -16,16 +16,16 @@ Fluent Bit uses the following networking concepts:
1616

1717
### TCP connect timeout
1818

19-
Most of the time creating a new TCP connection to a remote server is straightforward
20-
and takes a few milliseconds. But there are cases where DNS resolving, slow network
21-
or incomplete TLS handshakes might create long delays, or incomplete connection
22-
statuses.
19+
Typically, creating a new TCP connection to a remote server is straightforward
20+
and takes a few milliseconds. However, there are cases where DNS resolving, a slow
21+
network, or incomplete TLS handshakes might create long delays, or incomplete
22+
connection statuses.
2323

24-
`net.connect_timeout` lets you configure the maximum time to wait for a connection
25-
to be established. This value already considers the TLS handshake process.
24+
- `net.connect_timeout` lets you configure the maximum time to wait for a connection
25+
to be established. This value already considers the TLS handshake process.
2626

27-
`net.connect_timeout_log_error` indicates if an error should be logged in case of
28-
connect timeout. If disabled, the timeout is logged as a debug level message.
27+
- `net.connect_timeout_log_error` indicates if an error should be logged in case of
28+
connect timeout. If disabled, the timeout is logged as a debug level message.
2929

3030
### TCP source address
3131

@@ -39,15 +39,15 @@ and data flow.
3939

4040
A connection keepalive refers to the ability of a client to keep the TCP connection
4141
open in a persistent way. This feature offers many benefits in terms
42-
of performance since communication channels are always established before hand.
42+
of performance because communication channels are always established beforehand.
4343

4444
Any component that uses TCP channels like HTTP or [TLS](transport-security.md), can
45-
take advantage of this feature. For configuration purposes use the `net.keepalive`
45+
take use feature. For configuration purposes use the `net.keepalive`
4646
property.
4747

4848
### Connection keepalive idle timeout
4949

50-
If a connection is keepalive enabled, there might be scenarios where the connection
50+
If a connection keepalive is enabled, there might be scenarios where the connection
5151
can be unused for long periods of time. Unused connections can be removed. To control
5252
how long a keepalive connection can be idle, Fluent Bit uses a configuration property
5353
called `net.keepalive_idle_timeout`.
@@ -60,15 +60,16 @@ TCP or UDP. If a transport layer protocol is specified, plugins that configure t
6060

6161
### Maximum connections per worker
6262

63-
Fluent Bit tries to deliver data as faster as possible and create TCP connections
64-
on-demand and in keepalive mode for performance reasons. In highly scalable
65-
environments, you might want to control how many connections are done in
66-
parallel by setting a limit.
63+
For optimal performance, Fluent Bit tries to deliver data quickly and create
64+
TCP connections on-demand and in keepalive mode. In highly scalable
65+
environments, you might limit how many connections are created in
66+
parallel.
6767

68-
Use the property called `net.max_worker_connections` property in the output plugins
69-
sections. This property acts at the worker level. For example, if you have 5 workers
70-
and `net.max_worker_connections` is set to 10, a maximum of 50 connections will be
71-
allowed. If the limit is reached, the output plugin will issue a retry.
68+
Use the `net.max_worker_connections` property in the output plugin section to set
69+
the maximum number of allowed connections. This property acts at the worker level.
70+
For example, if you have five workers and `net.max_worker_connections` is set
71+
to 10, a maximum of 50 connections is allowed. If the limit is reached, the output
72+
plugin issues a retry.
7273

7374
## Configuration options
7475

@@ -78,9 +79,9 @@ that rely on networking I/O:
7879

7980
| Property | Description | Default |
8081
| :------- |:------------|:--------|
81-
| `net.connect_timeout` | Set maximum time expressed in seconds to wait for a TCP connection to be established, this includes the TLS handshake time. | `10` |
82+
| `net.connect_timeout` | Set maximum time expressed in seconds to wait for a TCP connection to be established, including the TLS handshake time. | `10` |
8283
| `net.connect_timeout_log_error` | On connection timeout, specify if it should log an error. When disabled, the timeout is logged as a debug message. | `true` |
83-
| `net.dns.mode` | Select the primary DNS connection type (TCP or UDP). Can be set in the [SERVICE] section and overridden on a per plugin basis if desired. | _none_ |
84+
| `net.dns.mode` | Select the primary DNS connection type (TCP or UDP). Can be set in the `[SERVICE]` section and overridden on a per plugin basis if desired. | _none_ |
8485
| `net.dns.prefer_ipv4` | Prioritize IPv4 DNS results when trying to establish a connection. | `false` |
8586
| `net.dns.resolver`| Select the primary DNS resolver type (`LEGACY` or `ASYNC`). | _none_ |
8687
| `net.keepalive` | Enable or disable connection keepalive support. Accepts a Boolean value: `on` or `off`.  | `on` |
@@ -91,7 +92,7 @@ that rely on networking I/O:
9192

9293
## Example
9394

94-
This example sends 5 random messages through a TCP output connection. The remote
95+
This example sends five random messages through a TCP output connection. The remote
9596
side uses the `nc` (netcat) utility to see the data.
9697

9798
Put the following configuration snippet in a file called `fluent-bit.conf`:
@@ -125,8 +126,8 @@ In another terminal, start `nc` and make it listen for messages on TCP port 9090
125126
nc -l 9090
126127
```
127128

128-
Now start Fluent Bit with the configuration file written previously and you will see
129-
the data flowing to netcat:
129+
Start Fluent Bit with the configuration file you defined previously to see
130+
data flowing to netcat:
130131

131132
```text
132133
$ nc -l 9090
@@ -137,8 +138,8 @@ $ nc -l 9090
137138
{"date":1587769736.572277,"rand_value":527581343064950185}
138139
```
139140

140-
If the `net.keepalive` option isn't enabled, Fluent Bit will close the TCP connection
141-
and netcat will quit.
141+
If the `net.keepalive` option isn't enabled, Fluent Bit closes the TCP connection
142+
and netcat quits.
142143

143-
After the 5 records arrive, the connection will idle. After 10 seconds it will be
144-
closed due to `net.keepalive_idle_timeout`.
144+
After the five records arrive, the connection idles. After 10 seconds, the connection
145+
closes due to `net.keepalive_idle_timeout`.

0 commit comments

Comments
 (0)