Hello there.
I implemented a sample with reference to the following document.
Two APIs are implemented, one that uses setTimeout to wait 10 seconds before executing finished.
module.exports = async function(args, finished) {
await new Promise((resolve, reject) => {
setTimeout(() => {
resolve();
}, 10000);
});
finished({
text: 'ok'
});
};
The other simply returns a response.
module.exports = async function(args, finished) {
finished({
text: 'ok'
});
};
When poolSize is 1, if an API that returns a simple response is being executed while an API that takes 10 seconds is being executed, "no available workers" will be displayed and the user must wait for the first API to complete.
Is the number of APIs that can run simultaneously equal to the poolSize setting?
If we get many requests, do we have to increase the poolSize or wait our turn?
I was hoping that the process would run in parallel even with poolSize=1, like the event loop in Node.js.