This project demonstrates how to set up HTTP servers using three different runtimes: Node.js, Deno, and Bun in a monorepo structure and benchmark them.
To run the servers, ensure you have the following installed:
# Linux & macOS
curl -fsSL https://fnm.vercel.app/install | bash
source ~/.bashrc
fnm use --install-if-missing 23
# Windows
winget install Schniz.fnm
fnm env --use-on-cd | Out-String | Invoke-Expression
fnm use --install-if-missing 23# Linux & macOS
curl -fsSL https://deno.land/install.sh | sh
# Windows
irm https://deno.land/install.ps1 | iex# Linux & macOS
curl -fsSL https://bun.sh/install | bash
# Windows
powershell -c "irm bun.sh/install.ps1 | iex"The project is structured as a monorepo with three separate server implementations:
/runtime-comparison
├── /packages
│ ├── /node-server
│ ├── /deno-server
│ ├── /bun-server
└── /package.json
- Node Server: A simple HTTP server using Node.js.
- Deno Server: A simple HTTP server using Deno.
- Bun Server: A simple HTTP server using Bun.
# Clone repository
git clone git@github.com:its-gabo/runtime-comparison.git
# Install dependencies
bun install
# Running server
bun run start:{runtimeName}To benchmark the runtimes you can use hey.
hey -c 10 -z 10s http://localhost:3000/
# -c number of workers to run concurrently
# -z time of running (e.g 10s = 10 seconds)