Skip to content

Comparing the performance of the fastest three backend frameworks: FastAPI, Fastify, and Hono.js using AutoCannon for benchmarking tests to highlight their strengths and suitability for different types of workloads.

Notifications You must be signed in to change notification settings

malkiii/fastapi-fastify-hono-benchmark

Repository files navigation

FastAPI vs Fastify vs Hono.js

This is a benchmark test of these "Fast" backend frameworks to see which one can handle the most requests per second using AutoCannon.

📋 Requirements

💻 Local Setup

  1. Install Node.js dev-dependencies using

    npm install
  2. Install Python matplotlib and numpy dependencies using:

    pip install matplotlib numpy

📊 Benchmarking

  1. Start fastapi, fastify, hono, and mongodb containers by opening a new terminal tab at the root directory and running:

    npm start
  2. Check if everything is running correctly using:

    npm run test
  3. Start benchmarking by running:

    npm run benchmark

Note

After completing these steps, you can check the results in the report.ipynb file. Your results may be completely different from mine.

About

Comparing the performance of the fastest three backend frameworks: FastAPI, Fastify, and Hono.js using AutoCannon for benchmarking tests to highlight their strengths and suitability for different types of workloads.

Topics

Resources

Stars

Watchers

Forks