r/FastAPI • • Mar 22 '25

Question Is fastApi really fast?

I’ve seen a few benchmarks showing that FastAPI can be quite fast. Unfortunately, I haven’t been able to reproduce that locally. I’m specifically interested in FastAPI’s performance with a single worker. After installing FastAPI and writing a simple “hello world” endpoint, I can’t get past 500 requests per second. Is that the maximum performance FastAPI can achieve? Can anyone confirm this?

73 Upvotes

51 comments sorted by

View all comments

Show parent comment

2

u/greenerpickings Mar 22 '25

Second this. Dont have benchmarks, but we had NiFi sending requests to an app behind uvicorn. It was usually ~300rps. OPs number 500 seems interesting because that's when I would start seeing closed connection errors. Switched to NGINX Unit and no more premature drops.

Was unaware of Granian. Seems pretty awesome at first glance and the Rust equivalent.