Skip to content

onejs/bench

Repository files navigation

bench

SSR framework benchmark comparing One, TanStack Start, Next.js, and React Router.

Based on Platformatic's benchmark methodology, extended with a One implementation and local benchmarking.

Application

Each framework implements the same e-commerce trading card marketplace with:

  • 5 games, 50 sets, 10,000 cards, 100 sellers, 100,000+ listings
  • 9 SSR routes (homepage, search, card detail, game detail, games list, sellers, set detail, cart, seller detail)
  • JSON file-based database with configurable simulated latency (1-5ms)
  • Identical data, identical UI, identical server-side work

Frameworks

Directory Framework Server
one/ One Hono
tanstack/ TanStack Start Nitro/h3
next/ Next.js next start
react-router/ React Router v7 Express

Quick Start

Local Benchmark (One vs TanStack)

# install dependencies
cd one && npm install && cd ..
cd tanstack && npm install && cd ..

# build both
cd one && npm run build && cd ..
cd tanstack && npm run build && cd ..

# run benchmark
./bench-local.sh

Configuration

Variable Default Description
DURATION 30 Seconds per route test
CONNECTIONS 100 Concurrent connections
DB_DELAY_ENABLED true Enable simulated DB latency
DB_DELAY_MIN 1 Minimum delay (ms)
DB_DELAY_MAX 5 Maximum delay (ms)

EKS Benchmark (all frameworks)

For cloud benchmarking on AWS EKS with k6 load testing, see the EKS benchmark docs and infrastructure setup.

AWS_PROFILE=<profile> FRAMEWORK=next ./benchmark.sh

Data

Shared test data lives in data/ and is symlinked into each framework directory. Generate fresh data with:

npx tsx lib/generate-data.ts

Results

See BENCHMARK-TABLES.md for benchmark results and feature comparison.

License

MIT

About

SSR framework benchmark: One, TanStack Start, Next.js, React Router

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors