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
But the following TCP Keep-Alive related properties are read from the OS and currently there is no way to configure them in Ballerina:
tcp_keepalive_time: Time (in seconds) a connection needs to be idle before TCP starts sending keepalive probes.
tcp_keepalive_intvl: Interval (in seconds) between individual keepalive probes.
tcp_keepalive_probes: Number of probes to be sent before declaring the connection dead.
These configuring the above properties can be useful in the following scenarios:
When we need to keep a connection alive (without sending data) for a long time, and make sure intermediate hops doesn't break the connection when its being idle, using TCP Keep-Alive is a good option. For example, if there is a firewall in the middle, we need to send the keep alive probes before the firewall timed out.
When a connection is not working for some reason after sometime, the client can identify it without much delay when keep alive probes are not working and if needed they can recreate the connection. Otherwise, the client will identify it only after sending some data over the broken connection. This may cause the request to timeout or fail immediately.
Proposed Solution
The Ballerina Client uses netty internally and the above properties can be configured in the event-loop using the EpollChannelOptions. But this will only work on linux based systems.
Version
Ballerina SwanLake Update 5
The text was updated successfully, but these errors were encountered:
Problem
The TCP Keep-Alive can be enabled for a HTTP connection made by a Ballerina HTTP Client:
But the following TCP Keep-Alive related properties are read from the OS and currently there is no way to configure them in Ballerina:
tcp_keepalive_time
: Time (in seconds) a connection needs to be idle before TCP starts sending keepalive probes.tcp_keepalive_intvl
: Interval (in seconds) between individual keepalive probes.tcp_keepalive_probes
: Number of probes to be sent before declaring the connection dead.These configuring the above properties can be useful in the following scenarios:
Proposed Solution
The Ballerina Client uses netty internally and the above properties can be configured in the event-loop using the
EpollChannelOption
s. But this will only work on linux based systems.Version
Ballerina SwanLake Update 5
The text was updated successfully, but these errors were encountered: