1 vCPU, 1 GB RAM : 2,435 to 4,623 requests per second for a whole table.
API Maker 4.0.0 on the smallest Linode server, a Nanode 1 GB (g6-nanode-1) at $5 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), Nanode 1 GB (g6-nanode-1), shared cpu, $5 / month |
| CPU | AMD EPYC 7642 48-Core Processor, 1 shared vCPU (KVM) KVM guest, 1 thread per core · L1d 64 KiB (1 instance) · L2 512 KiB (1 instance) · L3 16 MiB (1 instance) · BogoMIPS 4600.00 |
| Memory | 1 GB (961 MB usable), swap 2.5 GB (496 MB of Linode + 2 GB made by the installer) |
| Disk, region | 25 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 (its sandbox count), each opening up to 1 runner when it is busy (one per vCPU) |
| Load generator | Dedicated 8 GB (g6-dedicated-4) : AMD EPYC 7713 64-Core Processor, 4 dedicated vCPUs, Ubuntu 24.04.4 LTS, Node.js 24.21.0, autocannon 8.0.0 with 4 worker threads |
| Network | Private network of the same data centre, round trip 0.45 ms (ping) |
| Host | All seven servers were measured at the same time, each by a load generator of its own. |
| Date | 12 October 2026, 05:30 to 07:05 UTC (its MongoDB block measured again from 06:46) |
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 | 2,435 p99 46 ms | 3,787 p99 51 ms | 4,623 p99 27 ms |
| Get all | Both tokens | 2,439 p99 52 ms | 3,560 p99 36 ms | 4,126 p99 31 ms |
| Get all with caching | Public | 11,054 p99 13 ms | 11,064 p99 13 ms | 11,245 p99 13 ms |
| Get all with caching | Both tokens | 8,709 p99 17 ms | 8,797 p99 17 ms | 8,870 p99 17 ms |
| Get all by stream | Public | 2,545 p99 46 ms | 3,989 p99 31 ms | 4,213 p99 29 ms |
| Get all by stream | Both tokens | 2,548 p99 54 ms | 3,461 p99 37 ms | 3,662 p99 34 ms |
| Custom API calling get all QuickJS | Public | 1,909 p99 69 ms | 2,178 p99 57 ms | 2,419 p99 51 ms |
| Custom API calling get all QuickJS | Both tokens | 1,699 p99 125 ms | 2,016 p99 57 ms | 2,231 p99 53 ms |
| Custom API in the sandbox Sandbox | Public | 1,389 p99 97 ms | 1,871 p99 100 ms | 2,170 p99 70 ms |
| Get all with a pre hook QuickJS | Both tokens | 1,984 p99 66 ms | 2,318 p99 53 ms | 2,688 p99 47 ms |
| Get by id | Public | 3,100 p99 37 ms | 4,105 p99 31 ms | 5,090 p99 25 ms |
| Get by id | Both tokens | 3,044 p99 44 ms | 3,887 p99 32 ms | 4,526 p99 28 ms |
| Get by id with caching | Public | 12,140 p99 12 ms | 12,083 p99 12 ms | 12,193 p99 12 ms |
| Get by id with caching | Both tokens | 9,481 p99 16 ms | 9,402 p99 16 ms | 9,217 p99 16 ms |
| Insert one row | Public | 1,156 p99 110 ms | 1,818 p99 64 ms | 1,651 p99 71 ms |
| Custom API without a database | Public | 8,096 p99 18 ms | ||
| Custom API without a database, in the sandbox | Public | 9,258 p99 17 ms |
0 errors Every one of the 8,390,598 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 961 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.
With 961 MB for API Maker, its MongoDB, Redis, the database under test and two sandboxes, the server used its swap : up to 634 MB. Linux puts there the memory nothing touches, and takes it back when it is touched again. API Maker had up to 50 MB in swap, memory it holds but does not use while it serves requests, and kept as little as 44 MB in RAM. The rows in swap show what each part had there, the counts of pages swapped in and out are in the line under each run. Before MySQL, the swap could not be emptied : with it running, what the swap held did not fit in the memory of the server any more, and the runs of MySQL started with the swap in use.
| Part | MongoDB at rest → under load |
PostgreSQL at rest → under load |
MySQL at rest → under load |
|---|---|---|---|
| API Maker (process), in RAM | 84 → 111 | 88 → 105 | 76 → 88 |
| … and in swap | 0 → 16 | 0 → 0 | 2 → 50 |
| MongoDB of API Maker, in RAM | 217 → 231 | 215 → 215 | 73 → 81 |
| … and in swap | 0 → 54 | 0 → 97 | 161 → 161 |
| Redis, in RAM | 3 → 4 | 4 → 4 | 3 → 3 |
| Database under test, in RAM | MongoDB above | 68 → 113 | 323 → 327 |
| … and in swap | MongoDB above | 0 → 1 | 103 → 347 |
| Sandboxes (2 containers), in RAM | 50 → 204 | 50 → 200 | 63 → 173 |
| … and in swap | 0 → 0 | 0 → 0 | 0 → 4 |
| Whole server, RAM used | 686 → 807 | 716 → 770 | 764 → 775 |
| Swap used | 1 → 90 | 1 → 136 | 342 → 634 |
CPU¶
On 1 vCPU, API Maker and the database share the same core : every request costs the work of both. During get all, public, the core was split this way (average of the 15 seconds, in vCPUs : 1.0 is the whole core ; a process counts its own kernel time) :
| MongoDB | PostgreSQL | MySQL | |
|---|---|---|---|
| API Maker | 0.4 vCPU | 0.4 vCPU | 0.5 vCPU |
| The database | 0.5 vCPU | 0.4 vCPU | 0.4 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 1 vCPU) | 100 % | 100 % | 100 % |
| … of which kernel time (network, disk), counted in the lines above too | 33 % | 35 % | 39 % |
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 40 % busy over its 4 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 : 2,511 · 2 : 2,359 req/s · spread 6.2 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.4 vCPU, 97 MB RSS · MongoDB 0.5 vCPU · sandboxes 0.0 vCPU, 50 MB · whole server busy 100 %, of which kernel (network, disk) 33 % · memory used 690 MB of 961 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers_public"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers_public
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼────────┤
│ Latency │ 36 ms │ 39 ms │ 44 ms │ 46 ms │ 39.31 ms │ 4.08 ms │ 224 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴────────┘
┌───────────┬────────┬────────┬─────────┬─────────┬─────────┬─────────┬────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼────────┼────────┼─────────┼─────────┼─────────┼─────────┼────────┤
│ Req/Sec │ 2,449 │ 2,449 │ 2,509 │ 2,579 │ 2,510.6 │ 34.53 │ 2,449 │
├───────────┼────────┼────────┼─────────┼─────────┼─────────┼─────────┼────────┤
│ Bytes/Sec │ 6.7 MB │ 6.7 MB │ 6.86 MB │ 7.06 MB │ 6.87 MB │ 94.4 kB │ 6.7 MB │
└───────────┴────────┴────────┴─────────┴─────────┴─────────┴─────────┴────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 2 │
├────────────┼──────────────┤
│ 0.01 │ 9 │
├────────────┼──────────────┤
│ 0.1 │ 16 │
├────────────┼──────────────┤
│ 1 │ 34 │
├────────────┼──────────────┤
│ 2.5 │ 36 │
├────────────┼──────────────┤
│ 10 │ 37 │
├────────────┼──────────────┤
│ 25 │ 38 │
├────────────┼──────────────┤
│ 50 │ 39 │
├────────────┼──────────────┤
│ 75 │ 40 │
├────────────┼──────────────┤
│ 90 │ 42 │
├────────────┼──────────────┤
│ 97.5 │ 44 │
├────────────┼──────────────┤
│ 99 │ 46 │
├────────────┼──────────────┤
│ 99.9 │ 76 │
├────────────┼──────────────┤
│ 99.99 │ 203 │
├────────────┼──────────────┤
│ 99.999 │ 224 │
└────────────┴──────────────┘
38k requests in 15.02s, 103 MB read
2 rounds of 15 s 1 : 3,747 · 2 : 3,826 req/s · spread 2.1 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.4 vCPU, 96 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.4 vCPU · sandboxes 0.0 vCPU, 50 MB · whole server busy 100 %, of which kernel (network, disk) 35 % · memory used 737 MB of 961 MB · steal 0 % · swap 1511 pages moved
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers_public"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers_public
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 22 ms │ 25 ms │ 47 ms │ 51 ms │ 26.19 ms │ 5.18 ms │ 61 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Req/Sec │ 2,259 │ 2,259 │ 3,859 │ 4,061 │ 3,747 │ 434.28 │ 2,258 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 5.48 MB │ 5.48 MB │ 9.36 MB │ 9.85 MB │ 9.08 MB │ 1.05 MB │ 5.47 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 1 │
├────────────┼──────────────┤
│ 0.01 │ 4 │
├────────────┼──────────────┤
│ 0.1 │ 6 │
├────────────┼──────────────┤
│ 1 │ 22 │
├────────────┼──────────────┤
│ 2.5 │ 22 │
├────────────┼──────────────┤
│ 10 │ 23 │
├────────────┼──────────────┤
│ 25 │ 24 │
├────────────┼──────────────┤
│ 50 │ 25 │
├────────────┼──────────────┤
│ 75 │ 26 │
├────────────┼──────────────┤
│ 90 │ 28 │
├────────────┼──────────────┤
│ 97.5 │ 47 │
├────────────┼──────────────┤
│ 99 │ 51 │
├────────────┼──────────────┤
│ 99.9 │ 57 │
├────────────┼──────────────┤
│ 99.99 │ 60 │
├────────────┼──────────────┤
│ 99.999 │ 61 │
└────────────┴──────────────┘
56k requests in 15.02s, 136 MB read
2 rounds of 15 s 1 : 4,696 · 2 : 4,550 req/s · spread 3.2 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.5 vCPU, 83 MB RSS (+ 12 MB in swap) · MongoDB 0.0 vCPU · MySQL 0.4 vCPU · sandboxes 0.0 vCPU, 73 MB · whole server busy 100 %, of which kernel (network, disk) 39 % · memory used 775 MB of 962 MB · steal 0 % · swap 40 pages moved
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers_public"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers_public
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 18 ms │ 21 ms │ 25 ms │ 27 ms │ 20.8 ms │ 1.82 ms │ 44 ms │
└─────────┴───────┴───────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬───────┬───────┬─────────┬───────┬──────────┬────────┬───────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼───────┼───────┼─────────┼───────┼──────────┼────────┼───────┤
│ Req/Sec │ 4,535 │ 4,535 │ 4,647 │ 4,959 │ 4,695.87 │ 114.72 │ 4,533 │
├───────────┼───────┼───────┼─────────┼───────┼──────────┼────────┼───────┤
│ Bytes/Sec │ 11 MB │ 11 MB │ 11.3 MB │ 12 MB │ 11.4 MB │ 280 kB │ 11 MB │
└───────────┴───────┴───────┴─────────┴───────┴──────────┴────────┴───────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 3 │
├────────────┼──────────────┤
│ 0.1 │ 5 │
├────────────┼──────────────┤
│ 1 │ 18 │
├────────────┼──────────────┤
│ 2.5 │ 18 │
├────────────┼──────────────┤
│ 10 │ 19 │
├────────────┼──────────────┤
│ 25 │ 20 │
├────────────┼──────────────┤
│ 50 │ 21 │
├────────────┼──────────────┤
│ 75 │ 21 │
├────────────┼──────────────┤
│ 90 │ 22 │
├────────────┼──────────────┤
│ 97.5 │ 25 │
├────────────┼──────────────┤
│ 99 │ 27 │
├────────────┼──────────────┤
│ 99.9 │ 33 │
├────────────┼──────────────┤
│ 99.99 │ 39 │
├────────────┼──────────────┤
│ 99.999 │ 44 │
└────────────┴──────────────┘
71k requests in 15.03s, 171 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 : 2,524 · 2 : 2,354 req/s · spread 7 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.4 vCPU, 101 MB RSS · MongoDB 0.4 vCPU · sandboxes 0.0 vCPU, 60 MB · whole server busy 100 %, of which kernel (network, disk) 31 % · memory used 692 MB of 961 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 29 ms │ 39 ms │ 48 ms │ 52 ms │ 39.1 ms │ 4.39 ms │ 76 ms │
└─────────┴───────┴───────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬────────┬─────────┬─────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼────────┼─────────┼─────────┼────────┼─────────┤
│ Req/Sec │ 2,421 │ 2,421 │ 2,487 │ 2,645 │ 2,524.2 │ 80.05 │ 2,421 │
├───────────┼─────────┼─────────┼────────┼─────────┼─────────┼────────┼─────────┤
│ Bytes/Sec │ 6.62 MB │ 6.62 MB │ 6.8 MB │ 7.24 MB │ 6.9 MB │ 219 kB │ 6.62 MB │
└───────────┴─────────┴─────────┴────────┴─────────┴─────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 5 │
├────────────┼──────────────┤
│ 0.01 │ 8 │
├────────────┼──────────────┤
│ 0.1 │ 16 │
├────────────┼──────────────┤
│ 1 │ 25 │
├────────────┼──────────────┤
│ 2.5 │ 29 │
├────────────┼──────────────┤
│ 10 │ 35 │
├────────────┼──────────────┤
│ 25 │ 37 │
├────────────┼──────────────┤
│ 50 │ 39 │
├────────────┼──────────────┤
│ 75 │ 41 │
├────────────┼──────────────┤
│ 90 │ 44 │
├────────────┼──────────────┤
│ 97.5 │ 48 │
├────────────┼──────────────┤
│ 99 │ 52 │
├────────────┼──────────────┤
│ 99.9 │ 60 │
├────────────┼──────────────┤
│ 99.99 │ 69 │
├────────────┼──────────────┤
│ 99.999 │ 76 │
└────────────┴──────────────┘
38k requests in 15.04s, 104 MB read
2 rounds of 15 s 1 : 3,475 · 2 : 3,645 req/s · spread 4.8 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.5 vCPU, 97 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.3 vCPU · sandboxes 0.0 vCPU, 52 MB · whole server busy 100 %, of which kernel (network, disk) 32 % · memory used 735 MB of 961 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 25 ms │ 28 ms │ 34 ms │ 36 ms │ 28.27 ms │ 2.14 ms │ 55 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 3,375 │ 3,375 │ 3,489 │ 3,573 │ 3,474.87 │ 50.71 │ 3,375 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 8.18 MB │ 8.18 MB │ 8.46 MB │ 8.67 MB │ 8.42 MB │ 123 kB │ 8.18 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 5 │
├────────────┼──────────────┤
│ 0.01 │ 8 │
├────────────┼──────────────┤
│ 0.1 │ 21 │
├────────────┼──────────────┤
│ 1 │ 25 │
├────────────┼──────────────┤
│ 2.5 │ 25 │
├────────────┼──────────────┤
│ 10 │ 26 │
├────────────┼──────────────┤
│ 25 │ 27 │
├────────────┼──────────────┤
│ 50 │ 28 │
├────────────┼──────────────┤
│ 75 │ 29 │
├────────────┼──────────────┤
│ 90 │ 30 │
├────────────┼──────────────┤
│ 97.5 │ 34 │
├────────────┼──────────────┤
│ 99 │ 36 │
├────────────┼──────────────┤
│ 99.9 │ 44 │
├────────────┼──────────────┤
│ 99.99 │ 52 │
├────────────┼──────────────┤
│ 99.999 │ 55 │
└────────────┴──────────────┘
52k requests in 15.02s, 126 MB read
2 rounds of 15 s 1 : 4,220 · 2 : 4,031 req/s · spread 4.6 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.5 vCPU, 84 MB RSS (+ 12 MB in swap) · MongoDB 0.0 vCPU · MySQL 0.3 vCPU · sandboxes 0.0 vCPU, 74 MB · whole server busy 100 %, of which kernel (network, disk) 37 % · memory used 771 MB of 962 MB · steal 0 % · swap 188 pages moved
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 20 ms │ 23 ms │ 28 ms │ 31 ms │ 23.2 ms │ 1.96 ms │ 51 ms │
└─────────┴───────┴───────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 4,071 │ 4,071 │ 4,223 │ 4,343 │ 4,219.67 │ 79.41 │ 4,070 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 9.87 MB │ 9.87 MB │ 10.2 MB │ 10.5 MB │ 10.2 MB │ 192 kB │ 9.87 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 14 │
├────────────┼──────────────┤
│ 0.01 │ 16 │
├────────────┼──────────────┤
│ 0.1 │ 19 │
├────────────┼──────────────┤
│ 1 │ 20 │
├────────────┼──────────────┤
│ 2.5 │ 20 │
├────────────┼──────────────┤
│ 10 │ 21 │
├────────────┼──────────────┤
│ 25 │ 22 │
├────────────┼──────────────┤
│ 50 │ 23 │
├────────────┼──────────────┤
│ 75 │ 24 │
├────────────┼──────────────┤
│ 90 │ 25 │
├────────────┼──────────────┤
│ 97.5 │ 28 │
├────────────┼──────────────┤
│ 99 │ 31 │
├────────────┼──────────────┤
│ 99.9 │ 39 │
├────────────┼──────────────┤
│ 99.99 │ 46 │
├────────────┼──────────────┤
│ 99.999 │ 51 │
└────────────┴──────────────┘
63k requests in 15.03s, 153 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 : 10,924 · 2 : 11,185 req/s · spread 2.4 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.7 vCPU, 99 MB RSS · MongoDB 0.0 vCPU · sandboxes 0.0 vCPU, 60 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 47 % · memory used 689 MB of 962 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers_public_cached"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers_public_cached
100 connections
4 workers
┌─────────┬──────┬──────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 6 ms │ 9 ms │ 12 ms │ 13 ms │ 8.66 ms │ 1.81 ms │ 64 ms │
└─────────┴──────┴──────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Req/Sec │ 10,407 │ 10,407 │ 10,943 │ 11,375 │ 10,924 │ 214.63 │ 10,403 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Bytes/Sec │ 28.5 MB │ 28.5 MB │ 29.9 MB │ 31.1 MB │ 29.9 MB │ 588 kB │ 28.5 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 2 │
├────────────┼──────────────┤
│ 1 │ 5 │
├────────────┼──────────────┤
│ 2.5 │ 6 │
├────────────┼──────────────┤
│ 10 │ 7 │
├────────────┼──────────────┤
│ 25 │ 8 │
├────────────┼──────────────┤
│ 50 │ 9 │
├────────────┼──────────────┤
│ 75 │ 10 │
├────────────┼──────────────┤
│ 90 │ 11 │
├────────────┼──────────────┤
│ 97.5 │ 12 │
├────────────┼──────────────┤
│ 99 │ 13 │
├────────────┼──────────────┤
│ 99.9 │ 17 │
├────────────┼──────────────┤
│ 99.99 │ 49 │
├────────────┼──────────────┤
│ 99.999 │ 64 │
└────────────┴──────────────┘
164k requests in 15.04s, 448 MB read
2 rounds of 15 s 1 : 11,129 · 2 : 11,000 req/s · spread 1.2 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.7 vCPU, 96 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.0 vCPU · sandboxes 0.0 vCPU, 52 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 47 % · memory used 731 MB of 962 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers_public_cached"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers_public_cached
100 connections
4 workers
┌─────────┬──────┬──────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 6 ms │ 8 ms │ 12 ms │ 13 ms │ 8.48 ms │ 1.79 ms │ 47 ms │
└─────────┴──────┴──────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 9,975 │ 9,975 │ 11,367 │ 11,687 │ 11,128.8 │ 502.65 │ 9,971 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 24.2 MB │ 24.2 MB │ 27.6 MB │ 28.3 MB │ 27 MB │ 1.22 MB │ 24.2 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 3 │
├────────────┼──────────────┤
│ 1 │ 5 │
├────────────┼──────────────┤
│ 2.5 │ 6 │
├────────────┼──────────────┤
│ 10 │ 7 │
├────────────┼──────────────┤
│ 25 │ 7 │
├────────────┼──────────────┤
│ 50 │ 8 │
├────────────┼──────────────┤
│ 75 │ 9 │
├────────────┼──────────────┤
│ 90 │ 10 │
├────────────┼──────────────┤
│ 97.5 │ 12 │
├────────────┼──────────────┤
│ 99 │ 13 │
├────────────┼──────────────┤
│ 99.9 │ 17 │
├────────────┼──────────────┤
│ 99.99 │ 43 │
├────────────┼──────────────┤
│ 99.999 │ 44 │
└────────────┴──────────────┘
167k requests in 15.03s, 405 MB read
2 rounds of 15 s 1 : 11,326 · 2 : 11,164 req/s · spread 1.4 % · the output below is round 2, the closer to the average
Server during this run API Maker 0.7 vCPU, 48 MB RSS (+ 50 MB in swap) · MongoDB 0.0 vCPU · MySQL 0.0 vCPU · sandboxes 0.0 vCPU, 173 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 46 % · memory used 683 MB of 962 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers_public_cached"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers_public_cached
100 connections
4 workers
┌─────────┬──────┬──────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 6 ms │ 8 ms │ 12 ms │ 13 ms │ 8.46 ms │ 1.76 ms │ 57 ms │
└─────────┴──────┴──────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Req/Sec │ 10,791 │ 10,791 │ 11,071 │ 11,751 │ 11,164 │ 264.85 │ 10,786 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Bytes/Sec │ 26.2 MB │ 26.2 MB │ 26.9 MB │ 28.5 MB │ 27.1 MB │ 645 kB │ 26.2 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 3 │
├────────────┼──────────────┤
│ 1 │ 5 │
├────────────┼──────────────┤
│ 2.5 │ 6 │
├────────────┼──────────────┤
│ 10 │ 7 │
├────────────┼──────────────┤
│ 25 │ 7 │
├────────────┼──────────────┤
│ 50 │ 8 │
├────────────┼──────────────┤
│ 75 │ 9 │
├────────────┼──────────────┤
│ 90 │ 10 │
├────────────┼──────────────┤
│ 97.5 │ 12 │
├────────────┼──────────────┤
│ 99 │ 13 │
├────────────┼──────────────┤
│ 99.9 │ 17 │
├────────────┼──────────────┤
│ 99.99 │ 51 │
├────────────┼──────────────┤
│ 99.999 │ 55 │
└────────────┴──────────────┘
168k requests in 15.02s, 406 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 : 8,591 · 2 : 8,828 req/s · spread 2.7 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.8 vCPU, 98 MB RSS · MongoDB 0.0 vCPU · sandboxes 0.0 vCPU, 60 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 40 % · memory used 680 MB of 961 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers_cached"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers_cached
100 connections
4 workers
┌─────────┬──────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 7 ms │ 11 ms │ 16 ms │ 17 ms │ 11.15 ms │ 2.23 ms │ 46 ms │
└─────────┴──────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 8,431 │ 8,431 │ 8,591 │ 8,879 │ 8,590.67 │ 152.18 │ 8,427 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 23.1 MB │ 23.1 MB │ 23.5 MB │ 24.3 MB │ 23.5 MB │ 418 kB │ 23.1 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 3 │
├────────────┼──────────────┤
│ 1 │ 6 │
├────────────┼──────────────┤
│ 2.5 │ 7 │
├────────────┼──────────────┤
│ 10 │ 9 │
├────────────┼──────────────┤
│ 25 │ 10 │
├────────────┼──────────────┤
│ 50 │ 11 │
├────────────┼──────────────┤
│ 75 │ 12 │
├────────────┼──────────────┤
│ 90 │ 14 │
├────────────┼──────────────┤
│ 97.5 │ 16 │
├────────────┼──────────────┤
│ 99 │ 17 │
├────────────┼──────────────┤
│ 99.9 │ 24 │
├────────────┼──────────────┤
│ 99.99 │ 40 │
├────────────┼──────────────┤
│ 99.999 │ 42 │
└────────────┴──────────────┘
129k requests in 15.04s, 353 MB read
2 rounds of 15 s 1 : 8,955 · 2 : 8,639 req/s · spread 3.6 % · the output below is round 2, the closer to the average
Server during this run API Maker 0.8 vCPU, 96 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.0 vCPU · sandboxes 0.0 vCPU, 200 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 39 % · memory used 763 MB of 962 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers_cached"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers_cached
100 connections
4 workers
┌─────────┬──────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 7 ms │ 11 ms │ 16 ms │ 17 ms │ 11.08 ms │ 2.27 ms │ 48 ms │
└─────────┴──────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Req/Sec │ 8,191 │ 8,191 │ 8,679 │ 8,959 │ 8,638.8 │ 206.06 │ 8,190 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Bytes/Sec │ 19.9 MB │ 19.9 MB │ 21.1 MB │ 21.7 MB │ 21 MB │ 499 kB │ 19.9 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 3 │
├────────────┼──────────────┤
│ 1 │ 6 │
├────────────┼──────────────┤
│ 2.5 │ 7 │
├────────────┼──────────────┤
│ 10 │ 9 │
├────────────┼──────────────┤
│ 25 │ 10 │
├────────────┼──────────────┤
│ 50 │ 11 │
├────────────┼──────────────┤
│ 75 │ 12 │
├────────────┼──────────────┤
│ 90 │ 14 │
├────────────┼──────────────┤
│ 97.5 │ 16 │
├────────────┼──────────────┤
│ 99 │ 17 │
├────────────┼──────────────┤
│ 99.9 │ 24 │
├────────────┼──────────────┤
│ 99.99 │ 42 │
├────────────┼──────────────┤
│ 99.999 │ 44 │
└────────────┴──────────────┘
130k requests in 15.04s, 314 MB read
2 rounds of 15 s 1 : 8,986 · 2 : 8,753 req/s · spread 2.6 % · the output below is round 2, the closer to the average
Server during this run API Maker 0.8 vCPU, 49 MB RSS (+ 50 MB in swap) · MongoDB 0.0 vCPU · MySQL 0.0 vCPU · sandboxes 0.0 vCPU, 173 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 40 % · memory used 682 MB of 962 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers_cached"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers_cached
100 connections
4 workers
┌─────────┬──────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 7 ms │ 11 ms │ 15 ms │ 17 ms │ 10.93 ms │ 2.24 ms │ 49 ms │
└─────────┴──────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬───────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼───────┼──────────┼────────┼─────────┤
│ Req/Sec │ 8,455 │ 8,455 │ 8,711 │ 9,063 │ 8,753.34 │ 183.78 │ 8,451 │
├───────────┼─────────┼─────────┼─────────┼───────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 20.5 MB │ 20.5 MB │ 21.1 MB │ 22 MB │ 21.2 MB │ 447 kB │ 20.5 MB │
└───────────┴─────────┴─────────┴─────────┴───────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 2 │
├────────────┼──────────────┤
│ 1 │ 6 │
├────────────┼──────────────┤
│ 2.5 │ 7 │
├────────────┼──────────────┤
│ 10 │ 8 │
├────────────┼──────────────┤
│ 25 │ 10 │
├────────────┼──────────────┤
│ 50 │ 11 │
├────────────┼──────────────┤
│ 75 │ 12 │
├────────────┼──────────────┤
│ 90 │ 13 │
├────────────┼──────────────┤
│ 97.5 │ 15 │
├────────────┼──────────────┤
│ 99 │ 17 │
├────────────┼──────────────┤
│ 99.9 │ 22 │
├────────────┼──────────────┤
│ 99.99 │ 41 │
├────────────┼──────────────┤
│ 99.999 │ 48 │
└────────────┴──────────────┘
131k requests in 15.02s, 319 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 : 2,498 · 2 : 2,592 req/s · spread 3.7 % · the output below is round 2, the closer to the average
Server during this run API Maker 0.4 vCPU, 90 MB RSS (+ 16 MB in swap) · MongoDB 0.4 vCPU · sandboxes 0.0 vCPU, 194 MB · whole server busy 100 %, of which kernel (network, disk) 30 % · memory used 751 MB of 962 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers_public/stream"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers_public/stream
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 34 ms │ 38 ms │ 44 ms │ 46 ms │ 38.06 ms │ 2.92 ms │ 78 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 2,441 │ 2,441 │ 2,619 │ 2,687 │ 2,592.07 │ 74.81 │ 2,440 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 7.04 MB │ 7.04 MB │ 7.55 MB │ 7.75 MB │ 7.47 MB │ 216 kB │ 7.04 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 10 │
├────────────┼──────────────┤
│ 0.01 │ 16 │
├────────────┼──────────────┤
│ 0.1 │ 24 │
├────────────┼──────────────┤
│ 1 │ 33 │
├────────────┼──────────────┤
│ 2.5 │ 34 │
├────────────┼──────────────┤
│ 10 │ 35 │
├────────────┼──────────────┤
│ 25 │ 36 │
├────────────┼──────────────┤
│ 50 │ 38 │
├────────────┼──────────────┤
│ 75 │ 40 │
├────────────┼──────────────┤
│ 90 │ 42 │
├────────────┼──────────────┤
│ 97.5 │ 44 │
├────────────┼──────────────┤
│ 99 │ 46 │
├────────────┼──────────────┤
│ 99.9 │ 53 │
├────────────┼──────────────┤
│ 99.99 │ 76 │
├────────────┼──────────────┤
│ 99.999 │ 78 │
└────────────┴──────────────┘
39k requests in 15.03s, 112 MB read
2 rounds of 15 s 1 : 4,092 · 2 : 3,887 req/s · spread 5.1 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.4 vCPU, 96 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.4 vCPU · sandboxes 0.0 vCPU, 52 MB · whole server busy 100 %, of which kernel (network, disk) 37 % · memory used 731 MB of 961 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers_public/stream"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers_public/stream
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 21 ms │ 24 ms │ 29 ms │ 31 ms │ 23.95 ms │ 2.16 ms │ 44 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 3,921 │ 3,921 │ 4,131 │ 4,171 │ 4,091.47 │ 73.36 │ 3,920 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 10.1 MB │ 10.1 MB │ 10.6 MB │ 10.7 MB │ 10.5 MB │ 189 kB │ 10.1 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 4 │
├────────────┼──────────────┤
│ 0.01 │ 4 │
├────────────┼──────────────┤
│ 0.1 │ 6 │
├────────────┼──────────────┤
│ 1 │ 21 │
├────────────┼──────────────┤
│ 2.5 │ 21 │
├────────────┼──────────────┤
│ 10 │ 22 │
├────────────┼──────────────┤
│ 25 │ 23 │
├────────────┼──────────────┤
│ 50 │ 24 │
├────────────┼──────────────┤
│ 75 │ 25 │
├────────────┼──────────────┤
│ 90 │ 26 │
├────────────┼──────────────┤
│ 97.5 │ 29 │
├────────────┼──────────────┤
│ 99 │ 31 │
├────────────┼──────────────┤
│ 99.9 │ 37 │
├────────────┼──────────────┤
│ 99.99 │ 42 │
├────────────┼──────────────┤
│ 99.999 │ 44 │
└────────────┴──────────────┘
61k requests in 15.03s, 158 MB read
2 rounds of 15 s 1 : 4,373 · 2 : 4,052 req/s · spread 7.6 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.5 vCPU, 84 MB RSS (+ 12 MB in swap) · MongoDB 0.0 vCPU · MySQL 0.3 vCPU · sandboxes 0.0 vCPU, 74 MB · whole server busy 100 %, of which kernel (network, disk) 38 % · memory used 769 MB of 962 MB · steal 0 % · swap 4 pages moved
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers_public/stream"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers_public/stream
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 20 ms │ 22 ms │ 27 ms │ 29 ms │ 22.37 ms │ 1.72 ms │ 53 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬───────┬───────┬─────────┬─────────┬─────────┬────────┬───────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼───────┼───────┼─────────┼─────────┼─────────┼────────┼───────┤
│ Req/Sec │ 4,279 │ 4,279 │ 4,387 │ 4,471 │ 4,373.2 │ 42.99 │ 4,276 │
├───────────┼───────┼───────┼─────────┼─────────┼─────────┼────────┼───────┤
│ Bytes/Sec │ 11 MB │ 11 MB │ 11.3 MB │ 11.5 MB │ 11.3 MB │ 110 kB │ 11 MB │
└───────────┴───────┴───────┴─────────┴─────────┴─────────┴────────┴───────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 11 │
├────────────┼──────────────┤
│ 0.01 │ 14 │
├────────────┼──────────────┤
│ 0.1 │ 18 │
├────────────┼──────────────┤
│ 1 │ 20 │
├────────────┼──────────────┤
│ 2.5 │ 20 │
├────────────┼──────────────┤
│ 10 │ 21 │
├────────────┼──────────────┤
│ 25 │ 21 │
├────────────┼──────────────┤
│ 50 │ 22 │
├────────────┼──────────────┤
│ 75 │ 23 │
├────────────┼──────────────┤
│ 90 │ 24 │
├────────────┼──────────────┤
│ 97.5 │ 27 │
├────────────┼──────────────┤
│ 99 │ 29 │
├────────────┼──────────────┤
│ 99.9 │ 36 │
├────────────┼──────────────┤
│ 99.99 │ 51 │
├────────────┼──────────────┤
│ 99.999 │ 53 │
└────────────┴──────────────┘
66k requests in 15.03s, 169 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 : 2,577 · 2 : 2,519 req/s · spread 2.3 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.4 vCPU, 101 MB RSS · MongoDB 0.4 vCPU · sandboxes 0.0 vCPU, 61 MB · whole server busy 100 %, of which kernel (network, disk) 29 % · memory used 690 MB of 962 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers/stream"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers/stream
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 25 ms │ 39 ms │ 51 ms │ 54 ms │ 38.3 ms │ 6.64 ms │ 80 ms │
└─────────┴───────┴───────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Req/Sec │ 2,461 │ 2,461 │ 2,591 │ 2,637 │ 2,576.6 │ 49.32 │ 2,460 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Bytes/Sec │ 7.34 MB │ 7.34 MB │ 7.73 MB │ 7.87 MB │ 7.69 MB │ 147 kB │ 7.34 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 7 │
├────────────┼──────────────┤
│ 0.01 │ 8 │
├────────────┼──────────────┤
│ 0.1 │ 13 │
├────────────┼──────────────┤
│ 1 │ 22 │
├────────────┼──────────────┤
│ 2.5 │ 25 │
├────────────┼──────────────┤
│ 10 │ 30 │
├────────────┼──────────────┤
│ 25 │ 34 │
├────────────┼──────────────┤
│ 50 │ 39 │
├────────────┼──────────────┤
│ 75 │ 43 │
├────────────┼──────────────┤
│ 90 │ 46 │
├────────────┼──────────────┤
│ 97.5 │ 51 │
├────────────┼──────────────┤
│ 99 │ 54 │
├────────────┼──────────────┤
│ 99.9 │ 60 │
├────────────┼──────────────┤
│ 99.99 │ 68 │
├────────────┼──────────────┤
│ 99.999 │ 80 │
└────────────┴──────────────┘
39k requests in 15.03s, 115 MB read
2 rounds of 15 s 1 : 3,379 · 2 : 3,542 req/s · spread 4.7 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.5 vCPU, 97 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.3 vCPU · sandboxes 0.0 vCPU, 52 MB · whole server busy 100 %, of which kernel (network, disk) 34 % · memory used 730 MB of 962 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers/stream"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers/stream
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 26 ms │ 29 ms │ 35 ms │ 37 ms │ 29.09 ms │ 2.35 ms │ 52 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 3,273 │ 3,273 │ 3,373 │ 3,455 │ 3,379.14 │ 47.57 │ 3,272 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 8.75 MB │ 8.75 MB │ 9.02 MB │ 9.24 MB │ 9.03 MB │ 128 kB │ 8.75 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 4 │
├────────────┼──────────────┤
│ 0.01 │ 5 │
├────────────┼──────────────┤
│ 0.1 │ 7 │
├────────────┼──────────────┤
│ 1 │ 25 │
├────────────┼──────────────┤
│ 2.5 │ 26 │
├────────────┼──────────────┤
│ 10 │ 27 │
├────────────┼──────────────┤
│ 25 │ 28 │
├────────────┼──────────────┤
│ 50 │ 29 │
├────────────┼──────────────┤
│ 75 │ 30 │
├────────────┼──────────────┤
│ 90 │ 31 │
├────────────┼──────────────┤
│ 97.5 │ 35 │
├────────────┼──────────────┤
│ 99 │ 37 │
├────────────┼──────────────┤
│ 99.9 │ 44 │
├────────────┼──────────────┤
│ 99.99 │ 48 │
├────────────┼──────────────┤
│ 99.999 │ 52 │
└────────────┴──────────────┘
51k requests in 15.02s, 135 MB read
2 rounds of 15 s 1 : 3,719 · 2 : 3,605 req/s · spread 3.1 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.5 vCPU, 84 MB RSS (+ 12 MB in swap) · MongoDB 0.0 vCPU · MySQL 0.3 vCPU · sandboxes 0.0 vCPU, 75 MB · whole server busy 100 %, of which kernel (network, disk) 35 % · memory used 773 MB of 962 MB · steal 0 % · swap 20 pages moved
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers/stream"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers/stream
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬─────────┬────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼─────────┼────────┼───────┤
│ Latency │ 23 ms │ 26 ms │ 31 ms │ 34 ms │ 26.4 ms │ 2.2 ms │ 52 ms │
└─────────┴───────┴───────┴───────┴───────┴─────────┴────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 3,529 │ 3,529 │ 3,709 │ 3,929 │ 3,718.87 │ 96.01 │ 3,529 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 9.44 MB │ 9.44 MB │ 9.92 MB │ 10.5 MB │ 9.94 MB │ 256 kB │ 9.43 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 2 │
├────────────┼──────────────┤
│ 0.01 │ 3 │
├────────────┼──────────────┤
│ 0.1 │ 7 │
├────────────┼──────────────┤
│ 1 │ 23 │
├────────────┼──────────────┤
│ 2.5 │ 23 │
├────────────┼──────────────┤
│ 10 │ 24 │
├────────────┼──────────────┤
│ 25 │ 25 │
├────────────┼──────────────┤
│ 50 │ 26 │
├────────────┼──────────────┤
│ 75 │ 27 │
├────────────┼──────────────┤
│ 90 │ 28 │
├────────────┼──────────────┤
│ 97.5 │ 31 │
├────────────┼──────────────┤
│ 99 │ 34 │
├────────────┼──────────────┤
│ 99.9 │ 39 │
├────────────┼──────────────┤
│ 99.99 │ 48 │
├────────────┼──────────────┤
│ 99.999 │ 52 │
└────────────┴──────────────┘
56k requests in 15.04s, 149 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 : 1,917 · 2 : 1,901 req/s · spread 0.9 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.6 vCPU, 108 MB RSS · MongoDB 0.3 vCPU · sandboxes 0.0 vCPU, 61 MB · whole server busy 100 %, of which kernel (network, disk) 23 % · memory used 695 MB of 962 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/custom-api/bench/bench_mongodb_public"
Running 15s test @ http://192.168.140.110:38246/api/custom-api/bench/bench_mongodb_public
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 32 ms │ 53 ms │ 65 ms │ 69 ms │ 51.61 ms │ 8.57 ms │ 96 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 1,880 │ 1,880 │ 1,919 │ 1,955 │ 1,917.07 │ 22.1 │ 1,880 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 5.14 MB │ 5.14 MB │ 5.25 MB │ 5.35 MB │ 5.24 MB │ 60.5 kB │ 5.14 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 15 │
├────────────┼──────────────┤
│ 1 │ 22 │
├────────────┼──────────────┤
│ 2.5 │ 32 │
├────────────┼──────────────┤
│ 10 │ 39 │
├────────────┼──────────────┤
│ 25 │ 49 │
├────────────┼──────────────┤
│ 50 │ 53 │
├────────────┼──────────────┤
│ 75 │ 57 │
├────────────┼──────────────┤
│ 90 │ 60 │
├────────────┼──────────────┤
│ 97.5 │ 65 │
├────────────┼──────────────┤
│ 99 │ 69 │
├────────────┼──────────────┤
│ 99.9 │ 80 │
├────────────┼──────────────┤
│ 99.99 │ 89 │
├────────────┼──────────────┤
│ 99.999 │ 96 │
└────────────┴──────────────┘
29k requests in 15.04s, 78.6 MB read
2 rounds of 15 s 1 : 2,155 · 2 : 2,201 req/s · spread 2.1 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.7 vCPU, 104 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.2 vCPU · sandboxes 0.0 vCPU, 52 MB · whole server busy 100 %, of which kernel (network, disk) 23 % · memory used 734 MB of 961 MB · steal 0 % · swap 3219 pages moved
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/custom-api/bench/bench_postgres_public"
Running 15s test @ http://192.168.140.110:38246/api/custom-api/bench/bench_postgres_public
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 41 ms │ 46 ms │ 53 ms │ 57 ms │ 45.87 ms │ 3.67 ms │ 84 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 2,099 │ 2,099 │ 2,151 │ 2,211 │ 2,154.87 │ 29.93 │ 2,098 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 5.09 MB │ 5.09 MB │ 5.21 MB │ 5.36 MB │ 5.22 MB │ 73.1 kB │ 5.09 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 5 │
├────────────┼──────────────┤
│ 0.01 │ 6 │
├────────────┼──────────────┤
│ 0.1 │ 10 │
├────────────┼──────────────┤
│ 1 │ 40 │
├────────────┼──────────────┤
│ 2.5 │ 41 │
├────────────┼──────────────┤
│ 10 │ 43 │
├────────────┼──────────────┤
│ 25 │ 44 │
├────────────┼──────────────┤
│ 50 │ 46 │
├────────────┼──────────────┤
│ 75 │ 47 │
├────────────┼──────────────┤
│ 90 │ 49 │
├────────────┼──────────────┤
│ 97.5 │ 53 │
├────────────┼──────────────┤
│ 99 │ 57 │
├────────────┼──────────────┤
│ 99.9 │ 73 │
├────────────┼──────────────┤
│ 99.99 │ 82 │
├────────────┼──────────────┤
│ 99.999 │ 84 │
└────────────┴──────────────┘
32k requests in 15.03s, 78.3 MB read
2 rounds of 15 s 1 : 2,415 · 2 : 2,423 req/s · spread 0.3 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.7 vCPU, 88 MB RSS (+ 20 MB in swap) · MongoDB 0.0 vCPU · MySQL 0.2 vCPU · sandboxes 0.0 vCPU, 53 MB · whole server busy 100 %, of which kernel (network, disk) 25 % · memory used 770 MB of 962 MB · steal 0 % · swap 2601 pages moved
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/custom-api/bench/bench_mysql_public"
Running 15s test @ http://192.168.140.110:38246/api/custom-api/bench/bench_mysql_public
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 36 ms │ 41 ms │ 48 ms │ 51 ms │ 40.89 ms │ 3.29 ms │ 68 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Req/Sec │ 2,295 │ 2,295 │ 2,383 │ 2,575 │ 2,415 │ 80.14 │ 2,295 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Bytes/Sec │ 5.57 MB │ 5.57 MB │ 5.78 MB │ 6.24 MB │ 5.85 MB │ 194 kB │ 5.56 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 7 │
├────────────┼──────────────┤
│ 0.01 │ 12 │
├────────────┼──────────────┤
│ 0.1 │ 32 │
├────────────┼──────────────┤
│ 1 │ 35 │
├────────────┼──────────────┤
│ 2.5 │ 36 │
├────────────┼──────────────┤
│ 10 │ 37 │
├────────────┼──────────────┤
│ 25 │ 39 │
├────────────┼──────────────┤
│ 50 │ 41 │
├────────────┼──────────────┤
│ 75 │ 42 │
├────────────┼──────────────┤
│ 90 │ 44 │
├────────────┼──────────────┤
│ 97.5 │ 48 │
├────────────┼──────────────┤
│ 99 │ 51 │
├────────────┼──────────────┤
│ 99.9 │ 65 │
├────────────┼──────────────┤
│ 99.99 │ 67 │
├────────────┼──────────────┤
│ 99.999 │ 68 │
└────────────┴──────────────┘
36k requests in 15.04s, 87.8 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 : 1,633 · 2 : 1,766 req/s · spread 7.8 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.6 vCPU, 111 MB RSS · MongoDB 0.3 vCPU · sandboxes 0.0 vCPU, 61 MB · whole server busy 100 %, of which kernel (network, disk) 23 % · memory used 699 MB of 962 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/custom-api/bench/bench_mongodb_tokens"
Running 15s test @ http://192.168.140.110:38246/api/custom-api/bench/bench_mongodb_tokens
100 connections
4 workers
┌─────────┬───────┬───────┬────────┬────────┬──────────┬──────────┬────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼────────┼────────┼──────────┼──────────┼────────┤
│ Latency │ 37 ms │ 61 ms │ 103 ms │ 125 ms │ 60.66 ms │ 14.43 ms │ 157 ms │
└─────────┴───────┴───────┴────────┴────────┴──────────┴──────────┴────────┘
┌───────────┬────────┬────────┬─────────┬─────────┬─────────┬────────┬────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼────────┼────────┼─────────┼─────────┼─────────┼────────┼────────┤
│ Req/Sec │ 1,244 │ 1,244 │ 1,674 │ 1,746 │ 1,632.6 │ 150.66 │ 1,244 │
├───────────┼────────┼────────┼─────────┼─────────┼─────────┼────────┼────────┤
│ Bytes/Sec │ 3.4 MB │ 3.4 MB │ 4.58 MB │ 4.78 MB │ 4.47 MB │ 412 kB │ 3.4 MB │
└───────────┴────────┴────────┴─────────┴─────────┴─────────┴────────┴────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 1 │
├────────────┼──────────────┤
│ 0.01 │ 6 │
├────────────┼──────────────┤
│ 0.1 │ 17 │
├────────────┼──────────────┤
│ 1 │ 25 │
├────────────┼──────────────┤
│ 2.5 │ 37 │
├────────────┼──────────────┤
│ 10 │ 44 │
├────────────┼──────────────┤
│ 25 │ 56 │
├────────────┼──────────────┤
│ 50 │ 61 │
├────────────┼──────────────┤
│ 75 │ 65 │
├────────────┼──────────────┤
│ 90 │ 70 │
├────────────┼──────────────┤
│ 97.5 │ 103 │
├────────────┼──────────────┤
│ 99 │ 125 │
├────────────┼──────────────┤
│ 99.9 │ 141 │
├────────────┼──────────────┤
│ 99.99 │ 157 │
├────────────┼──────────────┤
│ 99.999 │ 157 │
└────────────┴──────────────┘
25k requests in 15.03s, 67 MB read
2 rounds of 15 s 1 : 1,964 · 2 : 2,069 req/s · spread 5.2 % · the output below is round 2, the closer to the average
Server during this run API Maker 0.7 vCPU, 99 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.2 vCPU · sandboxes 0.0 vCPU, 188 MB · whole server busy 100 %, of which kernel (network, disk) 22 % · memory used 769 MB of 961 MB · steal 0 % · swap 23 pages moved
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/custom-api/bench/bench_postgres_tokens"
Running 15s test @ http://192.168.140.110:38246/api/custom-api/bench/bench_postgres_tokens
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 43 ms │ 48 ms │ 55 ms │ 57 ms │ 47.81 ms │ 2.83 ms │ 76 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬───────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼───────┼─────────┤
│ Req/Sec │ 2,030 │ 2,030 │ 2,079 │ 2,093 │ 2,069.07 │ 20.02 │ 2,030 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼───────┼─────────┤
│ Bytes/Sec │ 4.92 MB │ 4.92 MB │ 5.04 MB │ 5.07 MB │ 5.01 MB │ 48 kB │ 4.92 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴───────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 29 │
├────────────┼──────────────┤
│ 0.01 │ 35 │
├────────────┼──────────────┤
│ 0.1 │ 39 │
├────────────┼──────────────┤
│ 1 │ 42 │
├────────────┼──────────────┤
│ 2.5 │ 43 │
├────────────┼──────────────┤
│ 10 │ 45 │
├────────────┼──────────────┤
│ 25 │ 46 │
├────────────┼──────────────┤
│ 50 │ 48 │
├────────────┼──────────────┤
│ 75 │ 49 │
├────────────┼──────────────┤
│ 90 │ 50 │
├────────────┼──────────────┤
│ 97.5 │ 55 │
├────────────┼──────────────┤
│ 99 │ 57 │
├────────────┼──────────────┤
│ 99.9 │ 67 │
├────────────┼──────────────┤
│ 99.99 │ 74 │
├────────────┼──────────────┤
│ 99.999 │ 76 │
└────────────┴──────────────┘
31k requests in 15.03s, 75.2 MB read
2 rounds of 15 s 1 : 2,222 · 2 : 2,240 req/s · spread 0.8 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.7 vCPU, 85 MB RSS (+ 20 MB in swap) · MongoDB 0.0 vCPU · MySQL 0.2 vCPU · sandboxes 0.0 vCPU, 53 MB · whole server busy 100 %, of which kernel (network, disk) 24 % · memory used 762 MB of 962 MB · steal 0 % · swap 1 pages moved
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/custom-api/bench/bench_mysql_tokens"
Running 15s test @ http://192.168.140.110:38246/api/custom-api/bench/bench_mysql_tokens
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 40 ms │ 44 ms │ 51 ms │ 53 ms │ 44.49 ms │ 2.89 ms │ 68 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬───────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼───────┼─────────┤
│ Req/Sec │ 2,179 │ 2,179 │ 2,223 │ 2,271 │ 2,221.81 │ 21.87 │ 2,178 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼───────┼─────────┤
│ Bytes/Sec │ 5.28 MB │ 5.28 MB │ 5.39 MB │ 5.51 MB │ 5.38 MB │ 53 kB │ 5.28 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴───────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 11 │
├────────────┼──────────────┤
│ 0.01 │ 15 │
├────────────┼──────────────┤
│ 0.1 │ 30 │
├────────────┼──────────────┤
│ 1 │ 39 │
├────────────┼──────────────┤
│ 2.5 │ 40 │
├────────────┼──────────────┤
│ 10 │ 41 │
├────────────┼──────────────┤
│ 25 │ 43 │
├────────────┼──────────────┤
│ 50 │ 44 │
├────────────┼──────────────┤
│ 75 │ 46 │
├────────────┼──────────────┤
│ 90 │ 47 │
├────────────┼──────────────┤
│ 97.5 │ 51 │
├────────────┼──────────────┤
│ 99 │ 53 │
├────────────┼──────────────┤
│ 99.9 │ 63 │
├────────────┼──────────────┤
│ 99.99 │ 68 │
├────────────┼──────────────┤
│ 99.999 │ 68 │
└────────────┴──────────────┘
33k requests in 15.03s, 80.8 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 : 1,380 · 2 : 1,397 req/s · spread 1.2 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.2 vCPU, 104 MB RSS · MongoDB 0.3 vCPU · sandboxes 0.5 vCPU, 204 MB · whole server busy 100 %, of which kernel (network, disk) 22 % · memory used 807 MB of 961 MB · steal 0 % · swap 2180 pages moved
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/custom-api/bench/bench_mongodb_sandbox"
Running 15s test @ http://192.168.140.110:38246/api/custom-api/bench/bench_mongodb_sandbox
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬──────────┬────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼──────────┼────────┤
│ Latency │ 13 ms │ 75 ms │ 91 ms │ 97 ms │ 71.82 ms │ 15.58 ms │ 126 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴──────────┴────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬───────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼───────┼─────────┤
│ Req/Sec │ 1,342 │ 1,342 │ 1,373 │ 1,442 │ 1,380.27 │ 29.58 │ 1,342 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼───────┼─────────┤
│ Bytes/Sec │ 3.67 MB │ 3.67 MB │ 3.76 MB │ 3.94 MB │ 3.77 MB │ 81 kB │ 3.67 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴───────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 1 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 2 │
├────────────┼──────────────┤
│ 1 │ 5 │
├────────────┼──────────────┤
│ 2.5 │ 13 │
├────────────┼──────────────┤
│ 10 │ 59 │
├────────────┼──────────────┤
│ 25 │ 71 │
├────────────┼──────────────┤
│ 50 │ 75 │
├────────────┼──────────────┤
│ 75 │ 79 │
├────────────┼──────────────┤
│ 90 │ 83 │
├────────────┼──────────────┤
│ 97.5 │ 91 │
├────────────┼──────────────┤
│ 99 │ 97 │
├────────────┼──────────────┤
│ 99.9 │ 114 │
├────────────┼──────────────┤
│ 99.99 │ 125 │
├────────────┼──────────────┤
│ 99.999 │ 126 │
└────────────┴──────────────┘
21k requests in 15.02s, 56.6 MB read
2 rounds of 15 s 1 : 1,837 · 2 : 1,905 req/s · spread 3.6 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.2 vCPU, 99 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.2 vCPU · sandboxes 0.4 vCPU, 179 MB · whole server busy 100 %, of which kernel (network, disk) 24 % · memory used 765 MB of 962 MB · steal 0 % · swap 7252 pages moved
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/custom-api/bench/bench_postgres_sandbox"
Running 15s test @ http://192.168.140.110:38246/api/custom-api/bench/bench_postgres_sandbox
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬────────┬──────────┬─────────┬────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼────────┼──────────┼─────────┼────────┤
│ Latency │ 29 ms │ 52 ms │ 89 ms │ 100 ms │ 53.89 ms │ 15.2 ms │ 151 ms │
└─────────┴───────┴───────┴───────┴────────┴──────────┴─────────┴────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 1,343 │ 1,343 │ 1,916 │ 1,973 │ 1,836.67 │ 183.21 │ 1,343 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 3.26 MB │ 3.26 MB │ 4.64 MB │ 4.78 MB │ 4.45 MB │ 444 kB │ 3.26 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 1 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 8 │
├────────────┼──────────────┤
│ 1 │ 24 │
├────────────┼──────────────┤
│ 2.5 │ 29 │
├────────────┼──────────────┤
│ 10 │ 37 │
├────────────┼──────────────┤
│ 25 │ 44 │
├────────────┼──────────────┤
│ 50 │ 52 │
├────────────┼──────────────┤
│ 75 │ 62 │
├────────────┼──────────────┤
│ 90 │ 73 │
├────────────┼──────────────┤
│ 97.5 │ 89 │
├────────────┼──────────────┤
│ 99 │ 100 │
├────────────┼──────────────┤
│ 99.9 │ 130 │
├────────────┼──────────────┤
│ 99.99 │ 143 │
├────────────┼──────────────┤
│ 99.999 │ 151 │
└────────────┴──────────────┘
28k requests in 15.04s, 66.8 MB read
2 rounds of 15 s 1 : 2,231 · 2 : 2,109 req/s · spread 5.6 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.3 vCPU, 73 MB RSS (+ 28 MB in swap) · MongoDB 0.0 vCPU · MySQL 0.2 vCPU · sandboxes 0.4 vCPU, 155 MB · whole server busy 100 %, of which kernel (network, disk) 26 % · memory used 752 MB of 961 MB · steal 0 % · swap 7405 pages moved
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/custom-api/bench/bench_mysql_sandbox"
Running 15s test @ http://192.168.140.110:38246/api/custom-api/bench/bench_mysql_sandbox
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 27 ms │ 43 ms │ 65 ms │ 70 ms │ 44.26 ms │ 9.86 ms │ 91 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Req/Sec │ 2,131 │ 2,131 │ 2,233 │ 2,343 │ 2,231 │ 53.64 │ 2,131 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Bytes/Sec │ 5.17 MB │ 5.17 MB │ 5.41 MB │ 5.68 MB │ 5.41 MB │ 130 kB │ 5.17 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 12 │
├────────────┼──────────────┤
│ 0.01 │ 15 │
├────────────┼──────────────┤
│ 0.1 │ 19 │
├────────────┼──────────────┤
│ 1 │ 24 │
├────────────┼──────────────┤
│ 2.5 │ 27 │
├────────────┼──────────────┤
│ 10 │ 32 │
├────────────┼──────────────┤
│ 25 │ 37 │
├────────────┼──────────────┤
│ 50 │ 43 │
├────────────┼──────────────┤
│ 75 │ 51 │
├────────────┼──────────────┤
│ 90 │ 58 │
├────────────┼──────────────┤
│ 97.5 │ 65 │
├────────────┼──────────────┤
│ 99 │ 70 │
├────────────┼──────────────┤
│ 99.9 │ 79 │
├────────────┼──────────────┤
│ 99.99 │ 87 │
├────────────┼──────────────┤
│ 99.999 │ 91 │
└────────────┴──────────────┘
34k requests in 15.03s, 81.1 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 : 1,991 · 2 : 1,976 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, 103 MB RSS (+ 1 MB in swap) · MongoDB 0.4 vCPU · sandboxes 0.0 vCPU, 112 MB · whole server busy 100 %, of which kernel (network, disk) 25 % · memory used 717 MB of 962 MB · steal 0 % · swap 1 pages moved
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers_pre_hook"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers_pre_hook
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 31 ms │ 52 ms │ 63 ms │ 66 ms │ 50.06 ms │ 8.33 ms │ 79 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 1,934 │ 1,934 │ 1,973 │ 2,035 │ 1,975.87 │ 24.02 │ 1,934 │
├───────────┼─────────┼─────────┼────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 5.29 MB │ 5.29 MB │ 5.4 MB │ 5.57 MB │ 5.4 MB │ 65.2 kB │ 5.29 MB │
└───────────┴─────────┴─────────┴────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 1 │
├────────────┼──────────────┤
│ 0.01 │ 5 │
├────────────┼──────────────┤
│ 0.1 │ 13 │
├────────────┼──────────────┤
│ 1 │ 22 │
├────────────┼──────────────┤
│ 2.5 │ 31 │
├────────────┼──────────────┤
│ 10 │ 37 │
├────────────┼──────────────┤
│ 25 │ 47 │
├────────────┼──────────────┤
│ 50 │ 52 │
├────────────┼──────────────┤
│ 75 │ 55 │
├────────────┼──────────────┤
│ 90 │ 58 │
├────────────┼──────────────┤
│ 97.5 │ 63 │
├────────────┼──────────────┤
│ 99 │ 66 │
├────────────┼──────────────┤
│ 99.9 │ 73 │
├────────────┼──────────────┤
│ 99.99 │ 77 │
├────────────┼──────────────┤
│ 99.999 │ 79 │
└────────────┴──────────────┘
30k requests in 15.03s, 81.1 MB read
2 rounds of 15 s 1 : 2,314 · 2 : 2,321 req/s · spread 0.3 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.6 vCPU, 99 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.3 vCPU · sandboxes 0.0 vCPU, 179 MB · whole server busy 100 %, of which kernel (network, disk) 25 % · memory used 765 MB of 962 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers_pre_hook"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers_pre_hook
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 38 ms │ 42 ms │ 50 ms │ 53 ms │ 42.69 ms │ 2.96 ms │ 68 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬────────┬────────┬─────────┬─────────┬──────────┬───────┬────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼────────┼────────┼─────────┼─────────┼──────────┼───────┼────────┤
│ Req/Sec │ 2,269 │ 2,269 │ 2,313 │ 2,399 │ 2,314.34 │ 36.23 │ 2,269 │
├───────────┼────────┼────────┼─────────┼─────────┼──────────┼───────┼────────┤
│ Bytes/Sec │ 5.5 MB │ 5.5 MB │ 5.61 MB │ 5.82 MB │ 5.61 MB │ 88 kB │ 5.5 MB │
└───────────┴────────┴────────┴─────────┴─────────┴──────────┴───────┴────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 20 │
├────────────┼──────────────┤
│ 0.01 │ 27 │
├────────────┼──────────────┤
│ 0.1 │ 35 │
├────────────┼──────────────┤
│ 1 │ 37 │
├────────────┼──────────────┤
│ 2.5 │ 38 │
├────────────┼──────────────┤
│ 10 │ 40 │
├────────────┼──────────────┤
│ 25 │ 41 │
├────────────┼──────────────┤
│ 50 │ 42 │
├────────────┼──────────────┤
│ 75 │ 44 │
├────────────┼──────────────┤
│ 90 │ 45 │
├────────────┼──────────────┤
│ 97.5 │ 50 │
├────────────┼──────────────┤
│ 99 │ 53 │
├────────────┼──────────────┤
│ 99.9 │ 60 │
├────────────┼──────────────┤
│ 99.99 │ 67 │
├────────────┼──────────────┤
│ 99.999 │ 68 │
└────────────┴──────────────┘
35k requests in 15.03s, 84.1 MB read
2 rounds of 15 s 1 : 2,669 · 2 : 2,707 req/s · spread 1.4 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.6 vCPU, 74 MB RSS (+ 28 MB in swap) · MongoDB 0.0 vCPU · MySQL 0.2 vCPU · sandboxes 0.0 vCPU, 155 MB · whole server busy 100 %, of which kernel (network, disk) 25 % · memory used 749 MB of 961 MB · steal 0 % · swap 550 pages moved
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers_pre_hook"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers_pre_hook
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 32 ms │ 37 ms │ 45 ms │ 47 ms │ 36.95 ms │ 3.03 ms │ 67 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 2,581 │ 2,581 │ 2,661 │ 2,775 │ 2,668.87 │ 69.33 │ 2,581 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 6.26 MB │ 6.26 MB │ 6.45 MB │ 6.73 MB │ 6.47 MB │ 168 kB │ 6.26 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 12 │
├────────────┼──────────────┤
│ 0.01 │ 25 │
├────────────┼──────────────┤
│ 0.1 │ 30 │
├────────────┼──────────────┤
│ 1 │ 32 │
├────────────┼──────────────┤
│ 2.5 │ 32 │
├────────────┼──────────────┤
│ 10 │ 34 │
├────────────┼──────────────┤
│ 25 │ 35 │
├────────────┼──────────────┤
│ 50 │ 37 │
├────────────┼──────────────┤
│ 75 │ 38 │
├────────────┼──────────────┤
│ 90 │ 40 │
├────────────┼──────────────┤
│ 97.5 │ 45 │
├────────────┼──────────────┤
│ 99 │ 47 │
├────────────┼──────────────┤
│ 99.9 │ 57 │
├────────────┼──────────────┤
│ 99.99 │ 64 │
├────────────┼──────────────┤
│ 99.999 │ 67 │
└────────────┴──────────────┘
40k requests in 15.04s, 97 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 : 3,114 · 2 : 3,085 req/s · spread 0.9 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.4 vCPU, 101 MB RSS (+ 1 MB in swap) · MongoDB 0.4 vCPU · sandboxes 0.0 vCPU, 201 MB · whole server busy 100 %, of which kernel (network, disk) 33 % · memory used 797 MB of 961 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers_public/get-by-id/60ae2488c37cd955cc144161"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers_public/get-by-id/60ae2488c37cd955cc144161
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 28 ms │ 31 ms │ 36 ms │ 37 ms │ 31.61 ms │ 2.21 ms │ 55 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬────────┬─────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼────────┼─────────┼─────────┼─────────┤
│ Req/Sec │ 2,977 │ 2,977 │ 3,121 │ 3,197 │ 3,114.2 │ 61.51 │ 2,976 │
├───────────┼─────────┼─────────┼─────────┼────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 1.77 MB │ 1.77 MB │ 1.85 MB │ 1.9 MB │ 1.85 MB │ 36.7 kB │ 1.77 MB │
└───────────┴─────────┴─────────┴─────────┴────────┴─────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 5 │
├────────────┼──────────────┤
│ 0.01 │ 8 │
├────────────┼──────────────┤
│ 0.1 │ 16 │
├────────────┼──────────────┤
│ 1 │ 27 │
├────────────┼──────────────┤
│ 2.5 │ 28 │
├────────────┼──────────────┤
│ 10 │ 29 │
├────────────┼──────────────┤
│ 25 │ 30 │
├────────────┼──────────────┤
│ 50 │ 31 │
├────────────┼──────────────┤
│ 75 │ 33 │
├────────────┼──────────────┤
│ 90 │ 34 │
├────────────┼──────────────┤
│ 97.5 │ 36 │
├────────────┼──────────────┤
│ 99 │ 37 │
├────────────┼──────────────┤
│ 99.9 │ 41 │
├────────────┼──────────────┤
│ 99.99 │ 51 │
├────────────┼──────────────┤
│ 99.999 │ 55 │
└────────────┴──────────────┘
47k requests in 15.03s, 27.7 MB read
2 rounds of 15 s 1 : 4,099 · 2 : 4,112 req/s · spread 0.3 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.4 vCPU, 98 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.4 vCPU · sandboxes 0.0 vCPU, 179 MB · whole server busy 100 %, of which kernel (network, disk) 34 % · memory used 765 MB of 961 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers_public/get-by-id/2"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers_public/get-by-id/2
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 21 ms │ 24 ms │ 29 ms │ 31 ms │ 23.9 ms │ 1.89 ms │ 47 ms │
└─────────┴───────┴───────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 3,945 │ 3,945 │ 4,119 │ 4,203 │ 4,098.54 │ 62.76 │ 3,945 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 2.21 MB │ 2.21 MB │ 2.31 MB │ 2.36 MB │ 2.3 MB │ 35.2 kB │ 2.21 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 16 │
├────────────┼──────────────┤
│ 0.01 │ 17 │
├────────────┼──────────────┤
│ 0.1 │ 20 │
├────────────┼──────────────┤
│ 1 │ 21 │
├────────────┼──────────────┤
│ 2.5 │ 21 │
├────────────┼──────────────┤
│ 10 │ 22 │
├────────────┼──────────────┤
│ 25 │ 23 │
├────────────┼──────────────┤
│ 50 │ 24 │
├────────────┼──────────────┤
│ 75 │ 25 │
├────────────┼──────────────┤
│ 90 │ 26 │
├────────────┼──────────────┤
│ 97.5 │ 29 │
├────────────┼──────────────┤
│ 99 │ 31 │
├────────────┼──────────────┤
│ 99.9 │ 37 │
├────────────┼──────────────┤
│ 99.99 │ 44 │
├────────────┼──────────────┤
│ 99.999 │ 47 │
└────────────┴──────────────┘
62k requests in 15.03s, 34.5 MB read
2 rounds of 15 s 1 : 5,132 · 2 : 5,048 req/s · spread 1.6 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.5 vCPU, 73 MB RSS (+ 28 MB in swap) · MongoDB 0.0 vCPU · MySQL 0.3 vCPU · sandboxes 0.0 vCPU, 155 MB · whole server busy 100 %, of which kernel (network, disk) 39 % · memory used 740 MB of 961 MB · steal 0 % · swap 2 pages moved
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers_public/get-by-id/2"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers_public/get-by-id/2
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 17 ms │ 19 ms │ 23 ms │ 25 ms │ 18.99 ms │ 1.79 ms │ 56 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 4,915 │ 4,915 │ 5,199 │ 5,339 │ 5,131.61 │ 143.87 │ 4,912 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 2.76 MB │ 2.76 MB │ 2.92 MB │ 2.99 MB │ 2.88 MB │ 80.6 kB │ 2.76 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 3 │
├────────────┼──────────────┤
│ 0.01 │ 7 │
├────────────┼──────────────┤
│ 0.1 │ 14 │
├────────────┼──────────────┤
│ 1 │ 16 │
├────────────┼──────────────┤
│ 2.5 │ 17 │
├────────────┼──────────────┤
│ 10 │ 17 │
├────────────┼──────────────┤
│ 25 │ 18 │
├────────────┼──────────────┤
│ 50 │ 19 │
├────────────┼──────────────┤
│ 75 │ 20 │
├────────────┼──────────────┤
│ 90 │ 21 │
├────────────┼──────────────┤
│ 97.5 │ 23 │
├────────────┼──────────────┤
│ 99 │ 25 │
├────────────┼──────────────┤
│ 99.9 │ 32 │
├────────────┼──────────────┤
│ 99.99 │ 54 │
├────────────┼──────────────┤
│ 99.999 │ 56 │
└────────────┴──────────────┘
77k requests in 15.04s, 43.2 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 : 3,062 · 2 : 3,025 req/s · spread 1.2 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.5 vCPU, 101 MB RSS (+ 1 MB in swap) · MongoDB 0.4 vCPU · sandboxes 0.0 vCPU, 112 MB · whole server busy 100 %, of which kernel (network, disk) 29 % · memory used 747 MB of 962 MB · steal 0 % · swap 13 pages moved
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers/get-by-id/60ae2488c37cd955cc144161"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers/get-by-id/60ae2488c37cd955cc144161
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 20 ms │ 33 ms │ 41 ms │ 44 ms │ 32.15 ms │ 5.58 ms │ 64 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 2,955 │ 2,955 │ 3,033 │ 3,169 │ 3,061.94 │ 63.98 │ 2,955 │
├───────────┼─────────┼─────────┼────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 1.76 MB │ 1.76 MB │ 1.8 MB │ 1.88 MB │ 1.82 MB │ 38.1 kB │ 1.76 MB │
└───────────┴─────────┴─────────┴────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 4 │
├────────────┼──────────────┤
│ 0.1 │ 10 │
├────────────┼──────────────┤
│ 1 │ 15 │
├────────────┼──────────────┤
│ 2.5 │ 20 │
├────────────┼──────────────┤
│ 10 │ 24 │
├────────────┼──────────────┤
│ 25 │ 30 │
├────────────┼──────────────┤
│ 50 │ 33 │
├────────────┼──────────────┤
│ 75 │ 35 │
├────────────┼──────────────┤
│ 90 │ 38 │
├────────────┼──────────────┤
│ 97.5 │ 41 │
├────────────┼──────────────┤
│ 99 │ 44 │
├────────────┼──────────────┤
│ 99.9 │ 53 │
├────────────┼──────────────┤
│ 99.99 │ 62 │
├────────────┼──────────────┤
│ 99.999 │ 64 │
└────────────┴──────────────┘
46k requests in 15.04s, 27.3 MB read
2 rounds of 15 s 1 : 3,871 · 2 : 3,902 req/s · spread 0.8 % · the output below is round 2, the closer to the average
Server during this run API Maker 0.4 vCPU, 100 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.4 vCPU · sandboxes 0.0 vCPU, 131 MB · whole server busy 100 %, of which kernel (network, disk) 33 % · memory used 728 MB of 961 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers/get-by-id/2"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers/get-by-id/2
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 23 ms │ 25 ms │ 30 ms │ 32 ms │ 25.13 ms │ 1.91 ms │ 54 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Req/Sec │ 3,761 │ 3,761 │ 3,895 │ 4,001 │ 3,901.8 │ 65.19 │ 3,760 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 2.11 MB │ 2.11 MB │ 2.19 MB │ 2.24 MB │ 2.19 MB │ 36.7 kB │ 2.11 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 12 │
├────────────┼──────────────┤
│ 0.01 │ 15 │
├────────────┼──────────────┤
│ 0.1 │ 21 │
├────────────┼──────────────┤
│ 1 │ 22 │
├────────────┼──────────────┤
│ 2.5 │ 23 │
├────────────┼──────────────┤
│ 10 │ 23 │
├────────────┼──────────────┤
│ 25 │ 24 │
├────────────┼──────────────┤
│ 50 │ 25 │
├────────────┼──────────────┤
│ 75 │ 26 │
├────────────┼──────────────┤
│ 90 │ 27 │
├────────────┼──────────────┤
│ 97.5 │ 30 │
├────────────┼──────────────┤
│ 99 │ 32 │
├────────────┼──────────────┤
│ 99.9 │ 39 │
├────────────┼──────────────┤
│ 99.99 │ 53 │
├────────────┼──────────────┤
│ 99.999 │ 54 │
└────────────┴──────────────┘
59k requests in 15.03s, 32.8 MB read
2 rounds of 15 s 1 : 4,525 · 2 : 4,527 req/s · spread 0 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.5 vCPU, 74 MB RSS (+ 28 MB in swap) · MongoDB 0.0 vCPU · MySQL 0.3 vCPU · sandboxes 0.0 vCPU, 155 MB · whole server busy 100 %, of which kernel (network, disk) 36 % · memory used 740 MB of 961 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers/get-by-id/2"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers/get-by-id/2
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 19 ms │ 21 ms │ 26 ms │ 28 ms │ 21.59 ms │ 1.85 ms │ 56 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Req/Sec │ 4,255 │ 4,255 │ 4,563 │ 4,619 │ 4,525.2 │ 93.83 │ 4,254 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 2.39 MB │ 2.39 MB │ 2.56 MB │ 2.59 MB │ 2.54 MB │ 52.4 kB │ 2.39 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 10 │
├────────────┼──────────────┤
│ 0.01 │ 11 │
├────────────┼──────────────┤
│ 0.1 │ 18 │
├────────────┼──────────────┤
│ 1 │ 19 │
├────────────┼──────────────┤
│ 2.5 │ 19 │
├────────────┼──────────────┤
│ 10 │ 20 │
├────────────┼──────────────┤
│ 25 │ 21 │
├────────────┼──────────────┤
│ 50 │ 21 │
├────────────┼──────────────┤
│ 75 │ 22 │
├────────────┼──────────────┤
│ 90 │ 23 │
├────────────┼──────────────┤
│ 97.5 │ 26 │
├────────────┼──────────────┤
│ 99 │ 28 │
├────────────┼──────────────┤
│ 99.9 │ 36 │
├────────────┼──────────────┤
│ 99.99 │ 54 │
├────────────┼──────────────┤
│ 99.999 │ 56 │
└────────────┴──────────────┘
68k requests in 15.03s, 38.1 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 : 11,918 · 2 : 12,361 req/s · spread 3.6 % · the output below is round 2, the closer to the average
Server during this run API Maker 0.7 vCPU, 99 MB RSS (+ 1 MB in swap) · MongoDB 0.0 vCPU · sandboxes 0.0 vCPU, 112 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 43 % · memory used 711 MB of 962 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers_public_cached/get-by-id/60ae2488c37cd955cc144161"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers_public_cached/get-by-id/60ae2488c37cd955cc144161
100 connections
4 workers
┌─────────┬──────┬──────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 5 ms │ 7 ms │ 11 ms │ 12 ms │ 7.59 ms │ 1.67 ms │ 44 ms │
└─────────┴──────┴──────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 11,623 │ 11,623 │ 12,479 │ 12,727 │ 12,360.8 │ 288.56 │ 11,617 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 6.93 MB │ 6.93 MB │ 7.44 MB │ 7.59 MB │ 7.37 MB │ 172 kB │ 6.92 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 2 │
├────────────┼──────────────┤
│ 1 │ 4 │
├────────────┼──────────────┤
│ 2.5 │ 5 │
├────────────┼──────────────┤
│ 10 │ 6 │
├────────────┼──────────────┤
│ 25 │ 7 │
├────────────┼──────────────┤
│ 50 │ 7 │
├────────────┼──────────────┤
│ 75 │ 8 │
├────────────┼──────────────┤
│ 90 │ 9 │
├────────────┼──────────────┤
│ 97.5 │ 11 │
├────────────┼──────────────┤
│ 99 │ 12 │
├────────────┼──────────────┤
│ 99.9 │ 17 │
├────────────┼──────────────┤
│ 99.99 │ 38 │
├────────────┼──────────────┤
│ 99.999 │ 44 │
└────────────┴──────────────┘
186k requests in 15.03s, 111 MB read
2 rounds of 15 s 1 : 12,159 · 2 : 12,008 req/s · spread 1.2 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.7 vCPU, 99 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.0 vCPU · sandboxes 0.0 vCPU, 132 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 44 % · memory used 712 MB of 962 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers_public_cached/get-by-id/2"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers_public_cached/get-by-id/2
100 connections
4 workers
┌─────────┬──────┬──────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 5 ms │ 8 ms │ 11 ms │ 12 ms │ 7.73 ms │ 1.76 ms │ 57 ms │
└─────────┴──────┴──────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬───────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼───────────┼────────┼─────────┤
│ Req/Sec │ 11,215 │ 11,215 │ 12,303 │ 12,687 │ 12,158.67 │ 460.72 │ 11,214 │
├───────────┼─────────┼─────────┼─────────┼─────────┼───────────┼────────┼─────────┤
│ Bytes/Sec │ 6.32 MB │ 6.32 MB │ 6.93 MB │ 7.14 MB │ 6.84 MB │ 259 kB │ 6.31 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴───────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 3 │
├────────────┼──────────────┤
│ 1 │ 4 │
├────────────┼──────────────┤
│ 2.5 │ 5 │
├────────────┼──────────────┤
│ 10 │ 6 │
├────────────┼──────────────┤
│ 25 │ 7 │
├────────────┼──────────────┤
│ 50 │ 8 │
├────────────┼──────────────┤
│ 75 │ 9 │
├────────────┼──────────────┤
│ 90 │ 10 │
├────────────┼──────────────┤
│ 97.5 │ 11 │
├────────────┼──────────────┤
│ 99 │ 12 │
├────────────┼──────────────┤
│ 99.9 │ 19 │
├────────────┼──────────────┤
│ 99.99 │ 50 │
├────────────┼──────────────┤
│ 99.999 │ 56 │
└────────────┴──────────────┘
182k requests in 15.03s, 103 MB read
2 rounds of 15 s 1 : 12,226 · 2 : 12,159 req/s · spread 0.6 % · the output below is round 2, the closer to the average
Server during this run API Maker 0.7 vCPU, 50 MB RSS (+ 48 MB in swap) · MongoDB 0.0 vCPU · MySQL 0.0 vCPU · sandboxes 0.0 vCPU, 160 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 45 % · memory used 684 MB of 961 MB · steal 0 % · swap 7 pages moved
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers_public_cached/get-by-id/2"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers_public_cached/get-by-id/2
100 connections
4 workers
┌─────────┬──────┬──────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 5 ms │ 8 ms │ 11 ms │ 12 ms │ 7.73 ms │ 1.67 ms │ 42 ms │
└─────────┴──────┴──────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬───────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼───────────┼────────┼─────────┤
│ Req/Sec │ 11,583 │ 11,583 │ 12,103 │ 12,735 │ 12,158.67 │ 290.21 │ 11,577 │
├───────────┼─────────┼─────────┼─────────┼─────────┼───────────┼────────┼─────────┤
│ Bytes/Sec │ 6.52 MB │ 6.52 MB │ 6.82 MB │ 7.17 MB │ 6.85 MB │ 164 kB │ 6.52 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴───────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ 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 │ 10 │
├────────────┼──────────────┤
│ 97.5 │ 11 │
├────────────┼──────────────┤
│ 99 │ 12 │
├────────────┼──────────────┤
│ 99.9 │ 16 │
├────────────┼──────────────┤
│ 99.99 │ 40 │
├────────────┼──────────────┤
│ 99.999 │ 42 │
└────────────┴──────────────┘
182k requests in 15.03s, 103 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 : 9,405 · 2 : 9,557 req/s · spread 1.6 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.8 vCPU, 99 MB RSS (+ 1 MB in swap) · MongoDB 0.0 vCPU · sandboxes 0.0 vCPU, 112 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 37 % · memory used 718 MB of 962 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers_cached/get-by-id/60ae2488c37cd955cc144161"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/customers_cached/get-by-id/60ae2488c37cd955cc144161
100 connections
4 workers
┌─────────┬──────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 7 ms │ 10 ms │ 14 ms │ 16 ms │ 10.13 ms │ 2.13 ms │ 42 ms │
└─────────┴──────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 9,095 │ 9,095 │ 9,423 │ 9,695 │ 9,405.07 │ 193.62 │ 9,094 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 5.42 MB │ 5.42 MB │ 5.62 MB │ 5.78 MB │ 5.61 MB │ 115 kB │ 5.42 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 4 │
├────────────┼──────────────┤
│ 1 │ 6 │
├────────────┼──────────────┤
│ 2.5 │ 7 │
├────────────┼──────────────┤
│ 10 │ 8 │
├────────────┼──────────────┤
│ 25 │ 9 │
├────────────┼──────────────┤
│ 50 │ 10 │
├────────────┼──────────────┤
│ 75 │ 11 │
├────────────┼──────────────┤
│ 90 │ 13 │
├────────────┼──────────────┤
│ 97.5 │ 14 │
├────────────┼──────────────┤
│ 99 │ 16 │
├────────────┼──────────────┤
│ 99.9 │ 21 │
├────────────┼──────────────┤
│ 99.99 │ 38 │
├────────────┼──────────────┤
│ 99.999 │ 41 │
└────────────┴──────────────┘
141k requests in 15.04s, 84.1 MB read
2 rounds of 15 s 1 : 9,424 · 2 : 9,380 req/s · spread 0.5 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.8 vCPU, 99 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.0 vCPU · sandboxes 0.0 vCPU, 132 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 37 % · memory used 713 MB of 961 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers_cached/get-by-id/2"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.customers_cached/get-by-id/2
100 connections
4 workers
┌─────────┬──────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 7 ms │ 10 ms │ 14 ms │ 16 ms │ 10.12 ms │ 2.11 ms │ 46 ms │
└─────────┴──────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 8,863 │ 8,863 │ 9,495 │ 9,703 │ 9,423.74 │ 228.98 │ 8,860 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 4.99 MB │ 4.99 MB │ 5.35 MB │ 5.46 MB │ 5.31 MB │ 129 kB │ 4.99 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 2 │
├────────────┼──────────────┤
│ 0.1 │ 4 │
├────────────┼──────────────┤
│ 1 │ 6 │
├────────────┼──────────────┤
│ 2.5 │ 7 │
├────────────┼──────────────┤
│ 10 │ 8 │
├────────────┼──────────────┤
│ 25 │ 9 │
├────────────┼──────────────┤
│ 50 │ 10 │
├────────────┼──────────────┤
│ 75 │ 11 │
├────────────┼──────────────┤
│ 90 │ 13 │
├────────────┼──────────────┤
│ 97.5 │ 14 │
├────────────┼──────────────┤
│ 99 │ 16 │
├────────────┼──────────────┤
│ 99.9 │ 23 │
├────────────┼──────────────┤
│ 99.99 │ 40 │
├────────────┼──────────────┤
│ 99.999 │ 43 │
└────────────┴──────────────┘
141k requests in 15.04s, 79.6 MB read
2 rounds of 15 s 1 : 9,254 · 2 : 9,181 req/s · spread 0.8 % · the output below is round 2, the closer to the average
Server during this run API Maker 0.8 vCPU, 50 MB RSS (+ 48 MB in swap) · MongoDB 0.0 vCPU · MySQL 0.0 vCPU · sandboxes 0.0 vCPU, 151 MB · Redis 0.1 vCPU · whole server busy 100 %, of which kernel (network, disk) 38 % · memory used 687 MB of 961 MB · steal 0 % · swap 1 pages moved
$ autocannon -c 100 -d 15 -w 4 -l -H "x-am-authorization: <token>" -H "x-am-user-authorization: <token>" "http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers_cached/get-by-id/2"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/customers_cached/get-by-id/2
100 connections
4 workers
┌─────────┬──────┬───────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼───────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 7 ms │ 10 ms │ 15 ms │ 16 ms │ 10.4 ms │ 2.16 ms │ 45 ms │
└─────────┴──────┴───────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬───────┬───────┬─────────┬─────────┬──────────┬─────────┬───────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼───────┼───────┼─────────┼─────────┼──────────┼─────────┼───────┤
│ Req/Sec │ 8,887 │ 8,887 │ 9,167 │ 9,447 │ 9,180.54 │ 173.55 │ 8,883 │
├───────────┼───────┼───────┼─────────┼─────────┼──────────┼─────────┼───────┤
│ Bytes/Sec │ 5 MB │ 5 MB │ 5.16 MB │ 5.32 MB │ 5.17 MB │ 98.3 kB │ 5 MB │
└───────────┴───────┴───────┴─────────┴─────────┴──────────┴─────────┴───────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 2 │
├────────────┼──────────────┤
│ 0.1 │ 4 │
├────────────┼──────────────┤
│ 1 │ 6 │
├────────────┼──────────────┤
│ 2.5 │ 7 │
├────────────┼──────────────┤
│ 10 │ 8 │
├────────────┼──────────────┤
│ 25 │ 9 │
├────────────┼──────────────┤
│ 50 │ 10 │
├────────────┼──────────────┤
│ 75 │ 12 │
├────────────┼──────────────┤
│ 90 │ 13 │
├────────────┼──────────────┤
│ 97.5 │ 15 │
├────────────┼──────────────┤
│ 99 │ 16 │
├────────────┼──────────────┤
│ 99.9 │ 23 │
├────────────┼──────────────┤
│ 99.99 │ 43 │
├────────────┼──────────────┤
│ 99.999 │ 45 │
└────────────┴──────────────┘
138k requests in 15.03s, 77.5 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,190 · 2 : 1,122 req/s · spread 5.9 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.3 vCPU, 102 MB RSS (+ 1 MB in swap) · MongoDB 0.5 vCPU · sandboxes 0.0 vCPU, 110 MB · whole server busy 100 %, of which kernel (network, disk) 30 % · memory used 705 MB of 961 MB · steal 0 % · swap 232 pages moved
$ autocannon -c 100 -d 15 -w 4 -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.140.110:38246/api/schema/bench/mongodb/am_bench/inserts_public/save-single-or-multiple"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mongodb/am_bench/inserts_public/save-single-or-multiple
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬────────┬──────────┬─────────┬────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼────────┼──────────┼─────────┼────────┤
│ Latency │ 70 ms │ 83 ms │ 96 ms │ 110 ms │ 83.33 ms │ 9.67 ms │ 271 ms │
└─────────┴───────┴───────┴───────┴────────┴──────────┴─────────┴────────┘
┌───────────┬────────┬────────┬────────┬────────┬─────────┬─────────┬────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼────────┼────────┼────────┼────────┼─────────┼─────────┼────────┤
│ Req/Sec │ 1,120 │ 1,120 │ 1,201 │ 1,236 │ 1,189.8 │ 32.83 │ 1,120 │
├───────────┼────────┼────────┼────────┼────────┼─────────┼─────────┼────────┤
│ Bytes/Sec │ 670 kB │ 670 kB │ 718 kB │ 739 kB │ 712 kB │ 19.6 kB │ 670 kB │
└───────────┴────────┴────────┴────────┴────────┴─────────┴─────────┴────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 40 │
├────────────┼──────────────┤
│ 0.01 │ 41 │
├────────────┼──────────────┤
│ 0.1 │ 47 │
├────────────┼──────────────┤
│ 1 │ 64 │
├────────────┼──────────────┤
│ 2.5 │ 70 │
├────────────┼──────────────┤
│ 10 │ 77 │
├────────────┼──────────────┤
│ 25 │ 80 │
├────────────┼──────────────┤
│ 50 │ 83 │
├────────────┼──────────────┤
│ 75 │ 86 │
├────────────┼──────────────┤
│ 90 │ 89 │
├────────────┼──────────────┤
│ 97.5 │ 96 │
├────────────┼──────────────┤
│ 99 │ 110 │
├────────────┼──────────────┤
│ 99.9 │ 218 │
├────────────┼──────────────┤
│ 99.99 │ 267 │
├────────────┼──────────────┤
│ 99.999 │ 271 │
└────────────┴──────────────┘
18k requests in 15.03s, 10.7 MB read
2 rounds of 15 s 1 : 1,828 · 2 : 1,808 req/s · spread 1.1 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.4 vCPU, 100 MB RSS · MongoDB 0.0 vCPU · PostgreSQL 0.5 vCPU · sandboxes 0.0 vCPU, 130 MB · whole server busy 100 %, of which kernel (network, disk) 35 % · memory used 715 MB of 962 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -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.140.110:38246/api/schema/bench/postgres/am_bench/public.inserts_public/save-single-or-multiple"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/postgres/am_bench/public.inserts_public/save-single-or-multiple
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 50 ms │ 54 ms │ 61 ms │ 64 ms │ 54.14 ms │ 2.92 ms │ 81 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬────────┬────────┬─────────┬─────────┬──────────┬─────────┬────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼────────┼────────┼─────────┼─────────┼──────────┼─────────┼────────┤
│ Req/Sec │ 1,735 │ 1,735 │ 1,831 │ 1,869 │ 1,827.74 │ 31.45 │ 1,735 │
├───────────┼────────┼────────┼─────────┼─────────┼──────────┼─────────┼────────┤
│ Bytes/Sec │ 987 kB │ 987 kB │ 1.04 MB │ 1.06 MB │ 1.04 MB │ 18.1 kB │ 987 kB │
└───────────┴────────┴────────┴─────────┴─────────┴──────────┴─────────┴────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 33 │
├────────────┼──────────────┤
│ 0.01 │ 37 │
├────────────┼──────────────┤
│ 0.1 │ 48 │
├────────────┼──────────────┤
│ 1 │ 49 │
├────────────┼──────────────┤
│ 2.5 │ 50 │
├────────────┼──────────────┤
│ 10 │ 51 │
├────────────┼──────────────┤
│ 25 │ 52 │
├────────────┼──────────────┤
│ 50 │ 54 │
├────────────┼──────────────┤
│ 75 │ 55 │
├────────────┼──────────────┤
│ 90 │ 57 │
├────────────┼──────────────┤
│ 97.5 │ 61 │
├────────────┼──────────────┤
│ 99 │ 64 │
├────────────┼──────────────┤
│ 99.9 │ 74 │
├────────────┼──────────────┤
│ 99.99 │ 79 │
├────────────┼──────────────┤
│ 99.999 │ 81 │
└────────────┴──────────────┘
28k requests in 15.03s, 15.6 MB read
2 rounds of 15 s 1 : 1,640 · 2 : 1,663 req/s · spread 1.4 % · the output below is round 2, the closer to the average
Server during this run API Maker 0.4 vCPU, 52 MB RSS (+ 48 MB in swap) · MongoDB 0.0 vCPU · MySQL 0.4 vCPU · sandboxes 0.0 vCPU, 150 MB · whole server busy 100 %, of which kernel (network, disk) 44 % · memory used 686 MB of 961 MB · steal 0 % · swap 3725 pages moved
$ autocannon -c 100 -d 15 -w 4 -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.140.110:38246/api/schema/bench/mysql/am_bench/inserts_public/save-single-or-multiple"
Running 15s test @ http://192.168.140.110:38246/api/schema/bench/mysql/am_bench/inserts_public/save-single-or-multiple
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 54 ms │ 59 ms │ 67 ms │ 71 ms │ 59.56 ms │ 3.52 ms │ 86 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬────────┬────────┬────────┬────────┬──────────┬─────────┬────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼────────┼────────┼────────┼────────┼──────────┼─────────┼────────┤
│ Req/Sec │ 1,627 │ 1,627 │ 1,657 │ 1,704 │ 1,662.74 │ 25.87 │ 1,627 │
├───────────┼────────┼────────┼────────┼────────┼──────────┼─────────┼────────┤
│ Bytes/Sec │ 926 kB │ 926 kB │ 943 kB │ 970 kB │ 946 kB │ 14.6 kB │ 926 kB │
└───────────┴────────┴────────┴────────┴────────┴──────────┴─────────┴────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 40 │
├────────────┼──────────────┤
│ 0.01 │ 42 │
├────────────┼──────────────┤
│ 0.1 │ 45 │
├────────────┼──────────────┤
│ 1 │ 54 │
├────────────┼──────────────┤
│ 2.5 │ 54 │
├────────────┼──────────────┤
│ 10 │ 56 │
├────────────┼──────────────┤
│ 25 │ 57 │
├────────────┼──────────────┤
│ 50 │ 59 │
├────────────┼──────────────┤
│ 75 │ 61 │
├────────────┼──────────────┤
│ 90 │ 64 │
├────────────┼──────────────┤
│ 97.5 │ 67 │
├────────────┼──────────────┤
│ 99 │ 71 │
├────────────┼──────────────┤
│ 99.9 │ 82 │
├────────────┼──────────────┤
│ 99.99 │ 86 │
├────────────┼──────────────┤
│ 99.999 │ 86 │
└────────────┴──────────────┘
25k requests in 15.04s, 14.2 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 : 8,063 · 2 : 8,129 req/s · spread 0.8 % · the output below is round 1, the closer to the average
Server during this run API Maker 1.0 vCPU, 93 MB RSS · MongoDB 0.0 vCPU · sandboxes 0.0 vCPU, 162 MB · whole server busy 100 %, of which kernel (network, disk) 25 % · memory used 704 MB of 962 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/custom-api/bench/bench_no_db"
Running 15s test @ http://192.168.140.110:38246/api/custom-api/bench/bench_no_db
100 connections
4 workers
┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 11 ms │ 12 ms │ 15 ms │ 18 ms │ 11.96 ms │ 1.99 ms │ 70 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 7,755 │ 7,755 │ 8,087 │ 8,171 │ 8,062.54 │ 99.26 │ 7,755 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 3.09 MB │ 3.09 MB │ 3.23 MB │ 3.26 MB │ 3.22 MB │ 39.4 kB │ 3.09 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 0 │
├────────────┼──────────────┤
│ 0.1 │ 0 │
├────────────┼──────────────┤
│ 1 │ 0 │
├────────────┼──────────────┤
│ 2.5 │ 11 │
├────────────┼──────────────┤
│ 10 │ 12 │
├────────────┼──────────────┤
│ 25 │ 12 │
├────────────┼──────────────┤
│ 50 │ 12 │
├────────────┼──────────────┤
│ 75 │ 12 │
├────────────┼──────────────┤
│ 90 │ 12 │
├────────────┼──────────────┤
│ 97.5 │ 15 │
├────────────┼──────────────┤
│ 99 │ 18 │
├────────────┼──────────────┤
│ 99.9 │ 24 │
├────────────┼──────────────┤
│ 99.99 │ 47 │
├────────────┼──────────────┤
│ 99.999 │ 56 │
└────────────┴──────────────┘
121k requests in 15.04s, 48.2 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,045 · 2 : 9,470 req/s · spread 4.6 % · the output below is round 1, the closer to the average
Server during this run API Maker 0.7 vCPU, 96 MB RSS · MongoDB 0.0 vCPU · sandboxes 0.3 vCPU, 163 MB · whole server busy 100 %, of which kernel (network, disk) 26 % · memory used 714 MB of 962 MB · steal 0 % · swap not touched
$ autocannon -c 100 -d 15 -w 4 -l "http://192.168.140.110:38246/api/custom-api/bench/bench_sandbox_no_db"
Running 15s test @ http://192.168.140.110:38246/api/custom-api/bench/bench_sandbox_no_db
100 connections
4 workers
┌─────────┬──────┬───────┬───────┬───────┬──────────┬────────┬───────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼───────┼───────┼───────┼──────────┼────────┼───────┤
│ Latency │ 6 ms │ 11 ms │ 15 ms │ 17 ms │ 10.56 ms │ 2.4 ms │ 54 ms │
└─────────┴──────┴───────┴───────┴───────┴──────────┴────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec │ 8,615 │ 8,615 │ 9,087 │ 9,751 │ 9,045.07 │ 266.15 │ 8,608 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 3.56 MB │ 3.56 MB │ 3.75 MB │ 4.03 MB │ 3.74 MB │ 110 kB │ 3.56 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
# of samples: 60
┌────────────┬──────────────┐
│ Percentile │ Latency (ms) │
├────────────┼──────────────┤
│ 0.001 │ 0 │
├────────────┼──────────────┤
│ 0.01 │ 1 │
├────────────┼──────────────┤
│ 0.1 │ 3 │
├────────────┼──────────────┤
│ 1 │ 5 │
├────────────┼──────────────┤
│ 2.5 │ 6 │
├────────────┼──────────────┤
│ 10 │ 8 │
├────────────┼──────────────┤
│ 25 │ 9 │
├────────────┼──────────────┤
│ 50 │ 11 │
├────────────┼──────────────┤
│ 75 │ 12 │
├────────────┼──────────────┤
│ 90 │ 13 │
├────────────┼──────────────┤
│ 97.5 │ 15 │
├────────────┼──────────────┤
│ 99 │ 17 │
├────────────┼──────────────┤
│ 99.9 │ 25 │
├────────────┼──────────────┤
│ 99.99 │ 48 │
├────────────┼──────────────┤
│ 99.999 │ 54 │
└────────────┴──────────────┘
136k requests in 15.04s, 56 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 | 2,634 | 3 ms | 7 ms | 14 ms | 0 | 100 % | 91 MB |
| 50 | 2,566 | 19 ms | 24 ms | 33 ms | 0 | 100 % | 93 MB |
| 100 | 2,510 | 39 ms | 45 ms | 70 ms | 0 | 100 % | 96 MB |
| 250 | 2,549 | 97 ms | 108 ms | 398 ms | 0 | 100 % | 107 MB |
| 500 | 2,373 | 208 ms | 226 ms | 458 ms | 0 | 100 % | 117 MB |
| 1,000 | 2,395 | 413 ms | 441 ms | 616 ms | 0 | 100 % | 146 MB |
Get by id with caching, public, by connections¶
| Connections | Requests / second | p50 | p99 | Max | Errors | Server busy | API Maker RSS |
|---|---|---|---|---|---|---|---|
| 10 | 8,594 | 1 ms | 2 ms | 9 ms | 0 | 99 % | 88 MB |
| 50 | 11,240 | 4 ms | 7 ms | 20 ms | 0 | 100 % | 83 MB |
| 100 | 12,096 | 8 ms | 12 ms | 76 ms | 0 | 100 % | 85 MB |
| 250 | 15,248 | 16 ms | 23 ms | 62 ms | 0 | 100 % | 91 MB |
| 500 | 13,336 | 34 ms | 51 ms | 165 ms | 0 | 100 % | 103 MB |
| 1,000 | 11,399 | 86 ms | 105 ms | 221 ms | 0 | 100 % | 126 MB |
Questions¶
How many requests per second can API Maker serve on 1 shared vCPU ?¶
On this 1 GB server, with the database on the same machine : 2,435 requests per second for a whole table of ten rows on MongoDB (PostgreSQL 3,787 · MySQL 4,623), 3,100 for one row by its id, and 12,140 when the answer is cached in Redis. A custom API in TypeScript which reads the table answers 1,909 requests per second when API Maker runs it itself (lean code), 1,389 when it runs in the sandbox of the account.
How much memory does API Maker use ?¶
The API Maker process held 84 MB at rest and 111 MB at most under load on this server, in RAM. With the server short of memory, Linux moved up to 50 MB more of it to swap : memory API Maker holds but does not touch while it serves requests. 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 2,439 requests per second on MongoDB (public : 2,435), 3,560 requests per second on PostgreSQL (public : 3,787), 4,126 requests per second on MySQL (public : 4,623). The checks show most where the database does no work : a cached get all answered 8,709 requests per second with both tokens against 11,054 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 1,984 requests per second on MongoDB, against 2,439 for the same API without the hook. On 1 vCPU, the API, the hook and the database share the same core.
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.