Reputation: 605
I use node.js expressjs ldapjs to implement authentication.
I have a requirement as follows:
To implement the above in node-express environment I'm using ldapjs with passportjs (writing a custom strategy to fit our requirement).
My observation is that, each of the search requests made throgh ldapClient is taking approximately 70ms, which is very slow to finish all the search requests I need to make (will need to perform up to 60-80 search requests during authentication).
I implemented above to be serial requests(I make next request after the current one is finished).
How can I possibly improve the performance in this case. What are the available options that I can look into?
Upvotes: 1
Views: 775
Reputation: 605
I could improve the performance significantly by making all the search requests run in parallel, and making use of 'parallel-searches-end' callback to handle parent search depth level.
The above was possible with async.parallel method of 'async' node module.
Thanks to everyone who might have looked into this.
Upvotes: 2