honojs / hono

Web framework built on Web Standards
https://hono.dev
MIT License
19.08k stars 544 forks source link

Fix for "Web Framework Benchmark" #1506

Open yusukebe opened 1 year ago

yusukebe commented 1 year ago

What is the feature you are proposing?

The following benchmark results show a very low score for Hono:

Web Frameworks Benchmark

This is because it is failing to fork the process in pm2.

Screenshot 2023-09-26 at 4 38 58

Only one process is up and running because of a port conflict.

Screenshot 2023-09-26 at 4 40 26

I can think of several ways, anyway we have to resolved it.

yusukebe commented 1 year ago

I’ve fixed a port conflict issue with the PR: https://github.com/the-benchmarker/web-frameworks/pull/6763 . But it only prevents errors and does not improve performance.

Other Node.js web frameworks such as Fastify are clustered using pm2. However, the Hono apps that run on top of bun are just forked. Since this benchmark only accesses port 3000, there is no point in forking. So I don't think it makes sense to use pm2.

sparanoid commented 1 month ago

Hono just added node:cluster support https://github.com/oven-sh/bun/issues/2428#issuecomment-2295156240