Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set tcp keepalive to l4 listener accept stream #241

Closed
vicanso opened this issue May 17, 2024 · 1 comment
Closed

Set tcp keepalive to l4 listener accept stream #241

vicanso opened this issue May 17, 2024 · 1 comment
Assignees
Labels
Accepted This change is accepted by us and merged to our internal repo enhancement New feature or request

Comments

@vicanso
Copy link

vicanso commented May 17, 2024

What is the problem your feature solves, or the need it fulfills?

I want to set tcp keepalive for l4 listener accept stream, but pingora only supports set to l4 connector.

Describe the solution you'd like

Support to set tcp keepalive for tcp accept function.

Self::Tcp(l) => l.accept().await.map(|(stream, peer_addr)| {
                let _ = set_tcp_keepalive(
                    &stream,
                    &TcpKeepalive {
                        idle: std::time::Duration::from_secs(5 * 60),
                        interval: std::time::Duration::from_secs(60),
                        count: 1000,
                    },
                );

Describe alternatives you've considered

What other solutions, features, or workarounds have you considered that might also solve the issue?
What are the tradeoffs for these alternatives compared to what you're proposing?

Additional context

This could include references to documentation or papers, prior art, screenshots, or benchmark
results.

@andrewhavck andrewhavck added the enhancement New feature or request label May 17, 2024
@andrewhavck andrewhavck self-assigned this May 17, 2024
@andrewhavck andrewhavck added the Accepted This change is accepted by us and merged to our internal repo label May 18, 2024
@drcaramelsyrup
Copy link
Contributor

Thanks, added in 6db86b6 as part of TcpSocketOptions. Let us know if that doesn't meet your needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted This change is accepted by us and merged to our internal repo enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants