Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jtplouffe/rest-api-benchmarks
Benchmarks of the same REST api written using different languages / orms
https://github.com/jtplouffe/rest-api-benchmarks
benchmark rest-api
Last synced: about 1 month ago
JSON representation
Benchmarks of the same REST api written using different languages / orms
- Host: GitHub
- URL: https://github.com/jtplouffe/rest-api-benchmarks
- Owner: Jtplouffe
- License: agpl-3.0
- Created: 2023-11-01T21:28:03.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-18T15:31:58.000Z (about 1 year ago)
- Last Synced: 2024-10-19T03:04:15.319Z (3 months ago)
- Topics: benchmark, rest-api
- Language: Rust
- Homepage:
- Size: 178 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rest-api-benchmarks
This repository contains a basic implementation (described below) of a REST api using different stacks.
The goal is to mesearue the performance difference. They are no crazy optimization tricks being used, just plain old
api code.## REST api
The api contains a single route, `GET /user`.
This route may take a `include` query param, with possible values being `contacts` and `notes`. The query param can be
an array, meaning that we may include both contacts and notes.As for the database, 3 table exists. `users`, `user_contacts`, and `user_notes`.
When querying the route, all users are returned.
## Benchmark
For the benchmark, every implementation is allocated the same resource, being 1 cpu and 128M memory. This limit is
applied via docker.When runnig the benchmarks, the database is running on the same machine as the api being benchmarked.
The benchmarks are run with [plow](https://github.com/six-ddc/plow), during 60 seconds with 10 connections.
The results should be taken with a grain of salt, as this benchmark is pretty heavy on the ORM, but
it still gives a good idea of the performance of the language / ORM.### Environment
The benchmarks are run one at a time, with the same data.
They are limited to 1 cpu (Ryzen 7 7700X) and 128M memory.## Implementations
- [nodejs-nestjs-sequelize](./nodejs-nestjs-sequelize/)
- [go-fiber-bun](./go-fiber-bun/)
- [rust-axum-prisma](./rust-axum-prisma/)
- [elixir-phoenix-ecto](./elixir_phoenix_ecto/)
- [dart-alfred-drift](./dart-alfred-drift/)