Skip to main content

Benchmarks

All benchmarks were run as Node.js containerized workloads, using 4 CPU cores and 4GiB RAM. Docker host running on Macbook M1 Pro 2021 16GB.

Find the benchmarks' code here

HTTP Benchmark

Requirements:

  • endpoint returning 200 and no body
  • request logging (using framework builtins, recommendations if not present, Basica recommendations if not present)

Benchmarks run with autocannon (100 requests, 10 pipelines, 40 seconds)

FrameworkStartup Time (ms)Throughput (MB/s) (p90)Requests/s (p90)Latency (ms) (p90)CPU (%) (p90)RAM (%) (p90)
Basica + Fastify180.58396153122044
Fastify150.61416633022445
NestJS3390.19111991031103
NestJS + Fastify3700.53363193314840

CRUD Benchmark

Requirements:

  • REST api with CRUD methods
  • request logging (using framework builtins, recommendations if not present, Basica recommendations if not present)
  • not found / conflict error mapping (using framework builtins, recommendations if not present,Bbasica recommendations if not present)
  • request/response validation (using framework builtins, recommendations if not present, Basica recommendations if not present)
  • postgresql + migrations (using framework builtins, recommendations if not present, Basica recommendations if not present)

Benchmarks run with autocannon (100 requests, 10 pipelines, 40 seconds)

FrameworkStartup Time (ms)Throughput (MB/s) (p90)Requests/s (p90)Latency (ms) (p90)CPU (%) (p90)RAM (%) (p90)
Basica + Fastify1834.2215737171265
Fastify694.2115627811245
NestJS8041.9157324501238
NestJS + Fastify8362.54772230912210