Skip to content

Simple Authentication Web Service for Performance Comparisons

Notifications You must be signed in to change notification settings

tupol/simple-auth

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-auth

Simple Authentication Web Service for Performance Comparisons

This project was written to enable performance comparisons for a micro-service 'simple-auth' written in akka-http, ZIO and Actix-web (rust). The results were presented on Friday 21st at ZIOWorld conference.

The main performance results are summarized in this image; the full presentation is available in the /docs directory. alt text

Database

Start postgres database called db on port 5435 in docker container postgres-simple-auth:

cd db
./run_db.sh

Run akka-http locally

cd akka-http
sbt run

Run akka-http in docker

cd akka-http
./rebuild-img.sh

Run zio locally

cd zio
sbt run

Run akka-http in docker

cd zio
./rebuild-img.sh

(change .env values)

Run actix-web locally

cd actix-web
cargo run
<or>
cargo run --release

Run actix-web in docker

cd actix-web
docker-compose up

(change .env values)

Invoke /token endpoint

curl https://localhost:8781/token -X POST -d '{"username":"[email protected]","password":"TopSecret0!"}' -H 'Content-Type: application/json'

Load test

wrk -s post-token.lua -d60 -t50 -c50 https://localhost:8781/token

About

Simple Authentication Web Service for Performance Comparisons

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 49.0%
  • Scala 46.7%
  • Dockerfile 2.1%
  • Shell 2.0%
  • Lua 0.2%