Skip to content

Instantly share code, notes, and snippets.

@frank-dspeed
Forked from diegopacheco/actix_netty_vs_fastify.md
Last active February 25, 2020 13:05
Show Gist options
  • Select an option

  • Save frank-dspeed/93baa7e9aecb1ebcf93dc686308b8cc6 to your computer and use it in GitHub Desktop.

Select an option

Save frank-dspeed/93baa7e9aecb1ebcf93dc686308b8cc6 to your computer and use it in GitHub Desktop.
Actix(Rust) VS Netty(Java) VS Fastify(Nodejs)

Fastify did 6K RPS (Request per Second)
Netty did 23K RPS (Request Per Second)
Actix did 53K RPS (Request Per Second)

Actix 1ms latency
Netty 4ms latency
Fastify 14ms latency

npm install -g autocannon

Actix

git clone https://github.com/diegopacheco/rust-playground.git
cd rust-playground/rust-microservice/
cargo build --release
./target/release/news-service
autocannon -c 100 -d 40 -p 10 172.17.0.2:8080/

Image of Actix

Netty

docker run diegopacheco/time-microservice
autocannon -c 100 -d 40 -p 10 172.17.0.2:8080/rest/datetime

Image of Netty

Fastify

git clone https://github.com/diegopacheco/Diego-Pacheco-Sandbox.git
cd scripts/node.js/fastify-fun2/
npm install
npm start
autocannon -c 100 -d 40 -p 10 localhost:3000

Image of Fastify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment