diff --git a/.github/workflows/benchmark-sanity.yaml b/.github/workflows/benchmark-sanity.yaml new file mode 100644 index 0000000..30d678d --- /dev/null +++ b/.github/workflows/benchmark-sanity.yaml @@ -0,0 +1,75 @@ +name: benchmark sanity check + +on: + push: + branches: + - master + paths-ignore: + - '**.md' + - '**.png' + +env: + RUST_TOOLCHAIN: nightly + TOOLCHAIN_PROFILE: minimal + +jobs: + benchmark: + runs-on: ubuntu-latest + steps: + - name: Checkout-Sources + uses: actions/checkout@v2 + - name: Install-Toolchain + uses: actions-rs/toolchain@v1 + with: + profile: ${{ env.TOOLCHAIN_PROFILE }} + toolchain: ${{ env.RUST_TOOLCHAIN }} + override: true + - name: Setup-Certs + run: | + cd examples/ && + ./gen_cert.sh && + cp certs/server.key certs/key.pem && + cp certs/server.crt certs/cert.pem && + cd .. + - name: Install-Run-Server + run: | + # sudo apt-get update && + # sudo apt-get install -y openssl nginx && + sudo cp ./benchmark/server/nginx-web.conf /etc/nginx/nginx.conf && + sudo cp -r ./benchmark/server/webroot/* /usr/share/nginx/html/ && + cat examples/certs/server.key examples/certs/server.crt > ./combined.pem && + sudo mv ./combined.pem /etc/nginx/ && + sudo systemctl enable nginx && + sudo systemctl start nginx && + # curl -vvv http://localhost:10082/ && + sleep 2 + - name: Build-Proxy + run: | + sudo apt-get install -y pkg-config && + cargo build --verbose && + cd .. + - name: Cache + uses: Swatinem/rust-cache@v1 + - name: Checkout-Client + uses: actions/checkout@v2 + with: + repository: 'giltene/wrk2' + path: 'wrk2' + - name: Build-Client + run: | + sudo apt-get -y install gcc make git libssl-dev zlib1g-dev && + cd wrk2 && + make WITH_OPENSSL=/usr && + cd .. && + sleep 2 + - name: Run-Proxy + run: sudo bash -c "ulimit -Sl 512 && ulimit -Hl 512 && sudo -u runner RUSTUP_TOOLCHAIN=nightly RUST_LOG=NONE /home/runner/.cargo/bin/cargo run --package monolake -- -c benchmark/proxy/monolake/monolake.toml &" + - name: Run-Client-Proxy-Server + working-directory: wrk2 + run: | + sleep 2 + curl -vvv http://localhost:8402/ && + curl -k https://localhost:6443/ && + ./wrk -d 1m -c 640 -t 64 -R 200000 --latency http://localhost:8402 && + ./wrk -d 1m -c 640 -t 64 -R 140000 --latency https://localhost:6443 && + sleep 2 diff --git a/docs/cloudwego/Getting Started/_config.md b/docs/cloudwego/Getting Started/_config.md index e2e9272..2fa69f7 100644 --- a/docs/cloudwego/Getting Started/_config.md +++ b/docs/cloudwego/Getting Started/_config.md @@ -5,7 +5,6 @@ weight: 2 keywords: ["Monolake", "Rust", "Proxy", "Configuration"] description: "This page provides a brief guide for Monolake configuration" --- - ## Configuration This chapter provides a brief guide for Monolake configuration. @@ -14,7 +13,7 @@ The configuration file is in .toml format. Basic configuration includes the foll ### Runtime -This section starts with [runtime]. It defines global run time configurations, including worker threads number and max connection entries. Optionally it may include a field "runtime_type" and it can be assigned to "legacy". Fox example: +This section starts with [runtime]. It defines global run time configurations, including worker threads number and max connection entries. Optionally it may include a field "runtime_type" and it can be assigned to "legacy" (this is default for non-linux OS). If the host OS is linux, it can be also assigned to "iouring" (this is default for linux OS). For example: ```markup [runtime]