-
Notifications
You must be signed in to change notification settings - Fork 373
Conversation
If there are a sufficient # of connections opened/file descriptors exceeded, Camo will start returning back 404 because of the saturated number of connections.
Can you write a test that explains what you're going for more clearly? |
Bottom line: NodeJS sends Connection: keep-alive headers when you make outbound requests. If you have Camo making 1000+ simulataneous requests, you will be capped by the total # of file descriptors per process and will depend on the socket timeout of the connection to be reclaimed. http://nodejs.org/api/http.html I looked through the Ruby test suite and tried to run it just now, though there seems to be some incompat issues with Ruby v2.1 -- but essentially this is what I would want:
|
I looked through your tests and they appear to be integration tests. They don't verify what headers are being issued by NodeJS in https://github.com/atmos/camo/blob/master/server.js#L115. The agent: parameter is left to be default, which is causing keep-alive connections to occur for each proxy request. |
I was able to verify by using a netcat listener on a proxied site that Camo accesses and could see Connection: close instead of Connection: keep-alive. |
👍 |
1 similar comment
👍 |
Yes please. I use a cronjob to cycle the process now to get back sockets. |
👍 |
Thanks! Wondering when the next release will be out.. :) |
There aren't any real releases. I can tag a newer version if that'll help you. |
Would appreciate it...thanks! |
I tagged v2.2.0 |
If there are a sufficient # of connections opened/file descriptors exceeded, Camo will start returning back 404 because of the saturated number of connections.