Saturday, 6 May 2017

Why HTTP keep alive switched off by default in Node.js?

This is first time I'm implementing back-end in Node.js and I found that by default HTTP Agent has keep alive option switched off. For me it impacts a performance as I'm working with AWS SDK making tons of requests to its services. Actually my load testing helped to find that this option is switched off - so I enabled it and got much more better performance. I wonder if anybody knows why it's switched off by default? Is it not to break a compatibility (AFAIK this option was added few years ago) or for some other reason? Maybe I'm missing something? Found commit where it was added - https://github.com/nodejs/node/commit/9fc9b87472806147b83c24d85b303c4f75d3021c

Nazar



via Nazar

No comments:

Post a Comment