Skip to content

Commit c6a5181

Browse files
authored
Added options SO_REUSEPORT and SO_REUSEADDR for proxy ports (#17429)
1 parent 0760c8b commit c6a5181

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ydb/core/driver_lib/run/kikimr_services_initializers.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2760,6 +2760,7 @@ void TKafkaProxyServiceInitializer::InitializeServices(NActors::TActorSystemSetu
27602760
settings.SslCertificatePem = Config.GetKafkaProxyConfig().GetSslCertificate();
27612761
settings.CertificateFile = Config.GetKafkaProxyConfig().GetCert();
27622762
settings.PrivateKeyFile = Config.GetKafkaProxyConfig().GetKey();
2763+
settings.TcpNotDelay = true;
27632764

27642765
setup->LocalServices.emplace_back(
27652766
NKafka::MakeKafkaDiscoveryCacheID(),

ydb/core/raw_socket/sock64.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ class TInet64StreamSocket : public TStreamSocket {
129129
if (AF == AF_INET6) {
130130
SetSockOpt(s, SOL_SOCKET, IPV6_V6ONLY, (int)false);
131131
}
132+
SetSockOpt(s, SOL_SOCKET, SO_REUSEADDR, (int)true);
133+
#ifdef SO_REUSEPORT
134+
SetSockOpt(s, SOL_SOCKET, SO_REUSEPORT, (int)true);
135+
#endif
136+
132137
TSocketHolder sock(s);
133138
sock.Swap(*this);
134139
}

0 commit comments

Comments
 (0)