-
Notifications
You must be signed in to change notification settings - Fork 21
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
Anyone using this in production? #1
Comments
Good question. I'm not sure. I use it for my projects and that serves some live traffic. But it's by no means at the scale of a large project or corporation might put it into. |
We use it, on multiple APIs we have. None of them very large, though. No problems so far. Sorry for hijacking this, but I'd love to know if this would be support |
Haven't used this module yet, but do you see any problems storing the separate connections map in your code. The Node.js connection timeout is quite long and if someone floods with keep-live TCP connections would it run out of memory? Have you measured the memory usage with some benchmark tests? |
Some anecdotal evidence here fwiw.. I tested my app using siege with and without this module, flooding it with 1000 simultaneous requests over 100k requests. Unsurprisingly it created 1k sockets and kept them all open for the duration of the test. The difference in memory usage was negligible.. if you're worried about being hit with a flood of keep-alive requests then there are probably better optimizations to make (tweaking |
@ehynds Correct me if I am wrong, but I believe you're missing the point of this module. It's not meant to handle keep-alive connections in any way, but terminate them gracefully on server shutdown if they are still active. It won't affect your uptime execution at all. |
This module simply keeps a reference to the open sockets within a running http server. Resource consumption is incredibly small. If you think you'll have 1k sockets open then this module will keep track of 1k worth of references. I'd be hard pressed to even see a difference in memory consumption with this module and without in a running http server - it's that negligible. |
Yes, I get that, poor word choice. My point was that 1k sockets were created and recycled over the course of my test and this module holding references to them had an indiscernible impact on memory usage. Sent from my iPhone
|
The code looks good, but I'm curious how battle tested this is.
The text was updated successfully, but these errors were encountered: