After the benchmark of Go Servers (see code here and the conclusions here), this project is a server benckmark among pure NodeJS, ExpressJS and Fiber (golang) server using MongoDB, Fiber and MongoDB are the winners from Go Servers benchmark. We will use some of the rules from Rinha de beckend to get the results.
npm installnpm run dev:<node|express>npm run start:<node|express>Run mongo:latest image:
docker run -d -p 27017:27017 -p 28017:28017 -e AUTH=no mongo:latestBuild the node or express server image using the correspondent dockerfile then run the image:
docker build -t <node|express>-server -f <node|express>.dockerfile .
docker run --network="host" --rm -p 8080:8080 node-serverMake sure that you have docker and docker compose installed. Next, you should choose which server (node or express) you would like to run (e.g. docker-compose-<server>-mongo.yml) and run the command like this:
docker-compose -f docker-compose-<node|express>-mongo.yml up --remove-orphansI 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

