Apigee Edge supports Node.js version 0.10. In this version of Node, the default connection pool for outgoing http requests to a host is 5. This can be a significant bottleneck if you have many concurrent requests to the same host. This is a very well-known issue. Fortunately, there are some very simple solutions that will make your application more performant in these scenarios:
var http = require('http'); http.globalAgent.maxSockets = 100; // You could also set it to unlimited (Node v0.12 does by default): http.globalAgent.maxSockets = Infinity;
var http = require('http'); var req = http.request({ agent: false, url: "", ... }, function (res) { ... });
Are there any side-effects of increasing the size of the connection pool or disabling connection pooling (such as increased memory foot-print) that one needs to be aware of when making these changes and would any changes be required in those areas where side-effects could be caused?
I read somewhere that static files should be served from Nginx which sits in front of Node.js. Why is it not recommended to serve from Node.js directly? Is express.static() not good for production usage?
Sample: Using Node.js caching with Edge policies
How to dynamically call different target endpoints based on region
Enable SAML for Apigee Edge Production Organizations!
How do I setup maven API deployments to work with a http/https proxy server ?
How to return a WSDL through Edge
How to import a NodeJS module to apigee edge?