Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Bun HTTP Framework Benchmark

Compare throughput benchmarks from various JavaScript HTTP framework

Test method: Average throughput

  1. Ping
    • Request to [GET] /
    • Return hi
    • Headers must contains text Content-Type: text/plain, additional context is acceptable eg. Content-Type: text/plain; charset=utf-8
  2. Query
    • Request to [GET] /id/:id
    • Extract path parameter, query string and setting headers.
    • For this benchmark, the request URL will be send as: /id/1?name=bun
    • Headers must contains x-powered-by to benchmark
    • Expected response: "1 bun" (${id} ${query})
      • You MUST NOT use hardcode string or index to extract querystring.
      • In a real-world situation, there's no enforcement that the request will follow the specification, using hardcode index to extract name=bun querystring will be prone to error.
      • To test if it pass the requirement, the implementation should be able to extract querystring dynamically (please treat the value of 'name=bun' can be any value beside 'bun', for example 'alice', 'hina'), which means that the same code should be able to extract querystring, for example:
      • /id/1?name=bun&id=1 -> should return 1 bun not 1 bun&id=1
      • /id/1?id=1 -> should return 1
      • Query beside name maybe not need to be extracted and is optional
    • Headers must contains text Content-Type: text/plain, additional context is acceptable eg. Content-Type: text/plain; charset=utf-8
  3. Body
    • [POST] /json
    • Mirror body to response
    • Server MUST parse body to JSON and serialize back to string
    • For the benchmark, the request body will be sent as: { "hello": "world" }
    • Expected response: { "hello": "world" }
    • Headers must contains text Content-Type: application/json, additional context is acceptable eg. Content-Type: application/json; charset=utf-8.

requirement

  • The framework must at-least has latest published in less than 9 month otherwise will be classified as unmaintained and removed unless is an industry standard (Express).

Prerequistes

Run Test

bun benchmark

Dump result will be available at results/[benchmark-name].txt

Benchmark Condition

This benchmark is tested under the following condition:

  • Intel I7-13700K, DDR5 32GB 5600MHz
  • Arch Linux 6.10.9-arch1-2 (btw I use Arch)
  • Bun 1.2.11
  • Node 22.15.0
  • Deno 2.2.0

Tested on 6 May 2025 20:55 (GMT+7)

Results

These results are measured in req/s:

FrameworkRuntimeAveragePingQueryBody
uwsnode526,295.397535,079.45509,759.27534,047.47
ultimate-expressnode416,645.31526,907.98508,436.34214,591.61
elysiabun397,259.163533,560.05300,716.41357,501.03
bunbun366,716.193386,961.93317,958.96395,227.69
hyper-expressnode315,844.147370,809.65299,522.59277,200.2
bun-web-standardbun303,568.81338,462.84255,297.65316,945.94
nhttpbun283,734.777373,377.37244,767.65233,059.31
honobun253,646.173294,945.14236,066.25229,927.13
denodeno247,770.227269,520.16233,460.27240,330.25
nbitbun229,226.153252,902.81196,843.1237,932.55
deno-web-standarddeno204,908.633236,235.96183,458.05195,031.89
honodeno201,548.523250,592.98195,744.04158,308.55
fastifynode142,695.487155,142.07148,078.23124,866.16
hononode129,234.593144,842.92134,412.44108,448.42
expressbun126,674.41145,427.54134,805.5499,790.15
oakbun120,481.7117,743.45109,295.56134,406.09
h3bun109,739.16132,720.75104,854.1391,642.6
h3node101,237.803136,023.12111,361.8356,328.46
oakdeno100,205.983105,824.6793,335101,458.28
acorndeno64,951.33795,734.9171,099.6328,019.47
expressnode25,079.0126,286.2224,796.4924,154.32

See more detail in results

Notice

I highly recommended testing this benchmark on your machine yourself as performance in likely to vary between machine.

If you are unable to run Deno, please run each Deno app individually first until the Deno finish installing the package, then proceed to run benchmark using bench.sh or npm run benchmark

关于 About

Compare throughput benchmark from various Bun HTTP framework

语言 Languages

TypeScript90.3%
JavaScript8.8%
Shell0.7%
Lua0.1%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
0
Total Commits
峰值: 1次/周
Less
More

核心贡献者 Contributors