4 ms·
Techempower benchmark: https://www.techempower.com/benchmarks/#section=data-r19&hw=ph&test=plaintext&l=zijzen-1r https://www.techempower.com/benchmarks/#section
by rahuldj 6y ago
Techempower benchmark: https://www.techempower.com/benchmarks/#section=data-r19&hw=ph&test=plaintext&l=zijzen-1r https://www.techempower.com/benchmarks/#section=data-r19&hw=... makes the difference between async python frameworks and sync frameworks pretty clear.
Async results in better utilization of system resources... since there aren't entire threads with app state blocked on IO requests (which would consume a chunk of system memory.)
Considering that a web app is most commonly waiting for a database operation, a single server can serve many more active requests simultaneously (since each active request is not allocating an app instance.)
- calpaterson 6y agoThe techempower benchmark predates me and original drafts of my blogpost mention it but I suppose that got cut for various reasons. The trouble with that benchmark is that (and they're fairly open about this) they aren't keeping things the same between frameworks - there are multiple variables. If you look at the Flask code all the queries are being put through SQLAlchemy but for various async frameworks they're using the database driver directly and using native code libraries for JSON decoding. I think techempower's benchmarks are interesting but they don't help you do a comparision of async vs sync. Additionally on the particular benchmark you've linked to #1 is a dead experimental framework that is not in wide use and #2 is Falcon, a sync framework that is in wide use.