Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporate Matheus contributions #4

Open
wants to merge 25 commits into
base: matheus-experiments
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@ name: Build & publish images

on:
push:
branches: [ "main" ]
branches: [ "main-disabled" ]

jobs:
build-and-push-image:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm/v6
- linux/arm/v7
- linux/arm64/v8
- linux/arm64
include:
- dockerfile: ./server/Dockerfile
image: ghcr.io/ppgia-unifor/resilience-bench-server
Expand All @@ -31,8 +37,15 @@ jobs:
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
Expand All @@ -52,7 +65,8 @@ jobs:
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: ${{ matrix.context }}
platforms: ${{ matrix.platform }}
file: ${{ matrix.dockerfile }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
File renamed without changes.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 PPGIA - UNIFOR

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

ResilienceBench is a language-agnostic benchmark environment to support the experimental evaluation of microservice resiliency patterns, such as [Retry](https://docs.microsoft.com/en-us/azure/architecture/patterns/retry) and [Circuit Breaker](https://docs.microsoft.com/en-us/azure/architecture/patterns/circuit-breaker), using open source resilience libraries, such as C\#'s [Polly](https://github.com/App-vNext/Polly) and Java's [Resilience4j](https://github.com/resilience4j/resilience4j).

![Build status](https://github.com/ppgia-unifor/resilience-bench/actions/workflows/docker-image.yml/badge.svg)

Jump to:

* [Documentation](/docs)
* [Documentation](/docs/README.md)

* [Installation instructions](docs/installation.md)
* [Installation instructions](INSTALL.md)

* [Demo video](#demo-video)

Expand All @@ -24,6 +22,12 @@ This short (2m:20s) video provides a quick overview of the steps necessary to in

## Publications



🌟 Aderaldo C. M., Costa T.M., Vasconcelos D.M., Mendonça N.C., Cámara J., Garlan D. (2024). [A declarative approach and benchmark tool for controlled evaluation of microservice resiliency patterns.](https://onlinelibrary.wiley.com/doi/full/10.1002/spe.3368) In Software Practice and Experience. 2024; 1-23.

Aderaldo, C. M., and Mendonça, N. C. (2023). [How The Retry Pattern Impacts Application Performance: A Controlled Experiment.](https://doi.org/10.1145/3613372.3613409) In Proceedings of the XXXVII Brazilian Symposium on Software Engineering (SBES '23).

Costa, T. M., Vasconcelos, D. M., Aderaldo, C. M., and Mendonça, N. C. (2022). [Avaliação de Desempenho de Dois Padrões de Resiliência para Microsserviços: Retry e Circuit Breaker](publications/sbrc2022-final.pdf). In 40th Brazilian Symposium on Computer Networks and Distributed Systems (SBRC 2022). The experimental dataset used in this paper is available in the [/data/sbrc2022](data/sbrc2022/) folder.

Aderaldo, C. M., and Mendonça, N. C. (2022). [ResilienceBench: Um ambiente para avaliação experimental de padrões de resiliência para microsserviços ](). In 40th Brazilian Symposium on Computer Networks and Distributed Systems (SBRC 2022). The version presented in the conference and described in the paper is available [here](publications/sbrc_tools_2022.pdf).
Expand Down
13 changes: 13 additions & 0 deletions REQUIREMENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Requirements

## Hardware Environment

This project boasts minimal hardware requirements, as they are solely determined by the benchmark the user intends to run. For simulating up to one hundred users, a standard personal computer will suffice. However, if the user seeks to undertake more demanding workloads, we recommend referring to the related publications located in the designated folder. These publications provide insights into the experiments we conducted and the hardware configurations employed for those experiments

## Software Environments

The project uses Docker to build the source code, making it a straightforward process that only requires Docker and Docker Compose to be build it.

- Docker 20.10 or superior
- Docker Compose 1.29 or superior

21 changes: 21 additions & 0 deletions data/sbes2023/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 PPGIA - UNIFOR

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
44 changes: 44 additions & 0 deletions data/sbes2023/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# SBES 2023 Configuration File and Dataset

This data is related to the paper published in SBES 2023.

> Carlos M. Aderaldo and Nabor C. Mendonça. 2023. How The Retry Pattern Impacts Application Performance: A Controlled Experiment. In XXXVII Brazilian Symposium on Software Engineering (SBES 2023), September 25–29, 2023, Campo Grande, Brazil. ACM, New York, NY, USA, 10 pages. [https://doi.org/10.1145/3613372.3613409](https://doi.org/10.1145/3613372.3613409)
---

The Resilience Bench configurion file used to run the experiments described in the SBES 2023 paper is available as a JSON in the file [config-retry.json](config-retry.json).

The experimental dataset produced after running these experiments is available at Zenodo in this [link](https://zenodo.org/record/7938926/).

This zip file includes two csv files, named "results-polly.csv" and "results-r4j.csv", containing the experimental data obtained with the [Polly](https://github.com/App-vNext/Polly) and [Resilience4j](https://github.com/resilience4j/resilience4j) resilience libraries, respectively. Each csv file is structured with two sets of attributes (columns): the first set corresponds to the performance metrics collected during each test, while the second set corresponds to the test parameters.

### Performance Metrics
* `successfulCalls` number of successful invocations of the target service by the client application.
* `unsuccessfulCalls` number of unsuccessful invocations of the target service by the client application.
* `totalCalls` total number of invocations of the target service by the client application.
* `successfulRequests` number of successful invocations of the target service by the resilience library.
* `unsuccessfulRequests` number of unsuccessful invocations of the target service by the resilience library.
* `totalRequests` total number of invocations of the target service by the resilience library.
* `successTime` total (accumulated) time the resilience library spent waiting for a successful response from the target service.
* `successTimePerRequest` average response time of the target service measured by the resilience library.
* `errorTime` total (accumulated) time the resilience library spent waiting for an unsuccessful response from the target service.
* `errorTimePerRequest` average error time of the target service measured by the resilience library.
* `totalContentionTime` total time the client application spent waiting for either a successful or an unsuccessful response from the target service..
* `contentionRate` fraction of the client application's total execution time spent waiting for either a successful or an unsuccessful response from the target service.
* `totalExecutionTime` total execution time of the client application.
* `throughput` average number of successful requests handled by the target service per second.

### Test parameters
* `userId` ID of the client application's virtual user.
* `startTime` start time of the test.
* `endTime` end time of the test.
* `users` total number of client application's virtual users.
* `round` test ID.
* `lib` resilience library used to invoke the target service.
* `pattern` resilience pattern used to invoke the target service.
* `faultPercentage` percentage of fauts injected into the target service's invocation stream.
* `faultType` type of faut injected into the target service's invocation stream.
* `faultStatus` faut status injected into the target service's invocation stream.
* `count` maximum number of retries allowed (including the first invocation attempt).
* `sleepDurationType` backoff delay increment type.
* `exponentialBackoffPow` float value to multiply the initial backoff delay before a new retry.
* `sleepDuration` initial backoff delay.
80 changes: 80 additions & 0 deletions data/sbes2023/config-retry.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"fault": {
"type": "abort",
"percentage": [
25,
50,
75
],
"status": 503
},
"users": [
50,
100,
150
],
"targetUrl": "http://server:9211/bytes/1000",
"rounds": 10,
"maxRequests": 500,
"succRequests": 10,
"clientSpecs": [
{
"strategy": "retry",
"platform": "dotnet",
"lib": "polly",
"url": "http://polly/retry",
"patternConfig": {
"count": [
1,
3,
5,
7,
9
],
"exponentialBackoffPow": [
1.2,
1.4,
1.6,
1.8,
2.0
],
"sleepDuration": [
20,
40,
60,
80,
100
]
}
},
{
"strategy": "retry",
"platform": "java",
"lib": "resilience4j",
"url": "http://resilience4j/retry",
"patternConfig": {
"maxAttempts": [
2,
4,
6,
8,
10
],
"multiplier": [
1.2,
1.4,
1.6,
1.8,
2.0
],
"initialIntervalMillis": [
20,
40,
60,
80,
100
]
}
}
]
}