Skip to content

panga/rinhabackend-vertx

Repository files navigation

Rinha de Backend 2023 Q3 - Java + Vert.x

This application was built as a solution for Rinha de Backend 2023 Q3 challenge instructions.

Read my post how to use Java superpowers to beat Rust in a backend challenge.

Solution

  • Default PostgreSQL configuration.
  • Standard Nginx proxy with keep alive enabled.
  • No Redis/or caching.
  • No queue and no SQL batching.
  • Vert.x reactive framework with default settings.
  • Native image build with GraalVM on Java 20.

Run application using downloaded image

docker-compose up

Run application using local build (Java)

./mvn package
docker-compose -f docker-compose-local.yml up --build

Run application using local build (Native)

docker-compose -f docker-compose-native.yml up --build

Run stress test

curl -o gatling.zip https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/3.9.5/gatling-charts-highcharts-bundle-3.9.5-bundle.zip
unzip gatling.zip
mkdir $HOME/gatling
sudo mv gatling-charts-highcharts-bundle-3.9.5-bundle $HOME/gatling/3.9.5

mkdir $HOME/projects
cd $HOME/projects
git clone https://github.com/zanfranceschi/rinha-de-backend-2023-q3.git
cd rinha-de-backend-2023-q3/stress-test
./run-test.sh