API written in Go 1.21 + PostgreSQL built for Rinha de Backend - Edição 2023 Q3 😈
🚧 The approaches implemented in this project were exclusively for competition and should not be considered as production-ready. 🚧
$ go mod tidy
Create your .env
file from the .env.example
file (get environment variables from the project owner):
$ cp .env.example .env
So, run the command:
# development
$ go run ./cmd/httpserver
# live reload mode
$ air
💡 To use live reload mode, you need to install air.
You can also run the project with docker compose:
docker compose up -d
You can run the run.sh script which will run Gatling with the same stress test requirements as the competition.
💡 You must store the Gatling bundle in the path: $HOME/gatling/3.9.5/bin
sh run.sh
Below are screenshots of the results obtained with the API. Resource restriction configuration for each application is available in docker-compose.yaml