Fix for issue #3: refactoring of connection pool handing#4
Merged
mjhea0 merged 2 commits intomjhea0:masterfrom Oct 5, 2015
Merged
Fix for issue #3: refactoring of connection pool handing#4mjhea0 merged 2 commits intomjhea0:masterfrom
mjhea0 merged 2 commits intomjhea0:masterfrom
Conversation
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.
|
@obscurerichard Great work! |
Owner
|
👍 Thanks so much! |
mjhea0
added a commit
that referenced
this pull request
Oct 5, 2015
Fix for issue #3: refactoring of connection pool handing
Contributor
Author
|
@haysclark Thanks for the compliment! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.