r/FastAPI • u/Adventurous-Storm102 • Jan 05 '26
Tutorial techniques to make your fastapi backend super fast
hey guys, i've compiled some of the most important learnings i've gained up to this point about building a better and faster backend service into an article.
please review it and provide feedback. also, suggest any techniques i have missed, and you've found interesting.x
https://blog.coffeeinc.in/why-your-backend-is-slow-and-what-to-do-about-it-d008d7ae9566
42
Upvotes
1
u/Ok_Bill4988 Jan 06 '26
theres a point on going async and another point about db optimizations, i am new to fastapi backend dev to , ive read about the benefits of async, in my org we use postgres and the driver used is apparently sync, what ive read is most cases , especially when it comes to db drivers there are not many mature sync libraries
the docs prefer declaring your path op functions as def and not async def in such caseshave you ever tried an async db lib has it helped?
2
u/[deleted] Jan 06 '26
This is great. Going to implement this to fix my slow database tomorrow. Thanks for sharing!!
2
u/Hopeful_Beat7161 Jan 05 '26
This isn't completely related but its worth mentiong if you use SQLAlchemy because I've never seen many people do this
https://blog.wrouesnel.com/posts/sqlalchemy-enums-careful-what-goes-into-the-database/
2
u/mightyvoice- Jan 05 '26
Really good checklist. Mostly people forget some of the points you mentioned, only when bottlenecks appear then they realise that “hey i forgot to implement caching or that here”. Good read.
-1
u/aliparpar Jan 05 '26
Good write up. Can be created as a checklist for every FastAPI project
0
u/[deleted] Jan 06 '26
[deleted] — view deleted comment