3 ms·
tl;dr: Async (1) is not faster, (2) does not scale, and (3) is not stable under load. Yes and no matter how many times its said people will still opt for the a
by stickyricky 5y ago
tl;dr: Async (1) is not faster, (2) does not scale, and (3) is not stable under load.
Yes and no matter how many times its said people will still opt for the async option even though its slower in the general case. I went so far as to benchmark this myself in 2019 using EC2, digital ocean, and my local machine. I nearly published a blog post but I don't appreciate the attention that brings.
Gunicorn is not stable under heavy load. uWSGI delivers better throughput. If we talk about cloud environments exclusively, uWSGI is better full stop.
If you have endpoints with long awaits consider a strategy other than holding open the connection. If you need to run a socket server then run it separately from your api server.