How FastAPI Handles Requests Behind the Scenes

preview_player
Показать описание
Unleash the power of FastAPI! Discover how Asyncio and blocking I/O impact performance. Learn to handle requests concurrently for a blazing-fast API! In this video, we explore FastAPI's handling of concurrent requests. We'll compare Asyncio vs Blocking methods and see how normal functions differ. Understand when to use each approach for optimal performance. Optimize your FastAPI application and handle more requests efficiently. Subscribe for more FastAPI deep dives!

fastapi handle concurrent requests
fastapi async vs def performance
improve fastapi performance
fastapi endpoint order of execution
fastapi async def blocking io
fastapi thread pool vs event loop
fastapi best practices for concurrency
how to use asyncio in fastapi for database calls
fastapi handle multiple requests at once efficiently
choose async def vs def in fastapi endpoints
fastapi concurrency with external api calls

#FastAPI #Asyncio #Python #WebDevelopment
Рекомендации по теме
Комментарии
Автор

Great content brother
Quick Modification: sync router is Concurrency not Parallelism. In python parallelism is achieved only by multiprocessing

moneeshkumar
Автор

This is very valuable content.
New job, starting to work on FastAPI. The whole python paradigm is new for me. This video helped clear one of the most critical concept for me. Thanks brother.

PriyankRupareliya
Автор

Great video, but I think it’s important to mention that multi-threading in Python is not parallel

vladhaidukkk-learning
Автор

OMG! This is so helpful and a great video. Thank you and please post more videos like this!

정하은-hs
Автор

Nice explanation. Concise and to the point.

vikranttyagiRN
Автор

Great explanation, you should create more videos bro...

sanyk
Автор

Thank you for this, I always wondered the difference between async def and def

AnaskiBaithak
Автор

its working as explained in unix but for some reason its a different behavior in windows

ArulMuruganAS
Автор

Hello, great video. I am super new to python. And started using very recently for backend where its being used along with FastAPI. Can you please tell me what are some concepts/ topics which I should be aware for developing efficient code.
For eg from this video, I learnt that which function runs concurrently and which doesn't. I had no idea tbh about this before.
If you could spare few minutes and share some stuff which I should know it would be great.

rainbowrunner
Автор

My question would be how FastAPI then manages workload when it´s handed over to the worker thread. Because I can only see one worker thread running, at the same time it handles 40 'workloads' concurrently.

sticksen
Автор

I need some help, I want to create a fast api endpoint that calls a synchronous function that has a lot of blocking I/0 operations. But I want the endpoint function to run asynchronously so it can accept many requests at the same time. How should I do this, is there an alternative approach?

lwangacaleb
Автор

def endpoint3() is not running parallely for me as supposed to what u said in the video. Instead it is sunning one at a time. Do u know why?

arjunc
Автор

Thanks man for the video. I am trying to use fast api for db CRUD, which one do you think i should use for get post put and delete?

thanhlongle
Автор

2 and 3 look the same. hello of each is printed first then bye from each. how is 2 and 3 different? its not explained crystal clearly

adityahpatel
Автор

can you make fastapi how run under the hood and how @app.exception_handler work Thanks awesome contentent

udaym