PostgREST/postgrest-benchmark is tracked by TopGit as a data project, with 6 stars on GitHub, written primarily in Nix. Reproducible benchmark for PostgREST
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Reproducible benchmark for PostgREST by using Nix and NixOps.
NixOps provisions AWS EC2 instances on a dedicated VPC and deploys the different components for load testing.
The default setup includes:
A m5a.8xlarge PostgreSQL server instance. Tuned according to PGTune recommendations.
A t3a.nano client instance with PostgREST + Nginx. The size of this EC2 instance, can be modified with environment variables.
PostgREST pool size is tuned according to the EC2 instance size.
A t3a.nano client instance with k6. The size of this EC2 instance, can be modified with environment variables.
All networking is setup so the client instances can reach the server instance.
Requirements
Nix.
AWS account with an ~/.aws/credentials file in place (can be created with aws-cli). The "default" profile is picked up by default but you can change it by doing:
export PGRSTBENCH_AWS_PROFILE="another_profile"
Quickstart
Run nix-shell. This will provide an environment where all the dependencies are available.
$ nix-shell
>
Deploy with:
$ postgrest-bench-deploy
pgrstBenchVpc.....> creating vpc under region us-east-2
..
pg................> activation finished successfully
pgrstbench> deployment finished successfully
# this command will take a couple minutes, it will deploy the client and server AWS machines VPC stuff
Run a k6 test on the client instance and get the output:
The postgresql server comes loaded with the chinook database.
To connect to the PostgREST instance:
$ postgrest-bench-ssh pgrst
# Check the installed services
$ systemctl list-units
# Do a request
$ curl localhost:80/artist
You can also get info (like the IPs) of the instances with:
$ postgrest-bench-info
K6
K6 runs on the client instance, but you can get the output of the load test on your machine:
## k6 will run with 20 VUs on the AWS client instance and load test the t3a.nano instance for 10 seconds with the local k6/GETSingle.js script
$ postgrest-bench-k6 20 10s k6/GETSingle.js
Multiple scripts can be supplied; each script runs sequentially for the specified duration:
There are different scripts on k6/ which test different PostgREST requests.
Pgbench
pgbench also runs on the client instance, you can get its output with:
$ postgrest-bench-pgbench pgbench/GETSingle.sql
The GETSingle.sql runs an equivalent SQL statement to what PostgREST generates for GETSingle.js. The motivation for this comparison is to see how much PostgREST performance differs from direct SQL connections.
Varying Scripts
There are scripts that help with varying the environment while load testing. You can use these to get a report once the command finishes running:
Run k6 with a different number of VUs:
$ postgrest-bench-k6-vary k6/GETSingle.js
Run k6 with varied VUs and with varied ec2 instances for the client and pgrst instances (this will involve reprovisioning/redeploying the client and pgrst instances, it will take a while):
You can use postgrest-bench-pgrst-vs to run a script using the current version vs another version or a binary.
# you can also add additional config to both
export PGRSTBENCH_PGRST_EXTRA_CONFIG='db-pipeline-mode = true'
postgrest-bench-pgrst-vs ./bin/pipeline-pgrst \
postgrest-bench-k6-vary-vus 1m k6/* \
> results/comparison.jsonl
Reports
You can generate reports from a JSONL file, for this use:
postgrest-bench-generate-report share/rts.jsonl
This generates SVG reports for each k6 script run, a summarized markdown comparing each configuration and a markdown with full details of the report.
Limitations
The instances tested for this benchmark are the t3a series and the m5a series.
ARM-based instances haven't been tested.
When the NixOS AMI goes out out of date, you can get these errors:
* client: list index out of range
* pg: list index out of range
* pgrst: list index out of range
To solve this run postgrest-bench-generate-ami
Other benchmarks
majkinetor/postgrest-test: PostgREST benchmark on Windows.
Does PostgREST/postgrest-benchmark have a project website?
No homepage URL was recorded for PostgREST/postgrest-benchmark in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How active is development on PostgREST/postgrest-benchmark?
The most recent commit recorded on PostgREST/postgrest-benchmark was 18 days ago, based on the GitHub push timestamp. The repository has 4 forks — one of the better signals of community interest.
How many stars does PostgREST/postgrest-benchmark have?
PostgREST/postgrest-benchmark has 6 GitHub stars — refresh the page for the live number, or check github.com/PostgREST/postgrest-benchmark. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What language is PostgREST/postgrest-benchmark written in?
PostgREST/postgrest-benchmark is written primarily in Nix. GitHub's language field is based on the largest share of bytes in the default branch.
What license does PostgREST/postgrest-benchmark use?
PostgREST/postgrest-benchmark is released under the MIT license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
What topics is PostgREST/postgrest-benchmark associated with?
GitHub's repository topics for PostgREST/postgrest-benchmark: "benchmark", "nix", "nixops", "postgresql", "postgrest". TopGit's editorial category is Data.
Where do I read more about PostgREST/postgrest-benchmark?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/PostgREST/postgrest-benchmark is the definitive source.
Read full README in the tab above.
Curious whether postgrest-benchmark is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about postgrest-benchmark.