Why so fast a web framework?

Chris Angelico rosuav at gmail.com
Thu Oct 28 15:28:33 EDT 2021


On Fri, Oct 29, 2021 at 6:17 AM Calvin Spealman <cspealma at redhat.com> wrote:
>
> I don't think there's anything meaningful being compared in that so-called
> "benchmark" at all. There is no evidence that its worth even the smallest
> bit of attention.
>
> You want to write a web service? Do it. Use Python or PHP, or whatever you
> prefer. Do you think your service is "slow"? You won't know until you
> measure *your* service and compare that against actual requirements you
> have. There is no context here to discuss performance and performance can
> *only* be discussed in a context.
>
> "SQL queries per second" is pointless. Why are you making so many SQL
> queries? If you want your service to be more efficient, make fewer queries!
>

In my experience, using PostgreSQL, a more viable metric is
"transactions per second" - throughput is very similar regardless of
the number of queries per transaction. As a general rule, a web
service should be doing at most one transaction per query, so
throughput in requests per second will be equal to transactions per
second plus however many can be returned from cache (which, for some
applications, will be zero).

Sadly, many people still bow down in worship at the little tin god,
while completely ignoring the fact that proper transactional integrity
will improve *business* performance by, yaknow, not losing data... and
it still often works out faster than doing things wrongly.

ChrisA


More information about the Python-list mailing list