🌐
Slant
slant.co › versus › 1277 › 34241 › ~express-js_vs_fastapi
Slant - Express.js vs FastAPI detailed comparison as of 2025
When comparing Express.js vs FastAPI, the Slant community recommends Express.js for most people. In the question "What are the best web frameworks to create a web REST API?" Express.js is ranked 1st while FastAPI is ranked 4th
🌐
Medium
medium.com › deno-the-complete-reference › express-vs-fastapi-hello-world-performance-c6d18b0368e4
Express vs FastAPI: Hello world performance | Tech Tonic
April 19, 2023 - Express is the most popular web framework in the Node.js world. FastAPI is the most popular web framework in the Python world. We know that Express is quite slow, but it is the most popular one. In this article, I’ll run a quick comparison to find out who’s faster?
Discussions

I have done a full benchmark of a POST REST API on my computer: Node.js vs Fastify vs Express.js vs Deno vs Bun vs GO. Node.js is used WITH and WITHOUT clustering on 6-core I7 processor
This is really awesome work! You should write a Medium article so it reaches more people! And if you could share the source code in a github repo so that it is reproducible by anyone, even better! More on reddit.com
🌐 r/node
115
293
May 22, 2023
Introducing FastAPI
This is cool, but I'd really love to see the way you arrived at these numbers: Fast to code: Increase the speed to develop features by about 200% to 300% *. Less bugs: Reduce about 40% of human (developer) induced errors. * These are really ambitious claims, and they honestly make me trust your project less when you provide them without any hard data or methodology to back them up. More on reddit.com
🌐 r/Python
156
342
March 14, 2019
Flask, FastAPI or Express: Most Cost-Efficient /best for Low Budget App with JWT, OAuth, PostgreSQL?
1.Which stack (Flask, FastAPI, or Express.js) is more cost-effective for hosting with PostgreSQL? Recommendation: Flask Flask is the most cost-effective option for hosting with PostgreSQL for small-scale apps. It’s lightweight and has fewer dependencies, which means lower memory and processing requirements, making it cheaper to host on platforms like Heroku, DigitalOcean, or AWS. Flask’s simplicity makes it a great choice for projects that don’t require highly complex features upfront. If your apps grow and you need more resources, you can scale as necessary without significant cost overhead at the beginning. 2.Which stack (Flask, FastAPI, or Express.js) is easier to develop and better for both apps? Recommendation: FastAPI FastAPI is the better choice for development if you need a balance between ease of use and performance. It provides modern features like automatic validation, async support, and better API performance compared to Flask, making it ideal for apps that are expected to scale in the future. While it might have a steeper learning curve due to asynchronous programming, it is still considered developer-friendly, especially for API-based apps, like the ones you’re building. FastAPI’s automatic documentation generation is another bonus for quicker development. 3.Which platform offers the best free tier, and what backend/database combination is cheapest for scaling user logins, API calls, and data interactions? Recommendation: Heroku with Flask or FastAPI and PostgreSQL Heroku offers a generous free tier that works well for small apps using either Flask or FastAPI with PostgreSQL. It is easy to set up and manage, with built-in scaling options once your app grows. Heroku allows you to add additional resources (like database storage or API rate limits) as needed, making it cost-effective for early-stage apps while giving you room to scale up in a predictable pricing structure. More on reddit.com
🌐 r/PythonProjects2
1
1
September 19, 2024
Real world scenario FastAPI vs Node.js k8s cluster benchmarks
I’ve built many applications using Django and FastAPI and only a few with Go. Using Python allowed me to complete these projects within given time, resources, and budget constraints, which might not have been possible with other languages. Additionally, programmers' time costs much more than infrastructure, especially in the first years. I believe that once a company becomes successful, it has the flexibility to switch programming languages if needed. However, since two-thirds of my projects died this way on another, sticking with Python felt like a more efficient and less wasteful choice. More on reddit.com
🌐 r/FastAPI
35
24
January 10, 2025
🌐
JavaScript in Plain English
javascript.plainenglish.io › fastapi-vs-express-fbdc9fb3185d
FastAPI vs. Express. An In-Depth Comparison of Two Leading… | by Matteo Possamai | JavaScript in Plain English
June 27, 2023 - FastAPI follows a declarative ... documentation using OpenAPI and JSON Schema. On the other hand, Express employs a functional programming style and provides a more flexible approach to building web applications....
🌐
JavaScript in Plain English
javascript.plainenglish.io › a-comprehensive-comparison-of-express-and-fastapi-fbc1169a1095
A Comprehensive Comparison of Express and FastAPI | by Matteo Possamai | JavaScript in Plain English
May 25, 2023 - Asynchronous handling allows FastAPI to efficiently utilize system resources and handle a larger number of requests without sacrificing performance. Express can also scale well, but it may require additional effort or external libraries to achieve similar levels of performance. Express has a solid track record, being one of the pioneers in the Node.js ecosystem.
🌐
Quora
quora.com › How-does-Pythons-FastAPI-compare-to-Node-js-frameworks-in-terms-of-performance
How does Python's FastAPI compare to Node.js frameworks in terms of performance? - Quora
Answer (1 of 2): I think you should be comparing FastAPI with other python frameworks like Flask and Django, not JavaScript’s frameworks. FastAPI is a new thing, and like with all new things, there is still alot to be done. Alot of documentation to write, bugs to fix, features to add, ...
🌐
HostAdvice
hostadvice.com › blog › web-hosting › node-js › fastapi-vs-nodejs
Battle of the Backends: FastAPI vs. Node.js
October 22, 2025 - Ultimately, FastAPI makes building APIs in Python easier than ever before. It provides developers with modern tooling to quickly create robust and secure web applications that can handle large amounts of data quickly and efficiently. Looking for Reliable Python Hosting? See Our Top Picks ... Node.js is like a superhero in the software development world!
🌐
Go Chronicles
gochronicles.com › benchmark-restful-apis
Bench-marking RESTful APIs
August 11, 2021 - Now, you may be wondering Golang is using all CPU cores, but FastAPI and ExpressJS are utilizing only one CPU core per instance. Let's see how they perform when running on all CPU cores. ExpressJS is 1.5x faster than FastAPI.
🌐
Reddit
reddit.com › r/node › i have done a full benchmark of a post rest api on my computer: node.js vs fastify vs express.js vs deno vs bun vs go. node.js is used with and without clustering on 6-core i7 processor
r/node on Reddit: I have done a full benchmark of a POST REST API on my computer: Node.js vs Fastify vs Express.js vs Deno vs Bun vs GO. Node.js is used WITH and WITHOUT clustering on 6-core I7 processor
May 22, 2023 -

After seeing SO SO many benchmarks of Node.js vs GO where GO by default can use full CPU cores whereas Node.js is just run without clustering, I decided to do my own full benchmark on my machine with and without clustering Node.js to utilize full CPU cores.

My machine specs:

1] Macos, 16'inch 2019 model, I7 - 6 core 2.6 GH processor, 32GB RAM

The test:

Exposed a simple POST /benchmark API on ALL the servers. The api receives 1.4KB of JSON as a POST body payload, converts the JSON to native JSON object (in GO's case native struct, in Node.js/Bun/Deno's case native JSON object) and responds back with the EXACT same JSON (so it de-serializes the JSON back to a stringified one to be able to send the JSON back to caller).

Benchmark command:

wrk -t8 -c5000 -d120s -s ./post.lua --latency <URL>

Results:

Node.js vs Deno vs Bun vs express vs fastify vs GO (Req/Sec) Node.js vs Deno vs Bun vs express vs fastify vs GO (Max CPU used) Node.js vs Deno vs Bun vs express vs fastify vs GO (Max memory used) Node.js vs Deno vs Bun vs express vs fastify vs GO (Avg latency in ms) Node.js vs Deno vs Bun vs express vs fastify vs GO (Total data transfer/sec) Node.js vs Deno vs Bun vs express vs fastify vs GO (raw results)

TLDR:

1] With Clustering, the speed difference between Node.js/fastify vs GO (with GIN) is quite close. GO is 1.2x faster than Node.js/fastify with clustering and utilizing all CPU cores under very high load

2] Fastify speed is near identical (or even slightly better) to native Node.js HTTP module with/without clustering

3] GO (with GIN) uses almost 2x the CPU (835%) to achieve 1.2x the speed of Node.js/fastify (432% CPU) (with clustering)

4] GO (with GIN) uses 12x LESS memory compared to Node.js/fastify with clustering to achieve 1.2x more speed.

5] Bun actually is ALMOST 3x faster than Node.js (with/without fastify) on a single core without clustering. (Their claim was NOT WRONG).

6] Deno.js is ALMOST 1.5x faster than Node.js (with/without fastify) on a single core without clustering

7] Bun is ALMOST 2x faster than Deno on a single core without clustering.

8] Express.js has fallen SO SO MUCH behind and utilizes more CPU/ram and is SIGNIFICANTLY slower than everything, its not even comparable.

I hope this would be useful for the community here to have a good idea of how big a difference between Node vs GO vs Bun vs Deno vs Fastify vs Express could be.

Find elsewhere
🌐
Travisluong
travisluong.com › fastapi-vs-express-js-vs-flask-vs-nest-js-benchmark
FastAPI vs. Express.js vs. Flask vs. Nest.js Benchmark - Travis Luong
January 1, 2022 - It looks like the minimalist Express.js + pg combo wins this benchmarking round, followed by Flask with 4 gunicorn workers and Nest.js + Prisma. Flask with the “flask run” server had a large number of non-2xx or 3xx responses, as expected of a development server. FastAPI + psycopg2 + uvicorn, on the other hand, seemed to lag behind Express.js + pg by over 6x.
🌐
FastAPI
fastapi.tiangolo.com › alternatives
Alternatives, Inspiration and Comparisons - FastAPI
It was created to generate the HTML in the backend, not to create APIs used by a modern frontend (like React, Vue.js and Angular) or by other systems (like IoT devices) communicating with it. Django REST framework was created to be a flexible toolkit for building Web APIs using Django underneath, to improve its API capabilities. It is used by many companies including Mozilla, Red Hat and Eventbrite. It was one of the first examples of automatic API documentation, and this was specifically one of the first ideas that inspired "the search for" FastAPI.
🌐
Quora
quora.com › Can-a-Python-REST-API-compete-with-a-Node-js-REST-API
Can a Python REST API compete with a Node.js REST API? - Quora
Answer (1 of 4): The only benchmarks I've seen where a Python stack can serve a competitive number of requests to Node are with Tornado + Pypy + uwsgi. Even then, Node slightly edges out the Python stack. However, your bottlenecks are much more likely to be in the database and caching strategy w...
🌐
Reddit
reddit.com › r/python › introducing fastapi
r/Python on Reddit: Introducing FastAPI
March 14, 2019 -

FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints.

Documentation: https://fastapi.tiangolo.com

Source Code: https://github.com/tiangolo/fastapi

Key Features

  • Fast: Very high performance, on par with NodeJS and Go (thanks to Starlette and Pydantic). One of the fastest Python frameworks available.

  • Fast to code: Increase the speed to develop new features.

  • Fewer bugs: Reduce a high amount of human (developer) induced errors.

  • Intuitive: Great editor support. Completion (also known as auto-complete, autocompletion, IntelliSense) everywhere. Less time debugging.

  • Easy: Designed to be easy to use and learn. Less time reading docs.

  • Short: Minimize code duplication. Multiple features from each parameter declaration. Less bugs.

  • Robust: Get production-ready code. With automatic interactive documentation.

  • Standards-based: Based on (and fully compatible with) the open standards for APIs: OpenAPI (previously known as Swagger) and JSON Schema.

Installation

$ pip install fastapi

You will also need an ASGI server, for production such as Uvicorn.

$ pip install uvicorn

Example

Create it

  • Create a file main.py with:

from fastapi import FastAPI

app = FastAPI()


@app.get("/")
def read_root():
    return {"Hello": "World"}


@app.get("/items/{item_id}")
def read_item(item_id: int, q: str = None):
    return {"item_id": item_id, "q": q}

Or use async def...

Check it

Open your browser at http://127.0.0.1:8000/items/5?q=somequery.

You will see the JSON response as:

{"item_id": 5, "q": "somequery"}

You already created an API that:

  • Receives HTTP requests in the paths / and /items/{item_id}.

  • Both paths take GET operations (also known as HTTP methods).

  • The path /items/{item_id} has a path parameter item_id that should be an int.

  • The path /items/{item_id} has an optional str query parameter q.

Interactive API docs

Now go to http://127.0.0.1:8000/docs.

You will see the automatic interactive API documentation (provided by Swagger UI):

Alternative API docs

And now, go to http://127.0.0.1:8000/redoc.

You will see the alternative automatic documentation (provided by ReDoc):

🌐
freeCodeCamp
freecodecamp.org › news › build-restful-api-with-authentication-under-5-minutes-using-loopback-by-expressjs-no-programming-31231b8472ca
How to Build a RESTful API with Authentication in 5 minutes — all from your command line (Part 1)
January 27, 2018 - Setting up Authentication via CLI: If you have experience creating APIs, you know how tough it is to restrict parts of API using authentication. Setting up token-based authentication using Express+Node.js on the server side is a pain. All of that pain will be taken away by tasting the elixir of LoopBack!
🌐
Sweetcode
sweetcode.io › home › expressjs vs. flask
ExpressJS vs. Flask – Sweetcode.io
February 20, 2021 - Express is a minimal and flexible Node.js web framework providing the core resources and tools required to build web applications. Using Express, you can easily build web servers that are maintainable, readable and flexible.
🌐
GitHub
github.com › the-benchmarker › web-frameworks
GitHub - the-benchmarker/web-frameworks: Which is the fastest web framework?
Which is the fastest web framework? Contribute to the-benchmarker/web-frameworks development by creating an account on GitHub.
Starred by 7.1K users
Forked by 706 users
Languages   PHP 55.6% | Ruby 5.9% | JavaScript 4.9% | TypeScript 4.2% | Python 3.7% | Dockerfile 3.1%
🌐
GitHub
github.com › fastify › fastify
GitHub - fastify/fastify: Fast and low overhead web framework, for Node.js
November 9, 2025 - // ESM import Fastify from 'fastify' const fastify = Fastify({ logger: true }) // CommonJs const fastify = require('fastify')({ logger: true }) fastify.get('/', async (request, reply) => { reply.type('application/json').code(200) return { hello: 'world' } }) fastify.listen({ port: 3000 }, (err, address) => { if (err) throw err // Server is now listening on ${address} })
Starred by 35.2K users
Forked by 2.5K users
Languages   JavaScript 91.3% | TypeScript 8.7%
Top answer
1 of 6
22
A progressive Node.js framework for building efficient, reliable and scalable server-side applications.A progressive Node.js framework for building efficient, reliable and scalable server-side applications.Uses Typescript: There is a lot of cool stuff, like decorators, full-fledged object-oriented programming and static types. | Can choose between Express or Fastify integration | Dependency injection: Nest has really cool dependency injection system which allow loose coupling of parts in your application. | Modern: Allows you to structure your code using modern concepts. | Few examples | Almost the same architecture to Angular framework. Who knows Angular, can learn NestJS within few days (I believe). NestJS uses TypeScript which is very powerful.
2 of 6
16
Fast, unopinionated, minimalist web framework for Node.jsFast, unopinionated, minimalist web framework for Node.jsHas the largest userbase: It's by far the most popular framework for node. · | Relatively mature: Being a somewhat old Node.js web app framework and being one of the most widely used frameworks, Express.js has matured quite a lot during all that time. It's more stable than its competitors and a huge community backing it. · | Great routing API: Express' extremely powerful routing API allows developers to do tasks ranging from building a REST API to building the routes for a simple web app and then take it to the next level by using route parameters and query strings. · | Setting up is very easy: Setting up a new Express project is very easy. It consists of installing a handful of libraries through NPM run a single npm install and everything is ready to go. · | Support for a lot of plugins: Express takes advantage of Node's NPM to distribute and install countless plugins made by third parties which solve almost anything a developer would want to do with Express. · | Great for beginner Node.js programmers: With a little learning curve, it is a good choice for new NodeJS developers to get started quickly. Express boasts great, thorough documentation. · | Pleasant learning curve: Its really easy to set up and get started with your node.js server with this particular framework. | Great supportive community: Express has a big community with a lot of guides and tutorials written about it by developers that have been using it for quite some time. · | Good Oauth/Facebook integration with connect module: You can easily add oAuth integration/social logins to your next web app without much hassle, using this authentication middleware for connect. | Massive ecosystem of Middleware: If you have not already checked out the Express.js ecosystem of middleware, you should. | Lightweight | Express.js is in the Node.js Foundation Incubator Program: Node.js Foundation · Announcement here · The Node.js Foundation is a Collaborative Project at The Linux Foundation. Linux Foundation Collaborative Projects are independently funded software projects that harness the power of collaborative development to fuel innovation across industries and ecosystems. | Has detailed information: Very simple and fast. | Massive ecosystem of middleware: If you have not already checked out the Express.js ecosystem of middleware, you should. | No single recommended way of doing something: Express considers itself to be a "minimalistic unopinionated framework", it basically lets the developer determine how their project will be organized. On one hand, this gives anyone terrific power and flexibility to use any library they want for a certain task and to organize their project structure however they want. But on the other hand, there's no single recommended way of organizing things, which can be a trap for beginners and experienced developers alike and result in unmaintainable projects. · | Low speed compared to native: Not recommended for fast API applications, for that use the native API of node.js instead.