You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: administration/networking.md
+31-30Lines changed: 31 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# Networking
2
2
3
3
[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
5
5
general I/O and is fully configurable.
6
6
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
8
8
and receive data. There are many challenges to handle like unresponsive services,
9
9
networking latency, or any kind of connectivity error. The networking interface aims
10
10
to abstract and simplify the network I/O handling, minimize risks, and optimize
@@ -16,16 +16,16 @@ Fluent Bit uses the following networking concepts:
16
16
17
17
### TCP connect timeout
18
18
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.
23
23
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.
26
26
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.
29
29
30
30
### TCP source address
31
31
@@ -39,15 +39,15 @@ and data flow.
39
39
40
40
A connection keepalive refers to the ability of a client to keep the TCP connection
41
41
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.
43
43
44
44
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`
46
46
property.
47
47
48
48
### Connection keepalive idle timeout
49
49
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
51
51
can be unused for long periods of time. Unused connections can be removed. To control
52
52
how long a keepalive connection can be idle, Fluent Bit uses a configuration property
53
53
called `net.keepalive_idle_timeout`.
@@ -60,15 +60,16 @@ TCP or UDP. If a transport layer protocol is specified, plugins that configure t
60
60
61
61
### Maximum connections per worker
62
62
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.
67
67
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.
72
73
73
74
## Configuration options
74
75
@@ -78,9 +79,9 @@ that rely on networking I/O:
78
79
79
80
| Property | Description | Default |
80
81
| :------- |:------------|:--------|
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`|
82
83
|`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_|
84
85
|`net.dns.prefer_ipv4`| Prioritize IPv4 DNS results when trying to establish a connection. |`false`|
85
86
|`net.dns.resolver`| Select the primary DNS resolver type (`LEGACY` or `ASYNC`). |_none_|
86
87
|`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:
91
92
92
93
## Example
93
94
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
95
96
side uses the `nc` (netcat) utility to see the data.
96
97
97
98
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
125
126
nc -l 9090
126
127
```
127
128
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
0 commit comments