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

keep alive http header in node tests #348

Open
itachi880 opened this issue Nov 10, 2024 · 3 comments
Open

keep alive http header in node tests #348

itachi880 opened this issue Nov 10, 2024 · 3 comments

Comments

@itachi880
Copy link

just try to don't use keep alive you can just add a middleware that gose like
nodejs app.use((req, res, next) => { res.setHeader('Connection', 'close'); next(); });

@antonputra
Copy link
Owner

@itachi880 ok, are there any performance implications? what's the benefit?

@itachi880
Copy link
Author

in normal situations when http req is sent the server response contain the keep alive wich indecate that the http connection shold still open a bit after the response is sent and the aditional automatic header set by default in express add some overhead on the network and the part where creating the header thats why in you benchmark you see node js with express sent a larger responses than go

@itachi880
Copy link
Author

I'm not a software engineering expert; in fact, I'm quite the opposite 🙃. My profile might suggest otherwise, but I try to encourage myself to open discussions with people in my field.

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

No branches or pull requests

2 participants