Open itachi880 opened 1 week ago
@itachi880 ok, are there any performance implications? what's the benefit?
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
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.
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(); });