All Questions
2 questions
12
votes
3
answers
11k
views
Processing requests in FastAPI sequentially while staying responsive
My server exposes an API for a resource-intensive rendering work. The job it does involves a GPU and as such the server can handle only a single request at a time. Clients should submit a job and ...
102
votes
2
answers
84k
views
FastAPI runs API calls in serial instead of parallel fashion
I have the following code:
from fastapi import FastAPI, Request
import time
app = FastAPI()
@app.get("/ping")
async def ping(request: Request):
print("Hello")
time....