X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Ftypescript%2Fhttp-server-pool%2Ffastify-hybrid%2Fsrc%2Fmain.ts;h=d840dfb9529d0c01e659e7e8b79080cdb3c5938b;hb=93b097acefb8dfea7259bff4cb9f6c337d34db94;hp=ca7c42d4b6c59c626235d9cc50821446a86db95f;hpb=8ebe6c308dc1fc3202980126da043b2855d24780;p=poolifier.git diff --git a/examples/typescript/http-server-pool/fastify-hybrid/src/main.ts b/examples/typescript/http-server-pool/fastify-hybrid/src/main.ts index ca7c42d4..d840dfb9 100644 --- a/examples/typescript/http-server-pool/fastify-hybrid/src/main.ts +++ b/examples/typescript/http-server-pool/fastify-hybrid/src/main.ts @@ -22,7 +22,10 @@ const pool = new FixedClusterPool( .execute({ port: 8080, workerFile: requestHandlerWorkerFile, - maxWorkers: Math.round(availableParallelism() / 2), + maxWorkers: + Math.round(availableParallelism() / 4) < 1 + ? 1 + : Math.round(availableParallelism() / 4), enableTasksQueue: true, tasksQueueOptions: { concurrency: 8