Skip to content

Commit 75b1be1

Browse files
authored
Added options SO_REUSEPORT and SO_REUSEADDR for proxy ports (#17429) (#19056)
2 parents 041b08d + 6ad4689 commit 75b1be1

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
@@ -2758,6 +2758,7 @@ void TKafkaProxyServiceInitializer::InitializeServices(NActors::TActorSystemSetu
27582758
settings.SslCertificatePem = Config.GetKafkaProxyConfig().GetSslCertificate();
27592759
settings.CertificateFile = Config.GetKafkaProxyConfig().GetCert();
27602760
settings.PrivateKeyFile = Config.GetKafkaProxyConfig().GetKey();
2761+
settings.TcpNotDelay = true;
27612762

27622763
setup->LocalServices.emplace_back(
27632764
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)