The Npgsql (PostgresQL driver for .NET) contributors have been looking into other drivers implementation to understand where improvements can be done.
Here is a current picture for the multi-queries scenario:

There are several frameworks around 30-34K (not all displayed here) and then a subsequent jump to ~60K.
After analyzing the network traffic between the Drogon framework and the Postgres server, which is represented in the following screenshot and validated by other specific payloads, it appears that queries issued from multiple http requests are coalesced in the same network packets and executed with a single "SYNC" command which will tell Postgres to execute them "as a batch".

Bundling together multiple commands in a single Sync batch has important consequences: if any command errors (e.g. unique constraint violation), all later commands are skipped until the Sync. Even more importantly, all commands are implicitly part of the same transaction.
Here we have not only implicit batching for the same request (20 queries), but more importantly batching across requests.
Our interpretation of the TechEmpower rule below leads us to believe that this method violates those rules
Except where noted, all database queries should be delivered to the database servers as-is and not coalesced or deduplicated at the database driver. In all cases where a database query is required, it is expected that the query will reach and execute on the database server. However, it is permissible to pipeline traffic between the application and database as a network-level optimization. That is, two or more separate queries may be delivered from the application to the database in a single transmission over the network, and likewise for query results from the database back to the application, as long as the queries themselves are executed separately on the database server and not combined into a single complex query.
We haven't looked if the other frameworks showing the same high performance are using the same technique.
/cc @an-tao @roji
The Npgsql (PostgresQL driver for .NET) contributors have been looking into other drivers implementation to understand where improvements can be done.
Here is a current picture for the multi-queries scenario:
There are several frameworks around 30-34K (not all displayed here) and then a subsequent jump to ~60K.
After analyzing the network traffic between the Drogon framework and the Postgres server, which is represented in the following screenshot and validated by other specific payloads, it appears that queries issued from multiple http requests are coalesced in the same network packets and executed with a single "SYNC" command which will tell Postgres to execute them "as a batch".
Bundling together multiple commands in a single Sync batch has important consequences: if any command errors (e.g. unique constraint violation), all later commands are skipped until the Sync. Even more importantly, all commands are implicitly part of the same transaction.
Here we have not only implicit batching for the same request (20 queries), but more importantly batching across requests.
Our interpretation of the TechEmpower rule below leads us to believe that this method violates those rules
We haven't looked if the other frameworks showing the same high performance are using the same technique.
/cc @an-tao @roji