Both NETCONF northbound (SshProxyServer) and southbound
(AsyncSshHandler) plugins exhibit latencies caused by Nagle's algorithm.
These are superfluous, as we typically work in request-response manner,
with reasonable level of buffering going on in the intermediate layers.
Set TCP_NODELAY flag to get rid of these artifacts.
JIRA: NETCONF-776
Change-Id: I68a87cc2bef4f0032e104833b8d241f5b1f7566b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
726ee92c6052437074062ffe790743eab58de2af)
}
sshServer.getProperties().put(CoreModuleProperties.NIO2_READ_TIMEOUT.getName(), nioReadTimeout);
sshServer.getProperties().put(CoreModuleProperties.AUTH_TIMEOUT.getName(), String.valueOf(idleTimeout));
+ sshServer.getProperties().put(CoreModuleProperties.TCP_NODELAY.getName(), true);
final RemoteNetconfCommand.NetconfCommandFactory netconfCommandFactory =
new RemoteNetconfCommand.NetconfCommandFactory(clientGroup,
c.getProperties().put(CoreModuleProperties.AUTH_TIMEOUT.getName(), "0");
c.getProperties().put(CoreModuleProperties.IDLE_TIMEOUT.getName(), "0");
c.getProperties().put(CoreModuleProperties.NIO2_READ_TIMEOUT.getName(), "0");
+ c.getProperties().put(CoreModuleProperties.TCP_NODELAY.getName(), true);
// TODO make configurable, or somehow reuse netty threadpool
c.setNioWorkers(SSH_DEFAULT_NIO_WORKERS);