lightweight-go-server

command module
v0.0.0-...-752c475 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 4 Imported by: 0

README

genDocsGPT

Lightweight Go Server

A performance comparison to find the lightweight Go server using Echo, Gin and Fiber servers. We will use MongoDB and Postgres as database and Docker compose as container enviorement. We will use some of the rules from Rinha de beckend to get the results.

Run server

You should go to the server folder that you would like to use, set the env var for the choosen database and run the server. Like:

cd echo && DB="mongo" MONGODB_URI="..." go run .

Run with Docker compose

Make sure that you have docker and docker compose installed. Next, you should choose which server and database you would like to run (e.g. docker-compose--.yml) and run the command like this:

docker-compose -f docker-compose-echo-postgres.yml up --remove-orphans

Run benchmark

I am using Gatling to run the benchmark and to install it go to benchmark folder and run the install-gatling script. After that, move the BenchmarkSimulation.scala file to deps/gatling/user-files/simulations and the resources pessoas-payloads.tsv and termos-busca.tsv to deps/gatling/user-files/recources.

Go to the command line and run:

sh deps/gatling/bin/gatling.sh

Last results

Using Postgres:

Echo Echo
Fiber Fiber Gin Gin

Using MongoDB:

Echo Echo
Fiber Fiber
Gin Gin

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
gin

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL