2 vCPU, 4 GB RAM : 3,712 to 5,418 requests per second for a whole table.
API Maker 4.0.0 on a Linode Dedicated 4 GB (g6-dedicated-2) : 2 dedicated vCPUs and 4 GB of RAM at $36 a month, its databases on the same machine. Every API was loaded for 15 seconds by autocannon from a second server, two times, on MongoDB, PostgreSQL and MySQL, public and with two tokens, while the server sampled the memory and CPU of every part each second.
The server¶
| Server | Linode (Akamai Cloud), Dedicated 4 GB (g6-dedicated-2), dedicated cpu, $36 / month |
| CPU | AMD EPYC 7642 48-Core Processor, 2 dedicated vCPUs (KVM) KVM guest, 1 thread per core · L1d 128 KiB (2 instances) · L2 1 MiB (2 instances) · L3 32 MiB (2 instances) · BogoMIPS 4599.99 |
| Memory | 4 GB (3,915 MB usable), swap 4.3 GB (496 MB of Linode + 3.8 GB made by the installer) |
| Disk, region | 80 GB SSD, Mumbai, India (ap-west) |
| System | Ubuntu 24.04.4 LTS, Linux 6.8.0-134, Docker 29.9.0 |
| API Maker | 4.0.0 : release build of api_maker_be_rust 864bb64 (opt-level 3, fat LTO), installed by its installer (https://apimaker.dev/v4/install.sh), no reverse proxy |
| Settings | the defaults of the installer (lean code of the account runs in the server with QuickJS : sandbox.codeInServer), and the sandboxes kept running for the whole run (removeSandboxInactiveSinceMinutes 1440) |
| Databases | MongoDB 8.0.10 (the MongoDB of API Maker, a replica set of one member, in Docker) · Redis 7.0.5 (the Redis of API Maker, in Docker) · PostgreSQL 18.6 (official image postgres:18, max_connections 500) · MySQL 8.4.11 (official image mysql:8.4, max_connections 500) : all on the same server |
| Sandboxes | TypeScript on Node.js 24.21.0 (an image of 403 MB built by API Maker), 2 sandboxes of the account (sandboxCountForAdmin 2, the default), each opening up to 2 runners when it is busy (one per vCPU) |
| Load generator | Dedicated 16 GB (g6-dedicated-8) : AMD EPYC 7642 48-Core Processor, 8 dedicated vCPUs, Ubuntu 24.04.4 LTS, Node.js 24.21.0, autocannon 8.0.0 with 5 worker threads |
| Network | Private network of the same data centre, round trip 0.33 ms (ping) |
| Host | A strict anti-affinity placement group kept the three dedicated CPU servers (2, 4 and 8 vCPUs) on three different hosts. All seven servers were measured at the same time, each by a load generator of its own. |
| Date | 12 October 2026, 05:30 to 06:44 UTC |
Only what a database needs was running while it was measured : API Maker and its two sandboxes, its MongoDB and Redis (API Maker always needs them) and the database under test. The other benchmark databases were stopped, API Maker was restarted and the swap emptied back into memory before each database, when it fitted there. How every number was taken : How API Maker is benchmarked. Every server side by side : All results.
The data¶
Every table holds the ten rows of the API Maker benchmark dataset : https://apimaker.dev/json/benchmark_dataset.json. Ten customers, ten columns each ; a get all answers all ten (2,418 bytes of JSON on MongoDB), a get by id one of them.
_id |
customer_id |
first_name |
last_name |
phone |
last_update |
pincode |
shipping_id |
dob |
country |
|---|---|---|---|---|---|---|---|---|---|
| 60ae2488c37cd955cc144161 | 2 | NICK | WAHLBERG | 1123456789 | 2006-02-15T04:34:00.330Z | 111111 | 2 | 2022-10-30T03:25:03.000Z | India |
| 60ae24c8c37cd955cc144162 | 1 | PENELOPE | GUINESS | 123456789 | 2006-02-15T04:34:00.330Z | 100050 | 1 | 2022-10-30T03:25:03.000Z | India |
| 60ae247ac37cd955cc144160 | 3 | ED | CHASE | 2123456789 | 2006-02-15T04:34:00.330Z | 222222 | 3 | 2022-10-30T03:25:03.000Z | India |
| 60ace1401efc56684403c68c | 4 | JENNIFER | DAVIS | 3123456789 | 2006-02-15T04:34:00.330Z | 100050 | 4 | 2022-10-30T03:25:03.000Z | India |
| 60accda51efc56684403c685 | 5 | JOHNNY | LOLLOBRIGIDA | 4123456789 | 2006-02-15T04:34:00.330Z | 485125 | 1 | 2022-10-30T03:25:03.000Z | India |
| 606b7d364bebce00196eade7 | 6 | JOHNNY | LOLLOBRIGIDA | 5123456789 | 2006-02-15T04:34:00.330Z | 123456 | 2 | 2022-10-30T03:25:03.000Z | India |
| 606b75961055000018fa9d98 | 7 | GRACE | MOSTEL | 6123456789 | 2006-02-15T04:34:00.330Z | 356589 | 3 | 2022-10-30T03:25:03.000Z | India |
| 6064dd02730026001956663e | 8 | MATTHEW | JOHANSSON | 7123456789 | 2006-02-15T04:34:00.330Z | 100050 | 4 | 2022-10-30T03:25:03.000Z | India |
| 6064dcb8730026001956663c | 9 | JOE | SWANK | 8123456789 | 2006-02-15T04:34:00.330Z | 251415 | 1 | 2022-10-30T03:25:03.000Z | India |
| 6064c4c02bafb90018955299 | 10 | CHRISTIAN | GABLE | 9123456789 | 2006-02-15T04:34:00.330Z | 100050 | 2022-10-30T03:25:03.000Z | India |
Results at a glance¶
Requests per second, the average of two rounds of 15 seconds with 100 connections. Public APIs need no token ; both tokens means every request carries x-am-authorization (the token of an API user, whose groups decide what it may call) and x-am-user-authorization (the token of a row of the customers table, made by a DB token generator), and API Maker checks both.
| API | Access | MongoDB | PostgreSQL | MySQL |
|---|---|---|---|---|
| Get all | Public | 3,712 p99 68 ms | 4,782 p99 24 ms | 5,418 p99 22 ms |
| Get all | Both tokens | 3,564 p99 48 ms | 4,384 p99 27 ms | 4,939 p99 24 ms |
| Get all with caching | Public | 15,152 p99 10 ms | 14,883 p99 10 ms | 15,123 p99 9 ms |
| Get all with caching | Both tokens | 11,750 p99 12 ms | 11,615 p99 12 ms | 11,626 p99 13 ms |
| Get all by stream | Public | 3,661 p99 50 ms | 4,837 p99 25 ms | 5,034 p99 23 ms |
| Get all by stream | Both tokens | 3,462 p99 48 ms | 4,427 p99 26 ms | 4,518 p99 26 ms |
| Custom API calling get all QuickJS | Public | 2,591 p99 62 ms | 3,059 p99 37 ms | 3,357 p99 35 ms |
| Custom API calling get all QuickJS | Both tokens | 2,420 p99 67 ms | 2,801 p99 41 ms | 3,058 p99 38 ms |
| Custom API in the sandbox Sandbox | Public | 2,269 p99 77 ms | 2,389 p99 72 ms | 2,714 p99 64 ms |
| Get all with a pre hook QuickJS | Both tokens | 2,713 p99 61 ms | 3,246 p99 36 ms | 3,524 p99 59 ms |
| Get by id | Public | 4,323 p99 42 ms | 5,090 p99 22 ms | 5,874 p99 20 ms |
| Get by id | Both tokens | 4,044 p99 41 ms | 4,626 p99 40 ms | 5,304 p99 22 ms |
| Get by id with caching | Public | 16,455 p99 9 ms | 16,517 p99 9 ms | 16,379 p99 9 ms |
| Get by id with caching | Both tokens | 12,553 p99 12 ms | 12,500 p99 12 ms | 12,515 p99 12 ms |
| Insert one row | Public | 1,735 p99 99 ms | 2,335 p99 49 ms | 2,081 p99 54 ms |
| Custom API without a database | Public | 10,790 p99 13 ms | ||
| Custom API without a database, in the sandbox | Public | 9,953 p99 16 ms |
0 errors Every one of the 10,989,400 requests of these runs was answered with status 200 or 201 : no error, no timeout.
Memory¶
What each part of the server held, in MB : at rest (the 60 seconds after API Maker and its sandboxes started, before any request) and under load. The bars show the second the whole server held the most memory while its database was loaded, out of the 3,915 MB of the server ; the table gives the most each part held on its own. API Maker is the resident memory of its process ; a container is counted the way docker stats counts it.
| Part | MongoDB at rest → under load |
PostgreSQL at rest → under load |
MySQL at rest → under load |
|---|---|---|---|
| API Maker (process), in RAM | 99 → 127 | 99 → 120 | 98 → 124 |
| … and in swap | 0 → 0 | 0 → 0 | 0 → 0 |
| MongoDB of API Maker, in RAM | 125 → 234 | 224 → 224 | 224 → 224 |
| … and in swap | 0 → 0 | 0 → 0 | 0 → 0 |
| Redis, in RAM | 3 → 3 | 3 → 3 | 3 → 3 |
| Database under test, in RAM | MongoDB above | 41 → 140 | 422 → 492 |
| … and in swap | MongoDB above | 0 → 0 | 0 → 0 |
| Sandboxes (2 containers), in RAM | 50 → 323 | 50 → 239 | 50 → 238 |
| … and in swap | 0 → 0 | 0 → 0 | 0 → 0 |
| Whole server, RAM used | 773 → 1222 | 1000 → 1279 | 1339 → 1600 |
| Swap used | 0 → 0 | 0 → 0 | 0 → 0 |
CPU¶
On 2 vCPUs, API Maker, the database and the sandboxes share the same 2 vCPUs : every request costs the work of all of them. During get all, public, the CPU was split this way (average of the 15 seconds, in vCPUs : 2.0 is the whole server ; a process counts its own kernel time) :
| MongoDB | PostgreSQL | MySQL | |
|---|---|---|---|
| API Maker | 0.8 vCPU | 0.9 vCPU | 1.0 vCPU |
| The database | 0.8 vCPU | 0.7 vCPU | 0.6 vCPU |
| MongoDB of API Maker (when it is not the one tested) | – | 0.0 vCPU | 0.0 vCPU |
| Sandboxes (idle : no code runs in get all) | 0.0 vCPU | 0.0 vCPU | 0.0 vCPU |
| Whole server busy (of its 2 vCPUs) | 100 % | 98 % | 97 % |
| … of which kernel time (network, disk), counted in the lines above too | 35 % | 38 % | 41 % |
Steal time (CPU the hypervisor gave to other servers) was 0 % on average, 1 % at most. The load generator, sampled the same way, was never more than 17 % busy over its 8 cores : it was never the limit.
Get all¶
The schema API of a table answers all its rows : GET /api/schema/<user>/<instance>/<database>/<table>. Every request reads the ten rows from the database, converts them with the schema of the table and sends them as JSON. About this API.
Get all : public¶
No token : the API is public. Each answer : 2,418 bytes (MongoDB), status 200.
2 rounds of 15 s 1 : 3,812 · 2 : 3,613 req/s · spread 5.3 % · the output below is round 2, the closer to the average
Server during this run API Maker 0.8 vCPU, 123 MB RSS · MongoDB 0.8 vCPU · sandboxes 0.0 vCPU, 316 MB · whole server busy 100 %, of which kernel (network, disk) 35 % · memory used 1204 MB of 3915 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers_public"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers_public
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬──────────┬────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼──────────┼────────┤
│ Latency │ 13 ms │ 26 ms │ 52 ms │ 68 ms │ 27.16 ms │ 10.57 ms │ 218 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴──────────┴────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 2,301 │ 2,301 │ 3,713 │ 3,791 │ 3,613.14 │ 357.77 │ 2,300 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 6.29 MB │ 6.29 MB │ 10.2 MB │ 10.4 MB │ 9.88 MB │ 979 kB │ 6.29 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 1 │
├────────────┼──────────────┤
│ 0.01 │ 2 │
├────────────┼──────────────┤
│ 0.1 │ 6 │
├────────────┼──────────────┤
│ 1 │ 10 │
├────────────┼──────────────┤
│ 2.5 │ 13 │
├────────────┼──────────────┤
│ 10 │ 18 │
├────────────┼──────────────┤
│ 25 │ 22 │
├────────────┼──────────────┤
│ 50 │ 26 │
├────────────┼──────────────┤
│ 75 │ 30 │
├────────────┼──────────────┤
│ 90 │ 36 │
├────────────┼──────────────┤
│ 97.5 │ 52 │
├────────────┼──────────────┤
│ 99 │ 68 │
├────────────┼──────────────┤
│ 99.9 │ 117 │
├────────────┼──────────────┤
│ 99.99 │ 185 │
├────────────┼──────────────┤
│ 99.999 │ 218 │
└────────────┴──────────────┘
54k requests in 15.02s, 148 MB read
2 rounds of 15 s 1 : 4,790 · 2 : 4,773 req/s · spread 0.3 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.9 vCPU, 107 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.7 vCPU · sandboxes 0.0 vCPU, 50 MB · whole server busy 98 %, of which kernel (network, disk) 38 % · memory used 979 MB of 3915 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers_public"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers_public
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼────────┼───────┤
│ Latency │ 18 ms │ 20 ms │ 23 ms │ 24 ms │ 20.38 ms │ 1.3 ms │ 30 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 4,727 │ 4,727 │ 4,799 │ 4,855 │ 4,789.74 │ 33.04 │ 4,725 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 11.5 MB │ 11.5 MB │ 11.6 MB │ 11.8 MB │ 11.6 MB │ 79.4 kB │ 11.5 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 6 │
├────────────┼──────────────┤
│ 0.01 │ 8 │
├────────────┼──────────────┤
│ 0.1 │ 12 │
├────────────┼──────────────┤
│ 1 │ 18 │
├────────────┼──────────────┤
│ 2.5 │ 18 │
├────────────┼──────────────┤
│ 10 │ 19 │
├────────────┼──────────────┤
│ 25 │ 20 │
├────────────┼──────────────┤
│ 50 │ 20 │
├────────────┼──────────────┤
│ 75 │ 21 │
├────────────┼──────────────┤
│ 90 │ 22 │
├────────────┼──────────────┤
│ 97.5 │ 23 │
├────────────┼──────────────┤
│ 99 │ 24 │
├────────────┼──────────────┤
│ 99.9 │ 27 │
├────────────┼──────────────┤
│ 99.99 │ 29 │
├────────────┼──────────────┤
│ 99.999 │ 30 │
└────────────┴──────────────┘
72k requests in 15.02s, 174 MB read
2 rounds of 15 s 1 : 5,438 · 2 : 5,399 req/s · spread 0.7 % · the output below is round 2, the closer to the average
Server during this run API Maker 1.0 vCPU, 117 MB RSS · MongoDB 0.0 vCPU · MySQL 0.6 vCPU · sandboxes 0.0 vCPU, 238 MB · whole server busy 97 %, of which kernel (network, disk) 41 % · memory used 1599 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers_public"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers_public
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 16 ms │ 18 ms │ 21 ms │ 22 ms │ 18.02 ms │ 1.36 ms │ 28 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Req/Sec │ 5,295 │ 5,295 │ 5,423 │ 5,491 │ 5,398.8 │ 56.22 │ 5,295 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Bytes/Sec │ 12.8 MB │ 12.8 MB │ 13.1 MB │ 13.3 MB │ 13.1 MB │ 136 kB │ 12.8 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 2 │
├────────────┼──────────────┤
│ 0.1 │ 7 │
├────────────┼──────────────┤
│ 1 │ 16 │
├────────────┼──────────────┤
│ 2.5 │ 16 │
├────────────┼──────────────┤
│ 10 │ 17 │
├────────────┼──────────────┤
│ 25 │ 17 │
├────────────┼──────────────┤
│ 50 │ 18 │
├────────────┼──────────────┤
│ 75 │ 19 │
├────────────┼──────────────┤
│ 90 │ 19 │
├────────────┼──────────────┤
│ 97.5 │ 21 │
├────────────┼──────────────┤
│ 99 │ 22 │
├────────────┼──────────────┤
│ 99.9 │ 25 │
├────────────┼──────────────┤
│ 99.99 │ 27 │
├────────────┼──────────────┤
│ 99.999 │ 28 │
└────────────┴──────────────┘
81k requests in 15.02s, 196 MB read
Get all : both tokens¶
With x-am-authorization and x-am-user-authorization, both checked on every request. Each answer : 2,418 bytes (MongoDB), status 200.
2 rounds of 15 s 1 : 3,585 · 2 : 3,544 req/s · spread 1.1 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.9 vCPU, 114 MB RSS · MongoDB 0.8 vCPU · sandboxes 0.0 vCPU, 51 MB · whole server busy 100 %, of which kernel (network, disk) 34 % · memory used 830 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼────────┤
│ Latency │ 13 ms │ 27 ms │ 44 ms │ 48 ms │ 27.39 ms │ 7.82 ms │ 133 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 3,495 │ 3,495 │ 3,591 │ 3,647 │ 3,584.74 │ 39.98 │ 3,495 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 9.56 MB │ 9.56 MB │ 9.82 MB │ 9.98 MB │ 9.8 MB │ 110 kB │ 9.56 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 1 │
├────────────┼──────────────┤
│ 0.01 │ 2 │
├────────────┼──────────────┤
│ 0.1 │ 4 │
├────────────┼──────────────┤
│ 1 │ 10 │
├────────────┼──────────────┤
│ 2.5 │ 13 │
├────────────┼──────────────┤
│ 10 │ 18 │
├────────────┼──────────────┤
│ 25 │ 23 │
├────────────┼──────────────┤
│ 50 │ 27 │
├────────────┼──────────────┤
│ 75 │ 32 │
├────────────┼──────────────┤
│ 90 │ 37 │
├────────────┼──────────────┤
│ 97.5 │ 44 │
├────────────┼──────────────┤
│ 99 │ 48 │
├────────────┼──────────────┤
│ 99.9 │ 66 │
├────────────┼──────────────┤
│ 99.99 │ 123 │
├────────────┼──────────────┤
│ 99.999 │ 133 │
└────────────┴──────────────┘
54k requests in 15.02s, 147 MB read
2 rounds of 15 s 1 : 4,423 · 2 : 4,346 req/s · spread 1.8 % · the output below is round 2, the closer to the average
Server during this run API Maker 1.0 vCPU, 115 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.6 vCPU · sandboxes 0.0 vCPU, 238 MB · whole server busy 98 %, of which kernel (network, disk) 35 % · memory used 1266 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 20 ms │ 22 ms │ 26 ms │ 27 ms │ 22.51 ms │ 1.47 ms │ 36 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 4,303 │ 4,303 │ 4,339 │ 4,407 │ 4,345.47 │ 28.92 │ 4,302 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 10.4 MB │ 10.4 MB │ 10.5 MB │ 10.7 MB │ 10.5 MB │ 69.7 kB │ 10.4 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 6 │
├────────────┼──────────────┤
│ 0.01 │ 11 │
├────────────┼──────────────┤
│ 0.1 │ 14 │
├────────────┼──────────────┤
│ 1 │ 20 │
├────────────┼──────────────┤
│ 2.5 │ 20 │
├────────────┼──────────────┤
│ 10 │ 21 │
├────────────┼──────────────┤
│ 25 │ 22 │
├────────────┼──────────────┤
│ 50 │ 22 │
├────────────┼──────────────┤
│ 75 │ 23 │
├────────────┼──────────────┤
│ 90 │ 24 │
├────────────┼──────────────┤
│ 97.5 │ 26 │
├────────────┼──────────────┤
│ 99 │ 27 │
├────────────┼──────────────┤
│ 99.9 │ 31 │
├────────────┼──────────────┤
│ 99.99 │ 35 │
├────────────┼──────────────┤
│ 99.999 │ 36 │
└────────────┴──────────────┘
65k requests in 15.02s, 158 MB read
2 rounds of 15 s 1 : 4,968 · 2 : 4,910 req/s · spread 1.2 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.0 vCPU, 110 MB RSS · MongoDB 0.0 vCPU · MySQL 0.6 vCPU · sandboxes 0.0 vCPU, 51 MB · whole server busy 98 %, of which kernel (network, disk) 39 % · memory used 1358 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 18 ms │ 20 ms │ 23 ms │ 24 ms │ 19.62 ms │ 1.36 ms │ 32 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬───────┬───────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼───────┼───────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 4,931 │ 4,931 │ 4,971 │ 5,015 │ 4,968.14 │ 27.4 │ 4,929 │
├───────────┼───────┼───────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 12 MB │ 12 MB │ 12.1 MB │ 12.2 MB │ 12 MB │ 66.3 kB │ 11.9 MB │
└───────────┴───────┴───────┴─────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 2 │
├────────────┼──────────────┤
│ 0.01 │ 6 │
├────────────┼──────────────┤
│ 0.1 │ 14 │
├────────────┼──────────────┤
│ 1 │ 17 │
├────────────┼──────────────┤
│ 2.5 │ 18 │
├────────────┼──────────────┤
│ 10 │ 18 │
├────────────┼──────────────┤
│ 25 │ 19 │
├────────────┼──────────────┤
│ 50 │ 20 │
├────────────┼──────────────┤
│ 75 │ 20 │
├────────────┼──────────────┤
│ 90 │ 21 │
├────────────┼──────────────┤
│ 97.5 │ 23 │
├────────────┼──────────────┤
│ 99 │ 24 │
├────────────┼──────────────┤
│ 99.9 │ 27 │
├────────────┼──────────────┤
│ 99.99 │ 31 │
├────────────┼──────────────┤
│ 99.999 │ 32 │
└────────────┴──────────────┘
75k requests in 15.02s, 181 MB read
Get all with caching¶
The same request on a table whose API settings say enableCaching: true. The first answer is kept in Redis, under a key made of who asks and what is asked ; the next requests are answered from Redis until the answer expires or something writes the table. About this API.
Get all with caching : public¶
No token : the API is public. Each answer : 2,418 bytes (MongoDB), status 200.
2 rounds of 15 s 1 : 15,140 · 2 : 15,165 req/s · spread 0.2 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.6 vCPU, 114 MB RSS · MongoDB 0.0 vCPU · sandboxes 0.0 vCPU, 51 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 45 % · memory used 827 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers_public_cached"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers_public_cached
100 connections
5 workers
┌─────────┬──────┬──────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 3 ms │ 6 ms │ 9 ms │ 10 ms │ 6.11 ms │ 1.43 ms │ 19 ms │
└─────────┴──────┴──────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬───────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼───────────┼────────┼─────────┤
│ Req/Sec │ 14,775 │ 14,775 │ 15,151 │ 15,591 │ 15,139.47 │ 236.2 │ 14,769 │
├───────────┼─────────┼─────────┼─────────┼─────────┼───────────┼────────┼─────────┤
│ Bytes/Sec │ 40.4 MB │ 40.4 MB │ 41.5 MB │ 42.7 MB │ 41.4 MB │ 645 kB │ 40.4 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴───────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 2 │
├────────────┼──────────────┤
│ 1 │ 3 │
├────────────┼──────────────┤
│ 2.5 │ 3 │
├────────────┼──────────────┤
│ 10 │ 4 │
├────────────┼──────────────┤
│ 25 │ 5 │
├────────────┼──────────────┤
│ 50 │ 6 │
├────────────┼──────────────┤
│ 75 │ 7 │
├────────────┼──────────────┤
│ 90 │ 8 │
├────────────┼──────────────┤
│ 97.5 │ 9 │
├────────────┼──────────────┤
│ 99 │ 10 │
├────────────┼──────────────┤
│ 99.9 │ 13 │
├────────────┼──────────────┤
│ 99.99 │ 16 │
├────────────┼──────────────┤
│ 99.999 │ 18 │
└────────────┴──────────────┘
227k requests in 15.02s, 621 MB read
2 rounds of 15 s 1 : 15,007 · 2 : 14,759 req/s · spread 1.7 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.6 vCPU, 108 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.0 vCPU · sandboxes 0.0 vCPU, 51 MB · Redis 0.1 vCPU · whole server busy 99 %, of which kernel (network, disk) 45 % · memory used 968 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers_public_cached"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers_public_cached
100 connections
5 workers
┌─────────┬──────┬──────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 3 ms │ 6 ms │ 9 ms │ 10 ms │ 6.16 ms │ 1.44 ms │ 20 ms │
└─────────┴──────┴──────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬───────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼───────────┼────────┼─────────┤
│ Req/Sec │ 14,743 │ 14,743 │ 15,023 │ 15,207 │ 15,006.67 │ 115.74 │ 14,739 │
├───────────┼─────────┼─────────┼─────────┼─────────┼───────────┼────────┼─────────┤
│ Bytes/Sec │ 35.8 MB │ 35.8 MB │ 36.4 MB │ 36.9 MB │ 36.4 MB │ 283 kB │ 35.8 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴───────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 1 │
├────────────┼──────────────┤
│ 1 │ 3 │
├────────────┼──────────────┤
│ 2.5 │ 3 │
├────────────┼──────────────┤
│ 10 │ 4 │
├────────────┼──────────────┤
│ 25 │ 5 │
├────────────┼──────────────┤
│ 50 │ 6 │
├────────────┼──────────────┤
│ 75 │ 7 │
├────────────┼──────────────┤
│ 90 │ 8 │
├────────────┼──────────────┤
│ 97.5 │ 9 │
├────────────┼──────────────┤
│ 99 │ 10 │
├────────────┼──────────────┤
│ 99.9 │ 13 │
├────────────┼──────────────┤
│ 99.99 │ 16 │
├────────────┼──────────────┤
│ 99.999 │ 20 │
└────────────┴──────────────┘
225k requests in 15.02s, 546 MB read
2 rounds of 15 s 1 : 15,335 · 2 : 14,911 req/s · spread 2.8 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.6 vCPU, 111 MB RSS · MongoDB 0.0 vCPU · MySQL 0.0 vCPU · sandboxes 0.0 vCPU, 51 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 45 % · memory used 1342 MB of 3915 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers_public_cached"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers_public_cached
100 connections
5 workers
┌─────────┬──────┬──────┬───────┬──────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼──────┼─────────┼─────────┼───────┤
│ Latency │ 3 ms │ 6 ms │ 9 ms │ 9 ms │ 6.02 ms │ 1.39 ms │ 19 ms │
└─────────┴──────┴──────┴───────┴──────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬───────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼───────────┼────────┼─────────┤
│ Req/Sec │ 15,015 │ 15,015 │ 15,343 │ 15,767 │ 15,334.67 │ 236.99 │ 15,008 │
├───────────┼─────────┼─────────┼─────────┼─────────┼───────────┼────────┼─────────┤
│ Bytes/Sec │ 36.4 MB │ 36.4 MB │ 37.2 MB │ 38.3 MB │ 37.2 MB │ 577 kB │ 36.4 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴───────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 2 │
├────────────┼──────────────┤
│ 1 │ 3 │
├────────────┼──────────────┤
│ 2.5 │ 3 │
├────────────┼──────────────┤
│ 10 │ 4 │
├────────────┼──────────────┤
│ 25 │ 5 │
├────────────┼──────────────┤
│ 50 │ 6 │
├────────────┼──────────────┤
│ 75 │ 7 │
├────────────┼──────────────┤
│ 90 │ 8 │
├────────────┼──────────────┤
│ 97.5 │ 9 │
├────────────┼──────────────┤
│ 99 │ 9 │
├────────────┼──────────────┤
│ 99.9 │ 12 │
├────────────┼──────────────┤
│ 99.99 │ 16 │
├────────────┼──────────────┤
│ 99.999 │ 19 │
└────────────┴──────────────┘
230k requests in 15.01s, 558 MB read
Get all with caching : both tokens¶
With x-am-authorization and x-am-user-authorization, both checked on every request. Each answer : 2,418 bytes (MongoDB), status 200.
2 rounds of 15 s 1 : 11,812 · 2 : 11,689 req/s · spread 1 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.7 vCPU, 113 MB RSS · MongoDB 0.0 vCPU · sandboxes 0.0 vCPU, 51 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 37 % · memory used 817 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers_cached"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers_cached
100 connections
5 workers
┌─────────┬──────┬──────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 4 ms │ 8 ms │ 11 ms │ 12 ms │ 7.97 ms │ 1.79 ms │ 26 ms │
└─────────┴──────┴──────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Req/Sec │ 11,463 │ 11,463 │ 11,799 │ 12,159 │ 11,812 │ 196.46 │ 11,459 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Bytes/Sec │ 31.4 MB │ 31.4 MB │ 32.3 MB │ 33.3 MB │ 32.3 MB │ 537 kB │ 31.4 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 1 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 2 │
├────────────┼──────────────┤
│ 1 │ 4 │
├────────────┼──────────────┤
│ 2.5 │ 4 │
├────────────┼──────────────┤
│ 10 │ 6 │
├────────────┼──────────────┤
│ 25 │ 7 │
├────────────┼──────────────┤
│ 50 │ 8 │
├────────────┼──────────────┤
│ 75 │ 9 │
├────────────┼──────────────┤
│ 90 │ 10 │
├────────────┼──────────────┤
│ 97.5 │ 11 │
├────────────┼──────────────┤
│ 99 │ 12 │
├────────────┼──────────────┤
│ 99.9 │ 15 │
├────────────┼──────────────┤
│ 99.99 │ 22 │
├────────────┼──────────────┤
│ 99.999 │ 24 │
└────────────┴──────────────┘
177k requests in 15.02s, 485 MB read
2 rounds of 15 s 1 : 11,768 · 2 : 11,462 req/s · spread 2.6 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.7 vCPU, 108 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.0 vCPU · sandboxes 0.0 vCPU, 51 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 38 % · memory used 967 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers_cached"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers_cached
100 connections
5 workers
┌─────────┬──────┬──────┬───────┬───────┬──────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼───────┼──────┼─────────┼───────┤
│ Latency │ 4 ms │ 8 ms │ 11 ms │ 12 ms │ 8 ms │ 1.78 ms │ 23 ms │
└─────────┴──────┴──────┴───────┴───────┴──────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬────────┬───────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼────────┼───────────┼────────┼─────────┤
│ Req/Sec │ 11,575 │ 11,575 │ 11,783 │ 11,967 │ 11,768.27 │ 104.63 │ 11,569 │
├───────────┼─────────┼─────────┼─────────┼────────┼───────────┼────────┼─────────┤
│ Bytes/Sec │ 28.1 MB │ 28.1 MB │ 28.6 MB │ 29 MB │ 28.5 MB │ 257 kB │ 28.1 MB │
└───────────┴─────────┴─────────┴─────────┴────────┴───────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 2 │
├────────────┼──────────────┤
│ 1 │ 4 │
├────────────┼──────────────┤
│ 2.5 │ 4 │
├────────────┼──────────────┤
│ 10 │ 6 │
├────────────┼──────────────┤
│ 25 │ 7 │
├────────────┼──────────────┤
│ 50 │ 8 │
├────────────┼──────────────┤
│ 75 │ 9 │
├────────────┼──────────────┤
│ 90 │ 10 │
├────────────┼──────────────┤
│ 97.5 │ 11 │
├────────────┼──────────────┤
│ 99 │ 12 │
├────────────┼──────────────┤
│ 99.9 │ 15 │
├────────────┼──────────────┤
│ 99.99 │ 20 │
├────────────┼──────────────┤
│ 99.999 │ 22 │
└────────────┴──────────────┘
177k requests in 15.02s, 428 MB read
2 rounds of 15 s 1 : 11,817 · 2 : 11,434 req/s · spread 3.3 % · the output below is round 2, the closer to the average
Server during this run API Maker 1.7 vCPU, 117 MB RSS · MongoDB 0.0 vCPU · MySQL 0.0 vCPU · sandboxes 0.0 vCPU, 238 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 38 % · memory used 1593 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers_cached"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers_cached
100 connections
5 workers
┌─────────┬──────┬──────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 5 ms │ 8 ms │ 12 ms │ 13 ms │ 8.25 ms │ 1.87 ms │ 21 ms │
└─────────┴──────┴──────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 11,279 │ 11,279 │ 11,407 │ 11,687 │ 11,434.4 │ 104.65 │ 11,273 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 27.4 MB │ 27.4 MB │ 27.7 MB │ 28.3 MB │ 27.7 MB │ 254 kB │ 27.3 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 2 │
├────────────┼──────────────┤
│ 1 │ 4 │
├────────────┼──────────────┤
│ 2.5 │ 5 │
├────────────┼──────────────┤
│ 10 │ 6 │
├────────────┼──────────────┤
│ 25 │ 7 │
├────────────┼──────────────┤
│ 50 │ 8 │
├────────────┼──────────────┤
│ 75 │ 9 │
├────────────┼──────────────┤
│ 90 │ 11 │
├────────────┼──────────────┤
│ 97.5 │ 12 │
├────────────┼──────────────┤
│ 99 │ 13 │
├────────────┼──────────────┤
│ 99.9 │ 16 │
├────────────┼──────────────┤
│ 99.99 │ 19 │
├────────────┼──────────────┤
│ 99.999 │ 21 │
└────────────┴──────────────┘
172k requests in 15.02s, 416 MB read
Get all by stream¶
GET …/<table>/stream : the rows are sent while they are read from the database cursor, so a large table never sits whole in memory. About this API.
Get all by stream : public¶
No token : the API is public. Each answer : 2,477 bytes (MongoDB), status 200.
2 rounds of 15 s 1 : 3,670 · 2 : 3,651 req/s · spread 0.5 % · the output below is round 2, the closer to the average
Server during this run API Maker 0.9 vCPU, 122 MB RSS · MongoDB 0.8 vCPU · sandboxes 0.0 vCPU, 316 MB · whole server busy 100 %, of which kernel (network, disk) 31 % · memory used 1209 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers_public/stream"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers_public/stream
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼────────┤
│ Latency │ 13 ms │ 26 ms │ 43 ms │ 50 ms │ 26.88 ms │ 8.22 ms │ 209 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 3,589 │ 3,589 │ 3,651 │ 3,709 │ 3,651.14 │ 38.65 │ 3,589 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 10.4 MB │ 10.4 MB │ 10.5 MB │ 10.7 MB │ 10.5 MB │ 111 kB │ 10.4 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 4 │
├────────────┼──────────────┤
│ 0.01 │ 5 │
├────────────┼──────────────┤
│ 0.1 │ 7 │
├────────────┼──────────────┤
│ 1 │ 11 │
├────────────┼──────────────┤
│ 2.5 │ 13 │
├────────────┼──────────────┤
│ 10 │ 18 │
├────────────┼──────────────┤
│ 25 │ 22 │
├────────────┼──────────────┤
│ 50 │ 26 │
├────────────┼──────────────┤
│ 75 │ 31 │
├────────────┼──────────────┤
│ 90 │ 36 │
├────────────┼──────────────┤
│ 97.5 │ 43 │
├────────────┼──────────────┤
│ 99 │ 50 │
├────────────┼──────────────┤
│ 99.9 │ 86 │
├────────────┼──────────────┤
│ 99.99 │ 152 │
├────────────┼──────────────┤
│ 99.999 │ 209 │
└────────────┴──────────────┘
55k requests in 15.02s, 158 MB read
2 rounds of 15 s 1 : 4,861 · 2 : 4,813 req/s · spread 1 % · the output below is round 2, the closer to the average
Server during this run API Maker 0.9 vCPU, 118 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.7 vCPU · sandboxes 0.0 vCPU, 238 MB · whole server busy 98 %, of which kernel (network, disk) 38 % · memory used 1278 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers_public/stream"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers_public/stream
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 18 ms │ 20 ms │ 23 ms │ 25 ms │ 20.28 ms │ 1.34 ms │ 31 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 4,747 │ 4,747 │ 4,815 │ 4,839 │ 4,812.94 │ 22.65 │ 4,744 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 12.2 MB │ 12.2 MB │ 12.4 MB │ 12.5 MB │ 12.4 MB │ 58.6 kB │ 12.2 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 3 │
├────────────┼──────────────┤
│ 0.01 │ 7 │
├────────────┼──────────────┤
│ 0.1 │ 14 │
├────────────┼──────────────┤
│ 1 │ 18 │
├────────────┼──────────────┤
│ 2.5 │ 18 │
├────────────┼──────────────┤
│ 10 │ 19 │
├────────────┼──────────────┤
│ 25 │ 19 │
├────────────┼──────────────┤
│ 50 │ 20 │
├────────────┼──────────────┤
│ 75 │ 21 │
├────────────┼──────────────┤
│ 90 │ 22 │
├────────────┼──────────────┤
│ 97.5 │ 23 │
├────────────┼──────────────┤
│ 99 │ 25 │
├────────────┼──────────────┤
│ 99.9 │ 28 │
├────────────┼──────────────┤
│ 99.99 │ 30 │
├────────────┼──────────────┤
│ 99.999 │ 31 │
└────────────┴──────────────┘
72k requests in 15.02s, 186 MB read
2 rounds of 15 s 1 : 5,079 · 2 : 4,988 req/s · spread 1.8 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.0 vCPU, 118 MB RSS · MongoDB 0.0 vCPU · MySQL 0.6 vCPU · sandboxes 0.0 vCPU, 51 MB · whole server busy 98 %, of which kernel (network, disk) 40 % · memory used 1346 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers_public/stream"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers_public/stream
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼────────┼───────┤
│ Latency │ 17 ms │ 19 ms │ 22 ms │ 23 ms │ 19.19 ms │ 1.4 ms │ 30 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Req/Sec │ 4,995 │ 4,995 │ 5,087 │ 5,127 │ 5,078.8 │ 35.79 │ 4,994 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 12.9 MB │ 12.9 MB │ 13.1 MB │ 13.2 MB │ 13.1 MB │ 92.6 kB │ 12.8 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 1 │
├────────────┼──────────────┤
│ 0.01 │ 2 │
├────────────┼──────────────┤
│ 0.1 │ 5 │
├────────────┼──────────────┤
│ 1 │ 17 │
├────────────┼──────────────┤
│ 2.5 │ 17 │
├────────────┼──────────────┤
│ 10 │ 18 │
├────────────┼──────────────┤
│ 25 │ 18 │
├────────────┼──────────────┤
│ 50 │ 19 │
├────────────┼──────────────┤
│ 75 │ 20 │
├────────────┼──────────────┤
│ 90 │ 21 │
├────────────┼──────────────┤
│ 97.5 │ 22 │
├────────────┼──────────────┤
│ 99 │ 23 │
├────────────┼──────────────┤
│ 99.9 │ 25 │
├────────────┼──────────────┤
│ 99.99 │ 28 │
├────────────┼──────────────┤
│ 99.999 │ 30 │
└────────────┴──────────────┘
76k requests in 15.02s, 196 MB read
Get all by stream : both tokens¶
With x-am-authorization and x-am-user-authorization, both checked on every request. Each answer : 2,577 bytes (MongoDB), status 200.
2 rounds of 15 s 1 : 3,514 · 2 : 3,411 req/s · spread 3 % · the output below is round 2, the closer to the average
Server during this run API Maker 1.0 vCPU, 122 MB RSS · MongoDB 0.7 vCPU · sandboxes 0.0 vCPU, 316 MB · whole server busy 100 %, of which kernel (network, disk) 30 % · memory used 1210 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers/stream"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers/stream
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 15 ms │ 29 ms │ 44 ms │ 48 ms │ 28.81 ms │ 7.41 ms │ 75 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬────────┬────────┬─────────┬─────────┬─────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼────────┼────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Req/Sec │ 3,315 │ 3,315 │ 3,419 │ 3,469 │ 3,410.6 │ 43.35 │ 3,314 │
├───────────┼────────┼────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Bytes/Sec │ 9.9 MB │ 9.9 MB │ 10.2 MB │ 10.4 MB │ 10.2 MB │ 129 kB │ 9.89 MB │
└───────────┴────────┴────────┴─────────┴─────────┴─────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 2 │
├────────────┼──────────────┤
│ 0.01 │ 3 │
├────────────┼──────────────┤
│ 0.1 │ 6 │
├────────────┼──────────────┤
│ 1 │ 12 │
├────────────┼──────────────┤
│ 2.5 │ 15 │
├────────────┼──────────────┤
│ 10 │ 20 │
├────────────┼──────────────┤
│ 25 │ 24 │
├────────────┼──────────────┤
│ 50 │ 29 │
├────────────┼──────────────┤
│ 75 │ 33 │
├────────────┼──────────────┤
│ 90 │ 38 │
├────────────┼──────────────┤
│ 97.5 │ 44 │
├────────────┼──────────────┤
│ 99 │ 48 │
├────────────┼──────────────┤
│ 99.9 │ 59 │
├────────────┼──────────────┤
│ 99.99 │ 66 │
├────────────┼──────────────┤
│ 99.999 │ 75 │
└────────────┴──────────────┘
51k requests in 15.02s, 153 MB read
2 rounds of 15 s 1 : 4,448 · 2 : 4,407 req/s · spread 0.9 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.0 vCPU, 113 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.6 vCPU · sandboxes 0.0 vCPU, 51 MB · whole server busy 98 %, of which kernel (network, disk) 37 % · memory used 974 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers/stream"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers/stream
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 20 ms │ 22 ms │ 25 ms │ 26 ms │ 21.98 ms │ 1.45 ms │ 36 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 4,395 │ 4,395 │ 4,443 │ 4,519 │ 4,447.61 │ 33.31 │ 4,393 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 11.7 MB │ 11.7 MB │ 11.9 MB │ 12.1 MB │ 11.9 MB │ 90.5 kB │ 11.7 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 7 │
├────────────┼──────────────┤
│ 0.01 │ 7 │
├────────────┼──────────────┤
│ 0.1 │ 13 │
├────────────┼──────────────┤
│ 1 │ 19 │
├────────────┼──────────────┤
│ 2.5 │ 20 │
├────────────┼──────────────┤
│ 10 │ 20 │
├────────────┼──────────────┤
│ 25 │ 21 │
├────────────┼──────────────┤
│ 50 │ 22 │
├────────────┼──────────────┤
│ 75 │ 23 │
├────────────┼──────────────┤
│ 90 │ 24 │
├────────────┼──────────────┤
│ 97.5 │ 25 │
├────────────┼──────────────┤
│ 99 │ 26 │
├────────────┼──────────────┤
│ 99.9 │ 30 │
├────────────┼──────────────┤
│ 99.99 │ 34 │
├────────────┼──────────────┤
│ 99.999 │ 36 │
└────────────┴──────────────┘
67k requests in 15.02s, 178 MB read
2 rounds of 15 s 1 : 4,552 · 2 : 4,484 req/s · spread 1.5 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.1 vCPU, 119 MB RSS · MongoDB 0.0 vCPU · MySQL 0.5 vCPU · sandboxes 0.0 vCPU, 51 MB · whole server busy 98 %, of which kernel (network, disk) 37 % · memory used 1348 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers/stream"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers/stream
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 19 ms │ 21 ms │ 25 ms │ 26 ms │ 21.46 ms │ 1.42 ms │ 33 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 4,447 │ 4,447 │ 4,559 │ 4,623 │ 4,552.14 │ 41.75 │ 4,447 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 11.9 MB │ 11.9 MB │ 12.2 MB │ 12.4 MB │ 12.2 MB │ 111 kB │ 11.9 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 3 │
├────────────┼──────────────┤
│ 0.01 │ 7 │
├────────────┼──────────────┤
│ 0.1 │ 16 │
├────────────┼──────────────┤
│ 1 │ 19 │
├────────────┼──────────────┤
│ 2.5 │ 19 │
├────────────┼──────────────┤
│ 10 │ 20 │
├────────────┼──────────────┤
│ 25 │ 21 │
├────────────┼──────────────┤
│ 50 │ 21 │
├────────────┼──────────────┤
│ 75 │ 22 │
├────────────┼──────────────┤
│ 90 │ 23 │
├────────────┼──────────────┤
│ 97.5 │ 25 │
├────────────┼──────────────┤
│ 99 │ 26 │
├────────────┼──────────────┤
│ 99.9 │ 29 │
├────────────┼──────────────┤
│ 99.99 │ 32 │
├────────────┼──────────────┤
│ 99.999 │ 33 │
└────────────┴──────────────┘
68k requests in 15.02s, 182 MB read
Custom API calling get all¶
A custom API written in TypeScript, return await g.sys.db.getAll({ instance, database, collection }). This code is lean : it only reads what it is handed and asks g.sys for a read, so API Maker runs it in the server itself, with QuickJS, on the thread which answers the request, and the request never leaves the server. Code which needs more (a package, the time of the machine, g.shared, …) runs in the sandbox of the account : see the next API. About this API.
import * as T from 'types';
async function main(g: T.IAMGlobal) {
return await g.sys.db.getAll({ instance: 'mongodb', database: 'am_bench', collection: 'customers_public' });
}
module.exports = main;
Custom API calling get all : public¶
No token : the API is public. Each answer : 2,418 bytes (MongoDB), status 200.
2 rounds of 15 s 1 : 2,614 · 2 : 2,569 req/s · spread 1.8 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.2 vCPU, 124 MB RSS · MongoDB 0.6 vCPU · sandboxes 0.0 vCPU, 51 MB · whole server busy 100 %, of which kernel (network, disk) 25 % · memory used 885 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/custom-api/bench/bench_mongodb_public"
Running 15s test @ http://192.168.133.61:38246/api/custom-api/bench/bench_mongodb_public
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬──────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼──────────┼───────┤
│ Latency │ 18 ms │ 38 ms │ 58 ms │ 62 ms │ 37.71 ms │ 10.14 ms │ 86 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴──────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 2,563 │ 2,563 │ 2,617 │ 2,635 │ 2,614.34 │ 17.56 │ 2,563 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 7.01 MB │ 7.01 MB │ 7.16 MB │ 7.21 MB │ 7.15 MB │ 47.4 kB │ 7.01 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 1 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 5 │
├────────────┼──────────────┤
│ 1 │ 13 │
├────────────┼──────────────┤
│ 2.5 │ 18 │
├────────────┼──────────────┤
│ 10 │ 25 │
├────────────┼──────────────┤
│ 25 │ 31 │
├────────────┼──────────────┤
│ 50 │ 38 │
├────────────┼──────────────┤
│ 75 │ 44 │
├────────────┼──────────────┤
│ 90 │ 50 │
├────────────┼──────────────┤
│ 97.5 │ 58 │
├────────────┼──────────────┤
│ 99 │ 62 │
├────────────┼──────────────┤
│ 99.9 │ 72 │
├────────────┼──────────────┤
│ 99.99 │ 81 │
├────────────┼──────────────┤
│ 99.999 │ 86 │
└────────────┴──────────────┘
39k requests in 15.02s, 107 MB read
2 rounds of 15 s 1 : 3,074 · 2 : 3,044 req/s · spread 1 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.3 vCPU, 118 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.4 vCPU · sandboxes 0.0 vCPU, 51 MB · whole server busy 100 %, of which kernel (network, disk) 25 % · memory used 986 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/custom-api/bench/bench_postgres_public"
Running 15s test @ http://192.168.133.61:38246/api/custom-api/bench/bench_postgres_public
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 29 ms │ 32 ms │ 36 ms │ 37 ms │ 32.02 ms │ 1.87 ms │ 46 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 3,031 │ 3,031 │ 3,073 │ 3,107 │ 3,073.54 │ 23.21 │ 3,031 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 7.35 MB │ 7.35 MB │ 7.45 MB │ 7.53 MB │ 7.45 MB │ 56.4 kB │ 7.35 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 6 │
├────────────┼──────────────┤
│ 0.01 │ 8 │
├────────────┼──────────────┤
│ 0.1 │ 19 │
├────────────┼──────────────┤
│ 1 │ 28 │
├────────────┼──────────────┤
│ 2.5 │ 29 │
├────────────┼──────────────┤
│ 10 │ 30 │
├────────────┼──────────────┤
│ 25 │ 31 │
├────────────┼──────────────┤
│ 50 │ 32 │
├────────────┼──────────────┤
│ 75 │ 33 │
├────────────┼──────────────┤
│ 90 │ 34 │
├────────────┼──────────────┤
│ 97.5 │ 36 │
├────────────┼──────────────┤
│ 99 │ 37 │
├────────────┼──────────────┤
│ 99.9 │ 41 │
├────────────┼──────────────┤
│ 99.99 │ 45 │
├────────────┼──────────────┤
│ 99.999 │ 46 │
└────────────┴──────────────┘
46k requests in 15.02s, 112 MB read
2 rounds of 15 s 1 : 3,393 · 2 : 3,321 req/s · spread 2.1 % · the output below is round 2, the closer to the average
Server during this run API Maker 1.3 vCPU, 120 MB RSS · MongoDB 0.0 vCPU · MySQL 0.4 vCPU · sandboxes 0.0 vCPU, 238 MB · whole server busy 100 %, of which kernel (network, disk) 27 % · memory used 1588 MB of 3915 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/custom-api/bench/bench_mysql_public"
Running 15s test @ http://192.168.133.61:38246/api/custom-api/bench/bench_mysql_public
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 26 ms │ 30 ms │ 33 ms │ 35 ms │ 29.6 ms │ 1.89 ms │ 45 ms │
└─────────┴───────┴───────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Req/Sec │ 3,229 │ 3,229 │ 3,317 │ 3,393 │ 3,321.4 │ 41.2 │ 3,228 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 7.83 MB │ 7.83 MB │ 8.04 MB │ 8.22 MB │ 8.05 MB │ 99.6 kB │ 7.82 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 12 │
├────────────┼──────────────┤
│ 0.01 │ 13 │
├────────────┼──────────────┤
│ 0.1 │ 16 │
├────────────┼──────────────┤
│ 1 │ 26 │
├────────────┼──────────────┤
│ 2.5 │ 26 │
├────────────┼──────────────┤
│ 10 │ 27 │
├────────────┼──────────────┤
│ 25 │ 28 │
├────────────┼──────────────┤
│ 50 │ 30 │
├────────────┼──────────────┤
│ 75 │ 31 │
├────────────┼──────────────┤
│ 90 │ 32 │
├────────────┼──────────────┤
│ 97.5 │ 33 │
├────────────┼──────────────┤
│ 99 │ 35 │
├────────────┼──────────────┤
│ 99.9 │ 38 │
├────────────┼──────────────┤
│ 99.99 │ 42 │
├────────────┼──────────────┤
│ 99.999 │ 45 │
└────────────┴──────────────┘
50k requests in 15.02s, 121 MB read
Custom API calling get all : both tokens¶
With x-am-authorization and x-am-user-authorization, both checked on every request. Each answer : 2,418 bytes (MongoDB), status 200.
2 rounds of 15 s 1 : 2,418 · 2 : 2,422 req/s · spread 0.1 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.3 vCPU, 124 MB RSS · MongoDB 0.5 vCPU · sandboxes 0.0 vCPU, 51 MB · whole server busy 100 %, of which kernel (network, disk) 25 % · memory used 879 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/custom-api/bench/bench_mongodb_tokens"
Running 15s test @ http://192.168.133.61:38246/api/custom-api/bench/bench_mongodb_tokens
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬──────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼──────────┼───────┤
│ Latency │ 19 ms │ 41 ms │ 62 ms │ 67 ms │ 40.81 ms │ 10.68 ms │ 89 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴──────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Req/Sec │ 2,361 │ 2,361 │ 2,419 │ 2,457 │ 2,418.2 │ 24.77 │ 2,361 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 6.46 MB │ 6.46 MB │ 6.62 MB │ 6.72 MB │ 6.61 MB │ 67.3 kB │ 6.46 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 1 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 6 │
├────────────┼──────────────┤
│ 1 │ 14 │
├────────────┼──────────────┤
│ 2.5 │ 19 │
├────────────┼──────────────┤
│ 10 │ 27 │
├────────────┼──────────────┤
│ 25 │ 34 │
├────────────┼──────────────┤
│ 50 │ 41 │
├────────────┼──────────────┤
│ 75 │ 48 │
├────────────┼──────────────┤
│ 90 │ 54 │
├────────────┼──────────────┤
│ 97.5 │ 62 │
├────────────┼──────────────┤
│ 99 │ 67 │
├────────────┼──────────────┤
│ 99.9 │ 76 │
├────────────┼──────────────┤
│ 99.99 │ 86 │
├────────────┼──────────────┤
│ 99.999 │ 89 │
└────────────┴──────────────┘
36k requests in 15.02s, 99.2 MB read
2 rounds of 15 s 1 : 2,835 · 2 : 2,768 req/s · spread 2.4 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.3 vCPU, 118 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.4 vCPU · sandboxes 0.0 vCPU, 51 MB · whole server busy 100 %, of which kernel (network, disk) 24 % · memory used 988 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/custom-api/bench/bench_postgres_tokens"
Running 15s test @ http://192.168.133.61:38246/api/custom-api/bench/bench_postgres_tokens
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 31 ms │ 35 ms │ 39 ms │ 41 ms │ 34.76 ms │ 2.11 ms │ 50 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬───────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼───────┼─────────┤
│ Req/Sec │ 2,789 │ 2,789 │ 2,837 │ 2,871 │ 2,835 │ 19.26 │ 2,788 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼───────┼─────────┤
│ Bytes/Sec │ 6.76 MB │ 6.76 MB │ 6.88 MB │ 6.96 MB │ 6.87 MB │ 47 kB │ 6.76 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 5 │
├────────────┼──────────────┤
│ 0.01 │ 7 │
├────────────┼──────────────┤
│ 0.1 │ 22 │
├────────────┼──────────────┤
│ 1 │ 31 │
├────────────┼──────────────┤
│ 2.5 │ 31 │
├────────────┼──────────────┤
│ 10 │ 33 │
├────────────┼──────────────┤
│ 25 │ 34 │
├────────────┼──────────────┤
│ 50 │ 35 │
├────────────┼──────────────┤
│ 75 │ 36 │
├────────────┼──────────────┤
│ 90 │ 37 │
├────────────┼──────────────┤
│ 97.5 │ 39 │
├────────────┼──────────────┤
│ 99 │ 41 │
├────────────┼──────────────┤
│ 99.9 │ 45 │
├────────────┼──────────────┤
│ 99.99 │ 49 │
├────────────┼──────────────┤
│ 99.999 │ 50 │
└────────────┴──────────────┘
43k requests in 15.02s, 103 MB read
2 rounds of 15 s 1 : 3,103 · 2 : 3,014 req/s · spread 2.9 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.4 vCPU, 119 MB RSS · MongoDB 0.0 vCPU · MySQL 0.4 vCPU · sandboxes 0.0 vCPU, 51 MB · whole server busy 100 %, of which kernel (network, disk) 25 % · memory used 1350 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/custom-api/bench/bench_mysql_tokens"
Running 15s test @ http://192.168.133.61:38246/api/custom-api/bench/bench_mysql_tokens
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 28 ms │ 32 ms │ 36 ms │ 38 ms │ 31.71 ms │ 2.23 ms │ 57 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 3,063 │ 3,063 │ 3,101 │ 3,147 │ 3,102.87 │ 24.98 │ 3,063 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 7.43 MB │ 7.43 MB │ 7.52 MB │ 7.63 MB │ 7.52 MB │ 60.7 kB │ 7.42 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 2 │
├────────────┼──────────────┤
│ 0.01 │ 3 │
├────────────┼──────────────┤
│ 0.1 │ 7 │
├────────────┼──────────────┤
│ 1 │ 28 │
├────────────┼──────────────┤
│ 2.5 │ 28 │
├────────────┼──────────────┤
│ 10 │ 29 │
├────────────┼──────────────┤
│ 25 │ 31 │
├────────────┼──────────────┤
│ 50 │ 32 │
├────────────┼──────────────┤
│ 75 │ 33 │
├────────────┼──────────────┤
│ 90 │ 34 │
├────────────┼──────────────┤
│ 97.5 │ 36 │
├────────────┼──────────────┤
│ 99 │ 38 │
├────────────┼──────────────┤
│ 99.9 │ 42 │
├────────────┼──────────────┤
│ 99.99 │ 53 │
├────────────┼──────────────┤
│ 99.999 │ 57 │
└────────────┴──────────────┘
47k requests in 15.02s, 113 MB read
Custom API in the sandbox¶
The same custom API, with one line more : it reads Date.now(), the time of the machine, which lean code may not. So this code runs in a sandbox of the account (a container with Node.js 24) : the request goes from API Maker to a runner of the sandbox and back, and the rows are read from inside the sandbox by the core of API Maker loaded there. About this API.
import * as T from 'types';
async function main(g: T.IAMGlobal) {
const started = Date.now(); // the time of the machine : this code runs in the sandbox of the account
return await g.sys.db.getAll({ instance: 'mongodb', database: 'am_bench', collection: 'customers_public' });
}
module.exports = main;
No token : the API is public. Each answer : 2,418 bytes (MongoDB), status 200.
2 rounds of 15 s 1 : 2,261 · 2 : 2,278 req/s · spread 0.8 % · the output below is round 2, the closer to the average
Server during this run API Maker 0.5 vCPU, 121 MB RSS · MongoDB 0.5 vCPU · sandboxes 0.9 vCPU, 300 MB · whole server busy 100 %, of which kernel (network, disk) 22 % · memory used 1189 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/custom-api/bench/bench_mongodb_sandbox"
Running 15s test @ http://192.168.133.61:38246/api/custom-api/bench/bench_mongodb_sandbox
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬──────────┬────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼──────────┼────────┤
│ Latency │ 21 ms │ 42 ms │ 71 ms │ 77 ms │ 43.35 ms │ 12.89 ms │ 128 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴──────────┴────────┘
┌───────────┬────────┬────────┬─────────┬─────────┬──────────┬─────────┬────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼────────┼────────┼─────────┼─────────┼──────────┼─────────┼────────┤
│ Req/Sec │ 2,229 │ 2,229 │ 2,273 │ 2,331 │ 2,277.94 │ 29.92 │ 2,229 │
├───────────┼────────┼────────┼─────────┼─────────┼──────────┼─────────┼────────┤
│ Bytes/Sec │ 6.1 MB │ 6.1 MB │ 6.22 MB │ 6.38 MB │ 6.23 MB │ 81.9 kB │ 6.1 MB │
└───────────┴────────┴────────┴─────────┴─────────┴──────────┴─────────┴────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 3 │
├────────────┼──────────────┤
│ 0.01 │ 5 │
├────────────┼──────────────┤
│ 0.1 │ 11 │
├────────────┼──────────────┤
│ 1 │ 18 │
├────────────┼──────────────┤
│ 2.5 │ 21 │
├────────────┼──────────────┤
│ 10 │ 28 │
├────────────┼──────────────┤
│ 25 │ 34 │
├────────────┼──────────────┤
│ 50 │ 42 │
├────────────┼──────────────┤
│ 75 │ 51 │
├────────────┼──────────────┤
│ 90 │ 60 │
├────────────┼──────────────┤
│ 97.5 │ 71 │
├────────────┼──────────────┤
│ 99 │ 77 │
├────────────┼──────────────┤
│ 99.9 │ 106 │
├────────────┼──────────────┤
│ 99.99 │ 123 │
├────────────┼──────────────┤
│ 99.999 │ 128 │
└────────────┴──────────────┘
34k requests in 15.02s, 93.4 MB read
2 rounds of 15 s 1 : 2,398 · 2 : 2,381 req/s · spread 0.7 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.5 vCPU, 112 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.4 vCPU · sandboxes 0.8 vCPU, 218 MB · whole server busy 100 %, of which kernel (network, disk) 26 % · memory used 1223 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/custom-api/bench/bench_postgres_sandbox"
Running 15s test @ http://192.168.133.61:38246/api/custom-api/bench/bench_postgres_sandbox
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬──────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼──────────┼───────┤
│ Latency │ 21 ms │ 40 ms │ 66 ms │ 72 ms │ 41.17 ms │ 11.69 ms │ 97 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴──────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 2,325 │ 2,325 │ 2,401 │ 2,459 │ 2,397.67 │ 41.82 │ 2,325 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 5.64 MB │ 5.64 MB │ 5.82 MB │ 5.96 MB │ 5.81 MB │ 102 kB │ 5.64 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 7 │
├────────────┼──────────────┤
│ 0.01 │ 8 │
├────────────┼──────────────┤
│ 0.1 │ 13 │
├────────────┼──────────────┤
│ 1 │ 18 │
├────────────┼──────────────┤
│ 2.5 │ 21 │
├────────────┼──────────────┤
│ 10 │ 27 │
├────────────┼──────────────┤
│ 25 │ 33 │
├────────────┼──────────────┤
│ 50 │ 40 │
├────────────┼──────────────┤
│ 75 │ 49 │
├────────────┼──────────────┤
│ 90 │ 57 │
├────────────┼──────────────┤
│ 97.5 │ 66 │
├────────────┼──────────────┤
│ 99 │ 72 │
├────────────┼──────────────┤
│ 99.9 │ 84 │
├────────────┼──────────────┤
│ 99.99 │ 93 │
├────────────┼──────────────┤
│ 99.999 │ 97 │
└────────────┴──────────────┘
36k requests in 15.02s, 87.2 MB read
2 rounds of 15 s 1 : 2,708 · 2 : 2,720 req/s · spread 0.4 % · the output below is round 2, the closer to the average
Server during this run API Maker 0.6 vCPU, 116 MB RSS · MongoDB 0.0 vCPU · MySQL 0.3 vCPU · sandboxes 0.9 vCPU, 226 MB · whole server busy 100 %, of which kernel (network, disk) 28 % · memory used 1582 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/custom-api/bench/bench_mysql_sandbox"
Running 15s test @ http://192.168.133.61:38246/api/custom-api/bench/bench_mysql_sandbox
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬──────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼──────────┼───────┤
│ Latency │ 18 ms │ 35 ms │ 59 ms │ 64 ms │ 36.26 ms │ 10.52 ms │ 87 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴──────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 2,605 │ 2,605 │ 2,737 │ 2,783 │ 2,719.94 │ 53.23 │ 2,605 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 6.32 MB │ 6.32 MB │ 6.64 MB │ 6.75 MB │ 6.59 MB │ 129 kB │ 6.31 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 6 │
├────────────┼──────────────┤
│ 0.01 │ 7 │
├────────────┼──────────────┤
│ 0.1 │ 11 │
├────────────┼──────────────┤
│ 1 │ 16 │
├────────────┼──────────────┤
│ 2.5 │ 18 │
├────────────┼──────────────┤
│ 10 │ 23 │
├────────────┼──────────────┤
│ 25 │ 29 │
├────────────┼──────────────┤
│ 50 │ 35 │
├────────────┼──────────────┤
│ 75 │ 43 │
├────────────┼──────────────┤
│ 90 │ 50 │
├────────────┼──────────────┤
│ 97.5 │ 59 │
├────────────┼──────────────┤
│ 99 │ 64 │
├────────────┼──────────────┤
│ 99.9 │ 75 │
├────────────┼──────────────┤
│ 99.99 │ 85 │
├────────────┼──────────────┤
│ 99.999 │ 87 │
└────────────┴──────────────┘
41k requests in 15.02s, 98.9 MB read
Get all with a pre hook¶
Get all, with both tokens, on a table whose get all API has a pre hook written in TypeScript : before the API, the hook runs (lean code : in the server, with QuickJS), reads the signed-in person from x-am-user-authorization and keeps the rows of their country (g.req.query.find), the row scoping most applications need. Every row of the dataset is in India, as the person is, so the answer is the same ten rows. About this API.
import * as T from 'types';
async function main(g: T.IAMGlobal) {
if (!g.req.isApiRequestFromUser) return;
const person = g.req.auth.authAMDB; // the person, from x-am-user-authorization
if (!person) throw [{ code: T.EStatusCode.UNAUTHORIZED, message: 'Sign in first.' }];
const find = g.req.query.find ? (typeof g.req.query.find === 'string' ? JSON.parse(g.req.query.find) : g.req.query.find) : {};
g.req.query.find = { $and: [find, { country: person.country }] };
}
module.exports = main;
With x-am-authorization and x-am-user-authorization, both checked on every request. Each answer : 2,418 bytes (MongoDB), status 200.
2 rounds of 15 s 1 : 2,711 · 2 : 2,716 req/s · spread 0.2 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.1 vCPU, 122 MB RSS · MongoDB 0.7 vCPU · sandboxes 0.0 vCPU, 323 MB · whole server busy 100 %, of which kernel (network, disk) 27 % · memory used 1185 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers_pre_hook"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers_pre_hook
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬──────────┬────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼──────────┼────────┤
│ Latency │ 17 ms │ 36 ms │ 57 ms │ 61 ms │ 36.36 ms │ 10.06 ms │ 101 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴──────────┴────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 2,619 │ 2,619 │ 2,723 │ 2,755 │ 2,710.47 │ 43.1 │ 2,619 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 7.16 MB │ 7.16 MB │ 7.45 MB │ 7.54 MB │ 7.41 MB │ 118 kB │ 7.16 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 1 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 6 │
├────────────┼──────────────┤
│ 1 │ 13 │
├────────────┼──────────────┤
│ 2.5 │ 17 │
├────────────┼──────────────┤
│ 10 │ 24 │
├────────────┼──────────────┤
│ 25 │ 30 │
├────────────┼──────────────┤
│ 50 │ 36 │
├────────────┼──────────────┤
│ 75 │ 43 │
├────────────┼──────────────┤
│ 90 │ 49 │
├────────────┼──────────────┤
│ 97.5 │ 57 │
├────────────┼──────────────┤
│ 99 │ 61 │
├────────────┼──────────────┤
│ 99.9 │ 72 │
├────────────┼──────────────┤
│ 99.99 │ 87 │
├────────────┼──────────────┤
│ 99.999 │ 101 │
└────────────┴──────────────┘
41k requests in 15.02s, 111 MB read
2 rounds of 15 s 1 : 3,256 · 2 : 3,237 req/s · spread 0.6 % · the output below is round 2, the closer to the average
Server during this run API Maker 1.2 vCPU, 114 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.5 vCPU · sandboxes 0.0 vCPU, 217 MB · whole server busy 100 %, of which kernel (network, disk) 26 % · memory used 1239 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers_pre_hook"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers_pre_hook
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 27 ms │ 30 ms │ 34 ms │ 36 ms │ 30.39 ms │ 1.81 ms │ 49 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Req/Sec │ 3,181 │ 3,181 │ 3,253 │ 3,285 │ 3,236.6 │ 30.64 │ 3,181 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 7.71 MB │ 7.71 MB │ 7.88 MB │ 7.96 MB │ 7.84 MB │ 73.8 kB │ 7.71 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 13 │
├────────────┼──────────────┤
│ 0.01 │ 16 │
├────────────┼──────────────┤
│ 0.1 │ 23 │
├────────────┼──────────────┤
│ 1 │ 27 │
├────────────┼──────────────┤
│ 2.5 │ 27 │
├────────────┼──────────────┤
│ 10 │ 28 │
├────────────┼──────────────┤
│ 25 │ 29 │
├────────────┼──────────────┤
│ 50 │ 30 │
├────────────┼──────────────┤
│ 75 │ 31 │
├────────────┼──────────────┤
│ 90 │ 32 │
├────────────┼──────────────┤
│ 97.5 │ 34 │
├────────────┼──────────────┤
│ 99 │ 36 │
├────────────┼──────────────┤
│ 99.9 │ 42 │
├────────────┼──────────────┤
│ 99.99 │ 45 │
├────────────┼──────────────┤
│ 99.999 │ 49 │
└────────────┴──────────────┘
49k requests in 15.02s, 118 MB read
2 rounds of 15 s 1 : 3,478 · 2 : 3,569 req/s · spread 2.6 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.2 vCPU, 117 MB RSS · MongoDB 0.0 vCPU · MySQL 0.4 vCPU · sandboxes 0.0 vCPU, 216 MB · whole server busy 100 %, of which kernel (network, disk) 29 % · memory used 1573 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers_pre_hook"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers_pre_hook
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼────────┼───────┤
│ Latency │ 25 ms │ 27 ms │ 48 ms │ 59 ms │ 28.25 ms │ 5.4 ms │ 73 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 2,097 │ 2,097 │ 3,579 │ 3,641 │ 3,477.67 │ 371.55 │ 2,096 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 5.08 MB │ 5.08 MB │ 8.68 MB │ 8.83 MB │ 8.43 MB │ 901 kB │ 5.08 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 1 │
├────────────┼──────────────┤
│ 0.01 │ 3 │
├────────────┼──────────────┤
│ 0.1 │ 5 │
├────────────┼──────────────┤
│ 1 │ 24 │
├────────────┼──────────────┤
│ 2.5 │ 25 │
├────────────┼──────────────┤
│ 10 │ 26 │
├────────────┼──────────────┤
│ 25 │ 26 │
├────────────┼──────────────┤
│ 50 │ 27 │
├────────────┼──────────────┤
│ 75 │ 28 │
├────────────┼──────────────┤
│ 90 │ 30 │
├────────────┼──────────────┤
│ 97.5 │ 48 │
├────────────┼──────────────┤
│ 99 │ 59 │
├────────────┼──────────────┤
│ 99.9 │ 67 │
├────────────┼──────────────┤
│ 99.99 │ 70 │
├────────────┼──────────────┤
│ 99.999 │ 73 │
└────────────┴──────────────┘
52k requests in 15.02s, 126 MB read
Get by id¶
One row by its primary key : GET …/<table>/get-by-id/<id>. About this API.
Get by id : public¶
No token : the API is public. Each answer : 278 bytes (MongoDB), status 200.
2 rounds of 15 s 1 : 4,340 · 2 : 4,306 req/s · spread 0.8 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.9 vCPU, 122 MB RSS · MongoDB 0.8 vCPU · sandboxes 0.0 vCPU, 322 MB · whole server busy 100 %, of which kernel (network, disk) 34 % · memory used 1167 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers_public/get-by-id/60ae2488c37cd955cc144161"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers_public/get-by-id/60ae2488c37cd955cc144161
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼────────┤
│ Latency │ 10 ms │ 22 ms │ 36 ms │ 42 ms │ 22.54 ms │ 6.99 ms │ 109 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┤
│ Req/Sec │ 4,219 │ 4,219 │ 4,343 │ 4,423 │ 4,340.4 │ 53.96 │ 4,217 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┤
│ Bytes/Sec │ 2.51 MB │ 2.51 MB │ 2.58 MB │ 2.63 MB │ 2.58 MB │ 32.3 kB │ 2.5 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 4 │
├────────────┼──────────────┤
│ 1 │ 8 │
├────────────┼──────────────┤
│ 2.5 │ 10 │
├────────────┼──────────────┤
│ 10 │ 15 │
├────────────┼──────────────┤
│ 25 │ 18 │
├────────────┼──────────────┤
│ 50 │ 22 │
├────────────┼──────────────┤
│ 75 │ 26 │
├────────────┼──────────────┤
│ 90 │ 30 │
├────────────┼──────────────┤
│ 97.5 │ 36 │
├────────────┼──────────────┤
│ 99 │ 42 │
├────────────┼──────────────┤
│ 99.9 │ 76 │
├────────────┼──────────────┤
│ 99.99 │ 101 │
├────────────┼──────────────┤
│ 99.999 │ 109 │
└────────────┴──────────────┘
65k requests in 15.02s, 38.7 MB read
2 rounds of 15 s 1 : 5,212 · 2 : 4,968 req/s · spread 4.8 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.8 vCPU, 113 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.8 vCPU · sandboxes 0.0 vCPU, 218 MB · whole server busy 98 %, of which kernel (network, disk) 37 % · memory used 1222 MB of 3915 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers_public/get-by-id/2"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers_public/get-by-id/2
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 17 ms │ 19 ms │ 21 ms │ 22 ms │ 18.69 ms │ 1.27 ms │ 30 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 5,131 │ 5,131 │ 5,215 │ 5,319 │ 5,211.87 │ 42.51 │ 5,130 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 2.88 MB │ 2.88 MB │ 2.92 MB │ 2.99 MB │ 2.92 MB │ 24.2 kB │ 2.88 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 5 │
├────────────┼──────────────┤
│ 0.01 │ 6 │
├────────────┼──────────────┤
│ 0.1 │ 8 │
├────────────┼──────────────┤
│ 1 │ 16 │
├────────────┼──────────────┤
│ 2.5 │ 17 │
├────────────┼──────────────┤
│ 10 │ 17 │
├────────────┼──────────────┤
│ 25 │ 18 │
├────────────┼──────────────┤
│ 50 │ 19 │
├────────────┼──────────────┤
│ 75 │ 19 │
├────────────┼──────────────┤
│ 90 │ 20 │
├────────────┼──────────────┤
│ 97.5 │ 21 │
├────────────┼──────────────┤
│ 99 │ 22 │
├────────────┼──────────────┤
│ 99.9 │ 25 │
├────────────┼──────────────┤
│ 99.99 │ 28 │
├────────────┼──────────────┤
│ 99.999 │ 30 │
└────────────┴──────────────┘
78k requests in 15.02s, 43.9 MB read
2 rounds of 15 s 1 : 5,849 · 2 : 5,899 req/s · spread 0.9 % · the output below is round 2, the closer to the average
Server during this run API Maker 1.0 vCPU, 117 MB RSS · MongoDB 0.0 vCPU · MySQL 0.6 vCPU · sandboxes 0.0 vCPU, 216 MB · whole server busy 98 %, of which kernel (network, disk) 41 % · memory used 1576 MB of 3915 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers_public/get-by-id/2"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers_public/get-by-id/2
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 15 ms │ 16 ms │ 19 ms │ 20 ms │ 16.45 ms │ 1.18 ms │ 28 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 5,819 │ 5,819 │ 5,887 │ 5,995 │ 5,899.34 │ 44.27 │ 5,818 │
├───────────┼─────────┼─────────┼────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 3.26 MB │ 3.26 MB │ 3.3 MB │ 3.36 MB │ 3.31 MB │ 24.7 kB │ 3.26 MB │
└───────────┴─────────┴─────────┴────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 1 │
├────────────┼──────────────┤
│ 0.01 │ 3 │
├────────────┼──────────────┤
│ 0.1 │ 11 │
├────────────┼──────────────┤
│ 1 │ 14 │
├────────────┼──────────────┤
│ 2.5 │ 15 │
├────────────┼──────────────┤
│ 10 │ 15 │
├────────────┼──────────────┤
│ 25 │ 16 │
├────────────┼──────────────┤
│ 50 │ 16 │
├────────────┼──────────────┤
│ 75 │ 17 │
├────────────┼──────────────┤
│ 90 │ 18 │
├────────────┼──────────────┤
│ 97.5 │ 19 │
├────────────┼──────────────┤
│ 99 │ 20 │
├────────────┼──────────────┤
│ 99.9 │ 24 │
├────────────┼──────────────┤
│ 99.99 │ 27 │
├────────────┼──────────────┤
│ 99.999 │ 28 │
└────────────┴──────────────┘
89k requests in 15.02s, 49.6 MB read
Get by id : both tokens¶
With x-am-authorization and x-am-user-authorization, both checked on every request. Each answer : 278 bytes (MongoDB), status 200.
2 rounds of 15 s 1 : 4,025 · 2 : 4,063 req/s · spread 0.9 % · the output below is round 2, the closer to the average
Server during this run API Maker 1.0 vCPU, 123 MB RSS · MongoDB 0.7 vCPU · sandboxes 0.0 vCPU, 213 MB · whole server busy 100 %, of which kernel (network, disk) 32 % · memory used 1116 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers/get-by-id/60ae2488c37cd955cc144161"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers/get-by-id/60ae2488c37cd955cc144161
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼────────┼───────┤
│ Latency │ 11 ms │ 24 ms │ 38 ms │ 41 ms │ 24.11 ms │ 6.7 ms │ 85 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬───────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼───────┼─────────┤
│ Req/Sec │ 3,969 │ 3,969 │ 4,055 │ 4,143 │ 4,062.67 │ 40.37 │ 3,969 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼───────┼─────────┤
│ Bytes/Sec │ 2.36 MB │ 2.36 MB │ 2.41 MB │ 2.46 MB │ 2.41 MB │ 24 kB │ 2.36 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴───────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 3 │
├────────────┼──────────────┤
│ 1 │ 8 │
├────────────┼──────────────┤
│ 2.5 │ 11 │
├────────────┼──────────────┤
│ 10 │ 16 │
├────────────┼──────────────┤
│ 25 │ 20 │
├────────────┼──────────────┤
│ 50 │ 24 │
├────────────┼──────────────┤
│ 75 │ 28 │
├────────────┼──────────────┤
│ 90 │ 32 │
├────────────┼──────────────┤
│ 97.5 │ 38 │
├────────────┼──────────────┤
│ 99 │ 41 │
├────────────┼──────────────┤
│ 99.9 │ 49 │
├────────────┼──────────────┤
│ 99.99 │ 75 │
├────────────┼──────────────┤
│ 99.999 │ 85 │
└────────────┴──────────────┘
61k requests in 15.02s, 36.2 MB read
2 rounds of 15 s 1 : 4,622 · 2 : 4,631 req/s · spread 0.2 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.9 vCPU, 114 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.7 vCPU · sandboxes 0.0 vCPU, 218 MB · whole server busy 98 %, of which kernel (network, disk) 34 % · memory used 1231 MB of 3915 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers/get-by-id/2"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers/get-by-id/2
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 19 ms │ 20 ms │ 35 ms │ 40 ms │ 21.13 ms │ 3.63 ms │ 59 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 3,083 │ 3,083 │ 4,767 │ 4,799 │ 4,621.54 │ 420.84 │ 3,083 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 1.73 MB │ 1.73 MB │ 2.67 MB │ 2.69 MB │ 2.59 MB │ 236 kB │ 1.73 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 1 │
├────────────┼──────────────┤
│ 0.01 │ 2 │
├────────────┼──────────────┤
│ 0.1 │ 14 │
├────────────┼──────────────┤
│ 1 │ 18 │
├────────────┼──────────────┤
│ 2.5 │ 19 │
├────────────┼──────────────┤
│ 10 │ 19 │
├────────────┼──────────────┤
│ 25 │ 20 │
├────────────┼──────────────┤
│ 50 │ 20 │
├────────────┼──────────────┤
│ 75 │ 21 │
├────────────┼──────────────┤
│ 90 │ 22 │
├────────────┼──────────────┤
│ 97.5 │ 35 │
├────────────┼──────────────┤
│ 99 │ 40 │
├────────────┼──────────────┤
│ 99.9 │ 51 │
├────────────┼──────────────┤
│ 99.99 │ 56 │
├────────────┼──────────────┤
│ 99.999 │ 59 │
└────────────┴──────────────┘
69k requests in 15.02s, 38.9 MB read
2 rounds of 15 s 1 : 5,290 · 2 : 5,318 req/s · spread 0.5 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.0 vCPU, 116 MB RSS · MongoDB 0.0 vCPU · MySQL 0.6 vCPU · sandboxes 0.0 vCPU, 216 MB · whole server busy 98 %, of which kernel (network, disk) 36 % · memory used 1561 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers/get-by-id/2"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers/get-by-id/2
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 16 ms │ 18 ms │ 21 ms │ 22 ms │ 18.4 ms │ 1.26 ms │ 31 ms │
└─────────┴───────┴───────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Req/Sec │ 5,211 │ 5,211 │ 5,291 │ 5,359 │ 5,290 │ 45.96 │ 5,211 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 2.92 MB │ 2.92 MB │ 2.97 MB │ 3.01 MB │ 2.97 MB │ 25.5 kB │ 2.92 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 3 │
├────────────┼──────────────┤
│ 0.01 │ 3 │
├────────────┼──────────────┤
│ 0.1 │ 13 │
├────────────┼──────────────┤
│ 1 │ 16 │
├────────────┼──────────────┤
│ 2.5 │ 16 │
├────────────┼──────────────┤
│ 10 │ 17 │
├────────────┼──────────────┤
│ 25 │ 18 │
├────────────┼──────────────┤
│ 50 │ 18 │
├────────────┼──────────────┤
│ 75 │ 19 │
├────────────┼──────────────┤
│ 90 │ 20 │
├────────────┼──────────────┤
│ 97.5 │ 21 │
├────────────┼──────────────┤
│ 99 │ 22 │
├────────────┼──────────────┤
│ 99.9 │ 26 │
├────────────┼──────────────┤
│ 99.99 │ 29 │
├────────────┼──────────────┤
│ 99.999 │ 31 │
└────────────┴──────────────┘
79k requests in 15.02s, 44.5 MB read
Get by id with caching¶
One row by its primary key, on a table with enableCaching: true : answered from Redis after the first request. About this API.
Get by id with caching : public¶
No token : the API is public. Each answer : 278 bytes (MongoDB), status 200.
2 rounds of 15 s 1 : 16,358 · 2 : 16,552 req/s · spread 1.2 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.6 vCPU, 120 MB RSS · MongoDB 0.0 vCPU · sandboxes 0.0 vCPU, 215 MB · Redis 0.1 vCPU · whole server busy 99 %, of which kernel (network, disk) 41 % · memory used 1074 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers_public_cached/get-by-id/60ae2488c37cd955cc144161"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers_public_cached/get-by-id/60ae2488c37cd955cc144161
100 connections
5 workers
┌─────────┬──────┬──────┬───────┬──────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼──────┼─────────┼─────────┼───────┤
│ Latency │ 3 ms │ 6 ms │ 8 ms │ 9 ms │ 5.62 ms │ 1.33 ms │ 20 ms │
└─────────┴──────┴──────┴───────┴──────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 15,855 │ 15,855 │ 16,335 │ 16,895 │ 16,358.4 │ 276.79 │ 15,854 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 9.45 MB │ 9.45 MB │ 9.74 MB │ 10.1 MB │ 9.75 MB │ 164 kB │ 9.45 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 2 │
├────────────┼──────────────┤
│ 1 │ 3 │
├────────────┼──────────────┤
│ 2.5 │ 3 │
├────────────┼──────────────┤
│ 10 │ 4 │
├────────────┼──────────────┤
│ 25 │ 5 │
├────────────┼──────────────┤
│ 50 │ 6 │
├────────────┼──────────────┤
│ 75 │ 6 │
├────────────┼──────────────┤
│ 90 │ 7 │
├────────────┼──────────────┤
│ 97.5 │ 8 │
├────────────┼──────────────┤
│ 99 │ 9 │
├────────────┼──────────────┤
│ 99.9 │ 11 │
├────────────┼──────────────┤
│ 99.99 │ 15 │
├────────────┼──────────────┤
│ 99.999 │ 18 │
└────────────┴──────────────┘
245k requests in 15.02s, 146 MB read
2 rounds of 15 s 1 : 16,610 · 2 : 16,423 req/s · spread 1.1 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.6 vCPU, 113 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.0 vCPU · sandboxes 0.0 vCPU, 218 MB · Redis 0.1 vCPU · whole server busy 99 %, of which kernel (network, disk) 41 % · memory used 1243 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers_public_cached/get-by-id/2"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers_public_cached/get-by-id/2
100 connections
5 workers
┌─────────┬──────┬──────┬───────┬──────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼──────┼─────────┼─────────┼───────┤
│ Latency │ 3 ms │ 5 ms │ 8 ms │ 9 ms │ 5.52 ms │ 1.29 ms │ 19 ms │
└─────────┴──────┴──────┴───────┴──────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬────────┬───────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼────────┼───────────┼────────┼─────────┤
│ Req/Sec │ 16,151 │ 16,151 │ 16,607 │ 16,879 │ 16,610.41 │ 184.37 │ 16,151 │
├───────────┼─────────┼─────────┼─────────┼────────┼───────────┼────────┼─────────┤
│ Bytes/Sec │ 9.09 MB │ 9.09 MB │ 9.35 MB │ 9.5 MB │ 9.35 MB │ 105 kB │ 9.09 MB │
└───────────┴─────────┴─────────┴─────────┴────────┴───────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 0 │
├────────────┼──────────────┤
│ 0.1 │ 1 │
├────────────┼──────────────┤
│ 1 │ 3 │
├────────────┼──────────────┤
│ 2.5 │ 3 │
├────────────┼──────────────┤
│ 10 │ 4 │
├────────────┼──────────────┤
│ 25 │ 5 │
├────────────┼──────────────┤
│ 50 │ 5 │
├────────────┼──────────────┤
│ 75 │ 6 │
├────────────┼──────────────┤
│ 90 │ 7 │
├────────────┼──────────────┤
│ 97.5 │ 8 │
├────────────┼──────────────┤
│ 99 │ 9 │
├────────────┼──────────────┤
│ 99.9 │ 10 │
├────────────┼──────────────┤
│ 99.99 │ 15 │
├────────────┼──────────────┤
│ 99.999 │ 17 │
└────────────┴──────────────┘
249k requests in 15.02s, 140 MB read
2 rounds of 15 s 1 : 16,705 · 2 : 16,053 req/s · spread 4 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.6 vCPU, 116 MB RSS · MongoDB 0.0 vCPU · MySQL 0.0 vCPU · sandboxes 0.0 vCPU, 216 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 41 % · memory used 1564 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers_public_cached/get-by-id/2"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers_public_cached/get-by-id/2
100 connections
5 workers
┌─────────┬──────┬──────┬───────┬──────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼──────┼─────────┼─────────┼───────┤
│ Latency │ 3 ms │ 5 ms │ 8 ms │ 9 ms │ 5.49 ms │ 1.32 ms │ 21 ms │
└─────────┴──────┴──────┴───────┴──────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 16,207 │ 16,207 │ 16,671 │ 17,695 │ 16,704.8 │ 387.29 │ 16,200 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 9.13 MB │ 9.13 MB │ 9.39 MB │ 9.96 MB │ 9.4 MB │ 218 kB │ 9.12 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 1 │
├────────────┼──────────────┤
│ 1 │ 3 │
├────────────┼──────────────┤
│ 2.5 │ 3 │
├────────────┼──────────────┤
│ 10 │ 4 │
├────────────┼──────────────┤
│ 25 │ 5 │
├────────────┼──────────────┤
│ 50 │ 5 │
├────────────┼──────────────┤
│ 75 │ 6 │
├────────────┼──────────────┤
│ 90 │ 7 │
├────────────┼──────────────┤
│ 97.5 │ 8 │
├────────────┼──────────────┤
│ 99 │ 9 │
├────────────┼──────────────┤
│ 99.9 │ 12 │
├────────────┼──────────────┤
│ 99.99 │ 18 │
├────────────┼──────────────┤
│ 99.999 │ 21 │
└────────────┴──────────────┘
251k requests in 15.01s, 141 MB read
Get by id with caching : both tokens¶
With x-am-authorization and x-am-user-authorization, both checked on every request. Each answer : 278 bytes (MongoDB), status 200.
2 rounds of 15 s 1 : 12,430 · 2 : 12,675 req/s · spread 2 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.7 vCPU, 118 MB RSS · MongoDB 0.0 vCPU · sandboxes 0.0 vCPU, 215 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 34 % · memory used 1042 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers_cached/get-by-id/60ae2488c37cd955cc144161"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/customers_cached/get-by-id/60ae2488c37cd955cc144161
100 connections
5 workers
┌─────────┬──────┬──────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 4 ms │ 8 ms │ 11 ms │ 12 ms │ 7.55 ms │ 1.77 ms │ 24 ms │
└─────────┴──────┴──────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬────────┬─────────┬───────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼────────┼─────────┼───────────┼─────────┼─────────┤
│ Req/Sec │ 12,063 │ 12,063 │ 12,407 │ 12,647 │ 12,430.14 │ 133.66 │ 12,056 │
├───────────┼─────────┼─────────┼────────┼─────────┼───────────┼─────────┼─────────┤
│ Bytes/Sec │ 7.19 MB │ 7.19 MB │ 7.4 MB │ 7.54 MB │ 7.41 MB │ 79.6 kB │ 7.19 MB │
└───────────┴─────────┴─────────┴────────┴─────────┴───────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 2 │
├────────────┼──────────────┤
│ 1 │ 3 │
├────────────┼──────────────┤
│ 2.5 │ 4 │
├────────────┼──────────────┤
│ 10 │ 5 │
├────────────┼──────────────┤
│ 25 │ 6 │
├────────────┼──────────────┤
│ 50 │ 8 │
├────────────┼──────────────┤
│ 75 │ 9 │
├────────────┼──────────────┤
│ 90 │ 10 │
├────────────┼──────────────┤
│ 97.5 │ 11 │
├────────────┼──────────────┤
│ 99 │ 12 │
├────────────┼──────────────┤
│ 99.9 │ 14 │
├────────────┼──────────────┤
│ 99.99 │ 19 │
├────────────┼──────────────┤
│ 99.999 │ 23 │
└────────────┴──────────────┘
187k requests in 15.02s, 111 MB read
2 rounds of 15 s 1 : 12,610 · 2 : 12,390 req/s · spread 1.8 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.7 vCPU, 113 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.0 vCPU · sandboxes 0.0 vCPU, 218 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 34 % · memory used 1246 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers_cached/get-by-id/2"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.customers_cached/get-by-id/2
100 connections
5 workers
┌─────────┬──────┬──────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 4 ms │ 7 ms │ 11 ms │ 12 ms │ 7.43 ms │ 1.72 ms │ 24 ms │
└─────────┴──────┴──────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼────────┤
│ Req/Sec │ 12,263 │ 12,263 │ 12,639 │ 13,119 │ 12,610.4 │ 250.87 │ 12,260 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼────────┤
│ Bytes/Sec │ 6.91 MB │ 6.91 MB │ 7.11 MB │ 7.39 MB │ 7.1 MB │ 141 kB │ 6.9 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 2 │
├────────────┼──────────────┤
│ 1 │ 3 │
├────────────┼──────────────┤
│ 2.5 │ 4 │
├────────────┼──────────────┤
│ 10 │ 5 │
├────────────┼──────────────┤
│ 25 │ 6 │
├────────────┼──────────────┤
│ 50 │ 7 │
├────────────┼──────────────┤
│ 75 │ 8 │
├────────────┼──────────────┤
│ 90 │ 10 │
├────────────┼──────────────┤
│ 97.5 │ 11 │
├────────────┼──────────────┤
│ 99 │ 12 │
├────────────┼──────────────┤
│ 99.9 │ 15 │
├────────────┼──────────────┤
│ 99.99 │ 20 │
├────────────┼──────────────┤
│ 99.999 │ 23 │
└────────────┴──────────────┘
189k requests in 15.02s, 106 MB read
2 rounds of 15 s 1 : 12,606 · 2 : 12,423 req/s · spread 1.5 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.7 vCPU, 116 MB RSS · MongoDB 0.0 vCPU · MySQL 0.0 vCPU · sandboxes 0.0 vCPU, 216 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 34 % · memory used 1565 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers_cached/get-by-id/2"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/customers_cached/get-by-id/2
100 connections
5 workers
┌─────────┬──────┬──────┬───────┬───────┬─────────┬────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼───────┼─────────┼────────┼───────┤
│ Latency │ 4 ms │ 7 ms │ 11 ms │ 12 ms │ 7.44 ms │ 1.7 ms │ 23 ms │
└─────────┴──────┴──────┴───────┴───────┴─────────┴────────┴───────┘
┌───────────┬─────────┬─────────┬────────┬─────────┬───────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼────────┼─────────┼───────────┼─────────┼─────────┤
│ Req/Sec │ 12,407 │ 12,407 │ 12,615 │ 12,847 │ 12,606.14 │ 130 │ 12,406 │
├───────────┼─────────┼─────────┼────────┼─────────┼───────────┼─────────┼─────────┤
│ Bytes/Sec │ 6.99 MB │ 6.99 MB │ 7.1 MB │ 7.23 MB │ 7.1 MB │ 72.8 kB │ 6.98 MB │
└───────────┴─────────┴─────────┴────────┴─────────┴───────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 2 │
├────────────┼──────────────┤
│ 1 │ 3 │
├────────────┼──────────────┤
│ 2.5 │ 4 │
├────────────┼──────────────┤
│ 10 │ 5 │
├────────────┼──────────────┤
│ 25 │ 6 │
├────────────┼──────────────┤
│ 50 │ 7 │
├────────────┼──────────────┤
│ 75 │ 8 │
├────────────┼──────────────┤
│ 90 │ 10 │
├────────────┼──────────────┤
│ 97.5 │ 11 │
├────────────┼──────────────┤
│ 99 │ 12 │
├────────────┼──────────────┤
│ 99.9 │ 14 │
├────────────┼──────────────┤
│ 99.99 │ 19 │
├────────────┼──────────────┤
│ 99.999 │ 22 │
└────────────┴──────────────┘
189k requests in 15.02s, 106 MB read
Insert one row¶
POST …/<table>/save-single-or-multiple with one row of 9 columns in the body : the schema checks and converts it, the database writes it, and the saved row is answered. About this API.
No token : the API is public. Each answer : 277 bytes (MongoDB), status 201.
2 rounds of 15 s 1 : 1,708 · 2 : 1,762 req/s · spread 3.1 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.7 vCPU, 123 MB RSS · MongoDB 1.0 vCPU · sandboxes 0.0 vCPU, 214 MB · whole server busy 100 %, of which kernel (network, disk) 32 % · memory used 1099 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -m POST -b '{"customer_id":1,"first_name":"BENCH","last_name":"INSERT","phone":1123456789,"last_update":"2006-02-15T04:34:00.330Z","pincode":111111,"shipping_id":2,"dob":"2022-10-30T03:25:03.000Z","country":"India"}' -H "content-type: application/json" "http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/inserts_public/save-single-or-multiple"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mongodb/am_bench/inserts_public/save-single-or-multiple
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬──────────┬────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼──────────┼────────┤
│ Latency │ 37 ms │ 58 ms │ 83 ms │ 99 ms │ 57.95 ms │ 12.18 ms │ 222 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴──────────┴────────┘
┌───────────┬────────┬────────┬─────────┬─────────┬──────────┬─────────┬────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼────────┼────────┼─────────┼─────────┼──────────┼─────────┼────────┤
│ Req/Sec │ 1,666 │ 1,666 │ 1,685 │ 1,797 │ 1,708.07 │ 43.32 │ 1,666 │
├───────────┼────────┼────────┼─────────┼─────────┼──────────┼─────────┼────────┤
│ Bytes/Sec │ 996 kB │ 996 kB │ 1.01 MB │ 1.08 MB │ 1.02 MB │ 25.9 kB │ 996 kB │
└───────────┴────────┴────────┴─────────┴─────────┴──────────┴─────────┴────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 9 │
├────────────┼──────────────┤
│ 0.01 │ 18 │
├────────────┼──────────────┤
│ 0.1 │ 24 │
├────────────┼──────────────┤
│ 1 │ 33 │
├────────────┼──────────────┤
│ 2.5 │ 37 │
├────────────┼──────────────┤
│ 10 │ 45 │
├────────────┼──────────────┤
│ 25 │ 52 │
├────────────┼──────────────┤
│ 50 │ 58 │
├────────────┼──────────────┤
│ 75 │ 62 │
├────────────┼──────────────┤
│ 90 │ 68 │
├────────────┼──────────────┤
│ 97.5 │ 83 │
├────────────┼──────────────┤
│ 99 │ 99 │
├────────────┼──────────────┤
│ 99.9 │ 164 │
├────────────┼──────────────┤
│ 99.99 │ 192 │
├────────────┼──────────────┤
│ 99.999 │ 222 │
└────────────┴──────────────┘
26k requests in 15.02s, 15.3 MB read
2 rounds of 15 s 1 : 2,362 · 2 : 2,308 req/s · spread 2.3 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.7 vCPU, 114 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.8 vCPU · sandboxes 0.0 vCPU, 218 MB · whole server busy 97 %, of which kernel (network, disk) 37 % · memory used 1232 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -m POST -b '{"first_name":"BENCH","last_name":"INSERT","phone":1123456789,"last_update":"2006-02-15T04:34:00.330Z","pincode":111111,"shipping_id":2,"dob":"2022-10-30T03:25:03.000Z","country":"India"}' -H "content-type: application/json" "http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.inserts_public/save-single-or-multiple"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/postgres/am_bench/public.inserts_public/save-single-or-multiple
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 39 ms │ 42 ms │ 47 ms │ 49 ms │ 41.8 ms │ 2.61 ms │ 55 ms │
└─────────┴───────┴───────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬───────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼───────┼─────────┤
│ Req/Sec │ 2,267 │ 2,267 │ 2,371 │ 2,409 │ 2,362.34 │ 36.92 │ 2,266 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼───────┼─────────┤
│ Bytes/Sec │ 1.29 MB │ 1.29 MB │ 1.35 MB │ 1.37 MB │ 1.34 MB │ 21 kB │ 1.29 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴───────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 3 │
├────────────┼──────────────┤
│ 0.01 │ 4 │
├────────────┼──────────────┤
│ 0.1 │ 8 │
├────────────┼──────────────┤
│ 1 │ 38 │
├────────────┼──────────────┤
│ 2.5 │ 39 │
├────────────┼──────────────┤
│ 10 │ 40 │
├────────────┼──────────────┤
│ 25 │ 41 │
├────────────┼──────────────┤
│ 50 │ 42 │
├────────────┼──────────────┤
│ 75 │ 43 │
├────────────┼──────────────┤
│ 90 │ 44 │
├────────────┼──────────────┤
│ 97.5 │ 47 │
├────────────┼──────────────┤
│ 99 │ 49 │
├────────────┼──────────────┤
│ 99.9 │ 53 │
├────────────┼──────────────┤
│ 99.99 │ 55 │
├────────────┼──────────────┤
│ 99.999 │ 55 │
└────────────┴──────────────┘
36k requests in 15.01s, 20.2 MB read
2 rounds of 15 s 1 : 2,060 · 2 : 2,102 req/s · spread 2 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.6 vCPU, 117 MB RSS · MongoDB 0.0 vCPU · MySQL 0.7 vCPU · sandboxes 0.0 vCPU, 216 MB · whole server busy 93 %, of which kernel (network, disk) 42 % · memory used 1558 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l -m POST -b '{"first_name":"BENCH","last_name":"INSERT","phone":1123456789,"last_update":"2006-02-15T04:34:00.330Z","pincode":111111,"shipping_id":2,"dob":"2022-10-30T03:25:03.000Z","country":"India"}' -H "content-type: application/json" "http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/inserts_public/save-single-or-multiple"
Running 15s test @ http://192.168.133.61:38246/api/schema/bench/mysql/am_bench/inserts_public/save-single-or-multiple
100 connections
5 workers
┌─────────┬───────┬───────┬───────┬───────┬───────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼───────┼─────────┼───────┤
│ Latency │ 44 ms │ 48 ms │ 53 ms │ 54 ms │ 48 ms │ 2.96 ms │ 63 ms │
└─────────┴───────┴───────┴───────┴───────┴───────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬────────┬─────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼────────┼─────────┼─────────┼─────────┤
│ Req/Sec │ 2,032 │ 2,032 │ 2,061 │ 2,105 │ 2,060 │ 20.66 │ 2,032 │
├───────────┼─────────┼─────────┼─────────┼────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 1.16 MB │ 1.16 MB │ 1.17 MB │ 1.2 MB │ 1.17 MB │ 11.7 kB │ 1.16 MB │
└───────────┴─────────┴─────────┴─────────┴────────┴─────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 6 │
├────────────┼──────────────┤
│ 0.01 │ 6 │
├────────────┼──────────────┤
│ 0.1 │ 9 │
├────────────┼──────────────┤
│ 1 │ 43 │
├────────────┼──────────────┤
│ 2.5 │ 44 │
├────────────┼──────────────┤
│ 10 │ 45 │
├────────────┼──────────────┤
│ 25 │ 47 │
├────────────┼──────────────┤
│ 50 │ 48 │
├────────────┼──────────────┤
│ 75 │ 49 │
├────────────┼──────────────┤
│ 90 │ 51 │
├────────────┼──────────────┤
│ 97.5 │ 53 │
├────────────┼──────────────┤
│ 99 │ 54 │
├────────────┼──────────────┤
│ 99.9 │ 58 │
├────────────┼──────────────┤
│ 99.99 │ 61 │
├────────────┼──────────────┤
│ 99.999 │ 63 │
└────────────┴──────────────┘
31k requests in 15.02s, 17.6 MB read
Custom API without a database¶
A public custom API whose code returns a small object and reads no database : what running code of the account costs, without a database. Lean code runs in the server itself, with QuickJS ; the same code with Date.now() in it runs in a sandbox of the account : the trip from API Maker to the runner in its container and back.
import * as T from 'types';
async function main(g: T.IAMGlobal) {
return { message: 'Hello from API Maker', time: 1 };
}
module.exports = main;
2 rounds of 15 s 1 : 10,810 · 2 : 10,771 req/s · spread 0.4 % · the output below is round 1, the closer to the average
Server during this run API Maker 2.0 vCPU, 116 MB RSS · MongoDB 0.0 vCPU · sandboxes 0.0 vCPU, 315 MB · whole server busy 100 %, of which kernel (network, disk) 25 % · memory used 1187 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/custom-api/bench/bench_no_db"
Running 15s test @ http://192.168.133.61:38246/api/custom-api/bench/bench_no_db
100 connections
5 workers
┌─────────┬──────┬──────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 4 ms │ 9 ms │ 13 ms │ 13 ms │ 8.75 ms │ 2.56 ms │ 22 ms │
└─────────┴──────┴──────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬───────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼───────────┼─────────┼─────────┤
│ Req/Sec │ 10,607 │ 10,607 │ 10,815 │ 11,071 │ 10,809.87 │ 94.05 │ 10,603 │
├───────────┼─────────┼─────────┼─────────┼─────────┼───────────┼─────────┼─────────┤
│ Bytes/Sec │ 4.23 MB │ 4.23 MB │ 4.32 MB │ 4.42 MB │ 4.31 MB │ 38.4 kB │ 4.23 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴───────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 0 │
├────────────┼──────────────┤
│ 0.1 │ 0 │
├────────────┼──────────────┤
│ 1 │ 0 │
├────────────┼──────────────┤
│ 2.5 │ 4 │
├────────────┼──────────────┤
│ 10 │ 6 │
├────────────┼──────────────┤
│ 25 │ 7 │
├────────────┼──────────────┤
│ 50 │ 9 │
├────────────┼──────────────┤
│ 75 │ 11 │
├────────────┼──────────────┤
│ 90 │ 12 │
├────────────┼──────────────┤
│ 97.5 │ 13 │
├────────────┼──────────────┤
│ 99 │ 13 │
├────────────┼──────────────┤
│ 99.9 │ 16 │
├────────────┼──────────────┤
│ 99.99 │ 19 │
├────────────┼──────────────┤
│ 99.999 │ 22 │
└────────────┴──────────────┘
162k requests in 15.02s, 64.7 MB read
import * as T from 'types';
async function main(g: T.IAMGlobal) {
return { message: 'Hello from the sandbox', time: Date.now() };
}
module.exports = main;
2 rounds of 15 s 1 : 9,968 · 2 : 9,938 req/s · spread 0.3 % · the output below is round 2, the closer to the average
Server during this run API Maker 1.3 vCPU, 120 MB RSS · MongoDB 0.0 vCPU · sandboxes 0.6 vCPU, 314 MB · whole server busy 100 %, of which kernel (network, disk) 28 % · memory used 1197 MB of 3916 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 5 -l "http://192.168.133.61:38246/api/custom-api/bench/bench_sandbox_no_db"
Running 15s test @ http://192.168.133.61:38246/api/custom-api/bench/bench_sandbox_no_db
100 connections
5 workers
┌─────────┬──────┬───────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼───────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 5 ms │ 10 ms │ 15 ms │ 16 ms │ 9.56 ms │ 2.54 ms │ 25 ms │
└─────────┴──────┴───────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 9,647 │ 9,647 │ 9,951 │ 10,103 │ 9,937.87 │ 126.75 │ 9,647 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 3.99 MB │ 3.99 MB │ 4.11 MB │ 4.17 MB │ 4.1 MB │ 51.4 kB │ 3.98 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 75
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 1 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 2 │
├────────────┼──────────────┤
│ 1 │ 4 │
├────────────┼──────────────┤
│ 2.5 │ 5 │
├────────────┼──────────────┤
│ 10 │ 6 │
├────────────┼──────────────┤
│ 25 │ 8 │
├────────────┼──────────────┤
│ 50 │ 10 │
├────────────┼──────────────┤
│ 75 │ 11 │
├────────────┼──────────────┤
│ 90 │ 13 │
├────────────┼──────────────┤
│ 97.5 │ 15 │
├────────────┼──────────────┤
│ 99 │ 16 │
├────────────┼──────────────┤
│ 99.9 │ 19 │
├────────────┼──────────────┤
│ 99.99 │ 23 │
├────────────┼──────────────┤
│ 99.999 │ 24 │
└────────────┴──────────────┘
149k requests in 15.02s, 61.6 MB read
More connections¶
Get all, public and Get by id with caching, public on MongoDB, one run of 15 seconds for each number of connections. More clients at once wait longer for their answer, and the server keeps answering them all.
Get all, public, by connections¶
| Connections | Requests / second | p50 | p99 | Max | Errors | Server busy | API Maker RSS |
|---|---|---|---|---|---|---|---|
| 10 | 3,698 | 2 ms | 5 ms | 12 ms | 0 | 97 % | 115 MB |
| 50 | 3,830 | 12 ms | 24 ms | 81 ms | 0 | 100 % | 118 MB |
| 100 | 3,769 | 25 ms | 67 ms | 206 ms | 0 | 100 % | 122 MB |
| 250 | 3,483 | 69 ms | 128 ms | 194 ms | 0 | 100 % | 133 MB |
| 500 | 3,578 | 139 ms | 163 ms | 246 ms | 0 | 100 % | 148 MB |
| 1,000 | 3,572 | 277 ms | 309 ms | 399 ms | 0 | 100 % | 182 MB |
Get by id with caching, public, by connections¶
| Connections | Requests / second | p50 | p99 | Max | Errors | Server busy | API Maker RSS |
|---|---|---|---|---|---|---|---|
| 10 | 11,206 | 0 ms | 1 ms | 7 ms | 0 | 90 % | 120 MB |
| 50 | 15,740 | 3 ms | 5 ms | 12 ms | 0 | 99 % | 119 MB |
| 100 | 16,389 | 6 ms | 9 ms | 21 ms | 0 | 100 % | 121 MB |
| 250 | 16,938 | 14 ms | 20 ms | 45 ms | 0 | 100 % | 131 MB |
| 500 | 16,599 | 29 ms | 38 ms | 69 ms | 0 | 100 % | 146 MB |
| 1,000 | 13,672 | 72 ms | 83 ms | 156 ms | 0 | 100 % | 174 MB |
Questions¶
How many requests per second can API Maker serve on 2 dedicated vCPUs ?¶
On this 4 GB server, with the database on the same machine : 3,712 requests per second for a whole table of ten rows on MongoDB (PostgreSQL 4,782 · MySQL 5,418), 4,323 for one row by its id, and 16,455 when the answer is cached in Redis. A custom API in TypeScript which reads the table answers 2,591 requests per second when API Maker runs it itself (lean code), 2,269 when it runs in the sandbox of the account.
How much memory does API Maker use ?¶
The API Maker process held 99 MB at rest and 127 MB at most under load on this server, in RAM. The rest of the memory went to the databases (MongoDB, Redis, PostgreSQL or MySQL), the sandboxes which run the code of the account, and Linux itself.
Do the two tokens slow the APIs down ?¶
API Maker checks both tokens (x-am-authorization and x-am-user-authorization) and the groups of the API user on every request. Get all with both tokens answered 3,564 requests per second on MongoDB (public : 3,712), 4,384 requests per second on PostgreSQL (public : 4,782), 4,939 requests per second on MySQL (public : 5,418). The checks show most where the database does no work : a cached get all answered 11,750 requests per second with both tokens against 15,152 public on MongoDB.
What does a pre hook cost ?¶
A pre hook runs code of the account before the API ; a lean hook like this one runs in the server itself, with QuickJS. Get all with a row scoping pre hook answered 2,713 requests per second on MongoDB, against 3,564 for the same API without the hook. On 2 vCPUs, the API, the hook and the database share the same 2 vCPUs.
Can I run these benchmarks myself ?¶
Yes : How API Maker is benchmarked gives the dataset, the settings of every API and the exact autocannon commands.