4 ms·
I don’t know about Starlette/FastAPI, but generally a true async server could still see a benefit, because while that downstream call is blocked waiting on a re
by cle 7y ago
I don’t know about Starlette/FastAPI, but generally a true async server could still see a benefit, because while that downstream call is blocked waiting on a response, the OS thread can switch to a different request. This is in contrast to a more traditional one-OS-thread-per-request model, where each thread spends the vast majority of its time waiting on I/O. If your work is I/O bound you can use expensive OS threads much more efficiently. Depends on your workload characteristics and requirements.