Architecture Flask Vs FastAPI
Answer : This seemed a little interesting, so i ran a little tests with ApacheBench : Flask from flask import Flask from flask_restful import Resource, Api app = Flask(__name__) api = Api(app) class Root(Resource): def get(self): return {"message": "hello"} api.add_resource(Root, "/") FastAPI from fastapi import FastAPI app = FastAPI(debug=False) @app.get("/") async def root(): return {"message": "hello"} I ran 2 tests for FastAPI, there was a huge difference: gunicorn -w 4 -k uvicorn.workers.UvicornWorker fast_api:app uvicorn fast_api:app --reload So here is the benchmarking results for 5000 requests with a concurrency of 500: FastAPI with Uvicorn Workers Concurrency Level: 500 Time taken for tests: 0.577 seconds Complete requests: 5000 Failed requests: 0 Total transferred: 720000 bytes HTML transferred: 95000 bytes Requests per second: 8665.48 [#/sec] ...