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

Fix for issue #3: refactoring of connection pool handing #4

Merged
merged 2 commits into from Oct 5, 2015

Conversation

obscurerichard
Copy link
Contributor

These changes fix the connection pool handling issues in index.js. See issue #3 for more details.

With these fixes in place, the server keeps the connections open that it starts as expected when the load is high.

See these load test results for a validation that this is working.

This builds on pull request #2 and includes all the changes in it.

Use done() instead of client.end()
Move error handling to top of function
Return 500 errors that are JSON encapsulated

This results in a 4x speedup vs. using client.end(),
as when we use the connection pool, we should only call
done() so that the connections get returned. Closing them
is very costly since they will need to be reopened.
@haysclark
Copy link

@obscurerichard Great work!

@mjhea0
Copy link
Owner

mjhea0 commented Oct 5, 2015

👍 Thanks so much!

mjhea0 added a commit that referenced this pull request Oct 5, 2015
Fix for issue #3: refactoring of connection pool handing
@mjhea0 mjhea0 merged commit a550978 into mjhea0:master Oct 5, 2015
@obscurerichard
Copy link
Contributor Author

@haysclark Thanks for the compliment!
@mjhea0 Thank you for merging the pull request!

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

Successfully merging this pull request may close these issues.

None yet

3 participants