Skip to content

wnqueiroz/rinha-de-backend-2023-q3-go

Repository files navigation

wnqueiroz/rinha-de-backend-2023-q3-go

API written in Go 1.21 + PostgreSQL built for Rinha de Backend - Edição 2023 Q3 😈

Disclaimer: I didn't have time to submit the PR, this project did not participate in the competition.

🚧 The approaches implemented in this project were exclusively for competition and should not be considered as production-ready. 🚧

Summary

Installation

$ go mod tidy

Up & Running!

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

Stress Test

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

Results obtained

Below are screenshots of the results obtained with the API. Resource restriction configuration for each application is available in docker-compose.yaml

gatling-01 gatling-02 gatling-03 gatling-04

About

API written in Go 1.21 + PostgreSQL built for Rinha de Backend - Edição 2023 Q3 😈

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published