This repository contains rust projects which is used to compare response rate between nginx and warp server (rust).
The client side just send concurrent request to hit webserver and get response stata. We can set number of concurrent through environment variable to experiment which number is fit for us.
There are 3 compoonents in the project as bellow
- Nginx
- Rust warp
- Client
cd ./nginx
docker build . -t nginx_img
docker run -it --rm -p 8000:8000 nginx_img nginx
cd ./api
docker build . -t warp_img
docker run -it --rm -p 3030:3030 warp_img
To create and up Client use this command, we can change port on the environment variable to choose which destination we want
cd ./client
docker build . -t client_img
//for rust warp
docker run -e url=http://localhost:3030/properties -e concurrent=100 client_img ./client
//for nginx
docker run -e url=http://localhost:8000/properties -e concurrent=100 client_img ./client
Run with rust webserver
url=http://localhost:3030/properties.json concurrent=100 cargo run
Run with nginx
url=http://localhost:8000/properties.json concurrent=100 cargo run