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

How to configure keep-alive for uWs.App()? #1080

Open
lwq057 opened this issue Jul 17, 2024 · 7 comments
Open

How to configure keep-alive for uWs.App()? #1080

lwq057 opened this issue Jul 17, 2024 · 7 comments

Comments

@lwq057
Copy link

lwq057 commented Jul 17, 2024

I looked in the documentation, but couldn't seem to find any relevant configuration.

Is keep-alive enabled by default? What are the parameters?

uWs.App()
.get('/',(res, req)=>{
res.end('ok');
})
.listen(8080, (token) => {});
@lwq057
Copy link
Author

lwq057 commented Jul 17, 2024

I want to set keep-alive to 30s or 60s, how can I do it?

@uNetworkingAB
Copy link
Contributor

It is 10s hardcoded. I think? Maybe we made it an environment variable. If not, could be time to make it so. But very few people have asked for this

@lwq057
Copy link
Author

lwq057 commented Jul 18, 2024

It is 10s hardcoded. I think? Maybe we made it an environment variable. If not, could be time to make it so. But very few people have asked for this

This will make uWebSockets.js more performant.
Configure keep-alive to optimize network performance and reduce TCP connection times in different applications.
Usually when using a reverse proxy.

@uNetworkingAB
Copy link
Contributor

I like your sales pitch ✅

@ezioda004
Copy link

This would be a great addition and will add value to backends where applications are behind reverse proxy, which mostly are.

@Dhruv-Garg79
Copy link

Hey @uNetworkingAB, I liked this idea as well, will you be adding this?

@7iomka
Copy link

7iomka commented Oct 17, 2024

Any news on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants