openapi-nodejs-sdk icon indicating copy to clipboard operation
openapi-nodejs-sdk copied to clipboard

Poor performance under concurrent requests (Express.js)

Open francescobianco opened this issue 1 year ago • 0 comments

āš”ļø Poor performance under concurrent requests

Labels: performance, investigation
Framework context: Express.js with Promise.all() batch requests

Description:
When performing 50+ parallel requests (e.g., bulk verification of tax codes through Promise.all() inside an Express route), the response time increases exponentially.

Suspected cause:
The SDK internally creates a new Axios instance for every call instead of reusing connections. This likely prevents HTTP keep-alive and leads to connection flooding.

Proposal:
Implement a shared HTTP agent with keep-alive enabled, or expose a configuration parameter like:

Openapi.configure({ maxConcurrency: 10, keepAlive: true });

francescobianco avatar Nov 09 '25 14:11 francescobianco