Skip to content

SouenMazouin/framework-benchmarks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Framework Benchmarks

Benchmark of some Java and .NET frameworks

Presentation

This series of benchmarks was originally designed to measure the difference between Spring "traditional" use and its reactive approach.

Following this first series of results, we wanted to measure the results obtained between the HTTP/1 and HTTP/2 protocols on these same frameworks by using the gRPC and Protocol Buffer technologies.

The C# ASP.NET Core framework has also been added to this second approach to add some granularity to our benchmark series.

For Database Access we used PgClient for Spring-Webflux, JDBC for Spring-MVC and Dapper for .NET Core.

The entire project was built on the work of Techempower.

Quick Start

To get started developing you'll need to install docker for the .NET framework and for mount the databases, Java frameworks work with maven.

Clone

git clone https://github.com/SouenMazouin/framework-benchmarks.git

Build & Run Data Bases

  • Mongo Db
docker build -t mongobench -f mongodb.dockerfile .
docker run -p 27017:27017 -it --name mongobench mongobench
  • PostgreSQL
docker build -t postgresbench -f postgres.dockerfile .
docker run -p 5432:5432 -it --name postgresbench postgresbench

Run servers

  • For Spring-MVC & Spring Webflux benchmarks with Maven
mvn clean package spring-boot:run
  • For ASP.Net Core with Docker
docker build -t netcorebench -f Dockerfile . 
docker run -p 6565:6565 -p 5000:80 -it --name netcore netcorebench

Recommended Bench Tools

  • WRK is a modern HTTP benchmarking tool capable of generating significant load when run on a single multi-core CPU. It combines a multithreaded design with scalable event notification systems such as epoll and kqueue.

  • GHZ is a simple gRPC benchmarking and load testing tool inspired by hey and grpcurl.

Basic Usages

wrk -t8 -c512 -d15s http://localhost:8080/queries?queries=20
./ghz --insecure \
  -z 15s --cpus=8 -c 512 \
  --proto path/to/your/webfluxbench.proto \
  --call webfluxbench.WebfluxService.MultiQueries \
  -d '{"number":20}' \
  0.0.0.0:6565

Resources

Methods / Techniques:

Technology:

Frameworks:

Database Acces:

References: