-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some load testing tools to the sandbox.
* support passing cargo build args to the Docker image builder, allowing us to enable all features. * add a distributed deployment option in the sandbox * update the deployments to have envoy depend on limitador instead of limitador depending on envoy. Signed-off-by: Hiram Chirino <[email protected]>
- Loading branch information
Showing
18 changed files
with
660 additions
and
27 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
*.key | ||
*.pem | ||
*.csr | ||
report.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
limitador-server/sandbox/docker-compose-limitador-distributed.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
version: '3.8' | ||
services: | ||
limitador: | ||
image: limitador-testing-all-features | ||
build: | ||
context: ../.. | ||
dockerfile: Dockerfile | ||
args: | ||
- CARGO_ARGS=--all-features | ||
command: | | ||
limitador-server --rls-ip 0.0.0.0 --rls-port 8081 --http-ip 0.0.0.0 --http-port "8080" | ||
-vv --grpc-reflection-service /opt/kuadrant/limits/limits.yaml | ||
distributed ${PEER_ID:-node1} 0.0.0.0:5001 ${PEER_URLS:-} | ||
expose: | ||
- "8080" | ||
- "8081" | ||
- "5001" | ||
ports: | ||
- "18080:8080" | ||
- "18081:8081" | ||
- "15001:5001" | ||
volumes: | ||
- ./limits.yaml:/opt/kuadrant/limits/limits.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"domain": "test_namespace", | ||
"hits_addend": 1, | ||
"descriptors": [ | ||
{ | ||
"entries": [ | ||
{ | ||
"key": "req.method", | ||
"value": "GET" | ||
}, | ||
{ | ||
"key": "req.path", | ||
"value": "/json" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "loadtest" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
goose = "^0.17" | ||
tokio = "^1.12" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use goose::prelude::*; | ||
|
||
async fn loadtest_get_json(user: &mut GooseUser) -> TransactionResult { | ||
let _goose_metrics = user.get("/json").await?; | ||
|
||
Ok(()) | ||
} | ||
|
||
#[tokio::main] | ||
async fn main() -> Result<(), GooseError> { | ||
GooseAttack::initialize()? | ||
.register_scenario( | ||
scenario!("LoadtestTransactions").register_transaction(transaction!(loadtest_get_json)), | ||
) | ||
.set_default(GooseDefault::Host, "http://localhost:18000")? | ||
.set_default(GooseDefault::HatchRate, "2")? | ||
.set_default( | ||
GooseDefault::CoordinatedOmissionMitigation, | ||
GooseCoordinatedOmissionMitigation::Average, | ||
)? | ||
.set_default(GooseDefault::RunTime, 20)? | ||
.execute() | ||
.await?; | ||
|
||
Ok(()) | ||
} |