How FastAPI Handles Requests Behind the Scenes

Sdílet
Vložit
  • čas přidán 29. 03. 2024
  • 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
    fastapi asyncio.sleep vs time.sleep
    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

Komentáře • 31

  • @moneeshkumar1838

    Great content brother

  • @vladhaidukkk-learning

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

  • @ishaquenizamani9800

    Thanks for clearing this concept.

  • @user-dr7yi2fj6x

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

  • @AnaskiBaithak

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

  • @PyPeak

    Beautifully explained!

  • @vikranttyagiRN

    Nice explanation. Concise and to the point.

  • @Shane1994322

    Clearly explained!! Thank you

  • @myselfriz

    very well explanation.

  • @ChrisHalden007

    Great video. Thanks

  • @sany2k8

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

  • @adrianmisak07

    great video

  • @thanhlongle6276

    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?

  • @sticksen

    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.

  • @lwangacaleb2729

    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?

  • @arjunc5896

    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?

  • @robertavetisyan8282

    boooozi txeq

  • @udaym4204

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