News for hackers. Stuff that matters.
Re:Async Python is not faster (2020) by aenis on Friday November 05, 2021 @11:40AM (#29120851)
Very much this. I run prod workloads with async python and indeed when you have some external I/O that can take a long time to complete - async fixes that.

One of my systems does around 8 api calls to service a request. It serves 80,000 daily users generating close to 2,000,000 expensive api calls and typically thats served by a single node running on a 2 core cpu. Gunicorn/starlette/fastapi.

The real problem with async in python is how easy it is to break it by introducing code or dependency that hogs the cpu every now and then. This usually means debugging weird timeouts that only happen every few days and are super hard to trace. Not sure I'd like to do async python again but it sure is efficient for I/O heavy workloads.

There are no comments on this comment yet.