From 42aa4a07f5f6e42f7c2c72132b4b5d48086f17c1 Mon Sep 17 00:00:00 2001 From: franksn90 Date: Thu, 20 Jun 2024 11:49:29 +0200 Subject: [PATCH 1/8] Add the example showcase scenario --- .../architecture_tltea_scenario1.json | 135 ++++++++++++ .../failureLoadPeak/experiment_basic.json | 40 ++++ .../load_const20ArrivalRates.csv | 200 +++++++++++++++++ .../monitoring_data_full_example.csv | 201 ++++++++++++++++++ examples/failureLoadPeak/specification.md | 111 ++++++++++ 5 files changed, 687 insertions(+) create mode 100644 examples/failureLoadPeak/architecture_tltea_scenario1.json create mode 100644 examples/failureLoadPeak/experiment_basic.json create mode 100644 examples/failureLoadPeak/load_const20ArrivalRates.csv create mode 100644 examples/failureLoadPeak/monitoring_data_full_example.csv create mode 100644 examples/failureLoadPeak/specification.md diff --git a/examples/failureLoadPeak/architecture_tltea_scenario1.json b/examples/failureLoadPeak/architecture_tltea_scenario1.json new file mode 100644 index 0000000..8b8fcf3 --- /dev/null +++ b/examples/failureLoadPeak/architecture_tltea_scenario1.json @@ -0,0 +1,135 @@ +{ + "microservices": [ + { + "name": "gateway", + "instances": 1, + "capacity": 600, + "loadbalancer_strategy": "even", + "operations": [ + { + "name": "EXTERNAL_DEP", + "demand": 1, + "dependencies": [ + { + "service": "example-service", + "operation": "call_external_service" + } + ] + }, + { + "name": "INTERNAL_DEP", + "demand": 1, + "dependencies": [ + { + "service": "example-service", + "operation": "call_example-service2" + } + ] + }, + { + "name": "UNAFFECTED_SERVICE", + "demand": 1, + "dependencies": [ + { + "service": "example-service2", + "operation": "example-service2.get" + } + ] + }, + { + "name": "gateway.DB_WRITE", + "demand": 1, + "dependencies": [ + { + "service": "example-service", + "operation": "example-service.DB_WRITE" + } + ] + }, + { + "name": "gateway.DB_READ", + "demand": 1, + "dependencies": [ + { + "service": "example-service", + "operation": "example-service.DB_READ" + } + ] + }, + { + "name": "gateway.PING", + "demand": 1, + "dependencies": [] + } + ], + "patterns": [ + { + "type": "retry", + "config": { + "maxTries": 5, + "baseBackoff": 0.2, + "maxBackoff": 2, + "base": 2, + "jittering": false + } + } + ] + }, + { + "name": "example-service", + "instances": 2, + "patterns": [], + "capacity": 300, + "operations": [ + { + "name": "example-service.DB_WRITE", + "demand": 2, + "dependencies": [] + }, + { + "name": "example-service.DB_READ", + "demand": 1, + "dependencies": [] + }, + { + "name": "call_example-service2", + "demand": 1, + "dependencies": [ + { + "service": "example-service2", + "operation": "example-service2.get" + } + ] + }, + { + "name": "call_external_service", + "demand": 1, + "dependencies": [] + } + ], + "s_patterns": [ + { + "type": "autoscale" + } + ] + }, + { + "name": "example-service2", + "instances": 2, + "patterns": [], + "capacity": 300, + "operations": [ + { + "name": "example-service2.get", + "demand": 1, + "dependencies": [] + } + ], + "s_patterns": [ + { + "type": "autoscale" + } + ] + } + ] +} \ No newline at end of file diff --git a/examples/failureLoadPeak/experiment_basic.json b/examples/failureLoadPeak/experiment_basic.json new file mode 100644 index 0000000..3c4205a --- /dev/null +++ b/examples/failureLoadPeak/experiment_basic.json @@ -0,0 +1,40 @@ +{ + "simulation_metadata": { + "experiment_name": "Example-Basic-Test", + "model_name": "Scenario Basic", + "duration": 200 + }, + "request_generators": [ + { + "type": "interval", + "config": { + "interval": 0.01, + "microservice": "gateway", + "operation": "INTERNAL_DEP" + } + }, + { + "type": "interval", + "config": { + "interval": 0.02, + "microservice": "gateway", + "operation": "DB_WRITE" + } + }, + { + "type": "interval", + "config": { + "interval": 0.005, + "microservice": "gateway", + "operation": "DB_READ" + } + }, + { + "type": "interval", + "config": { + "interval": 0.01, + "operation": "gateway.UNAFFECTED_SERVICE" + } + } + ] +} \ No newline at end of file diff --git a/examples/failureLoadPeak/load_const20ArrivalRates.csv b/examples/failureLoadPeak/load_const20ArrivalRates.csv new file mode 100644 index 0000000..76d06c5 --- /dev/null +++ b/examples/failureLoadPeak/load_const20ArrivalRates.csv @@ -0,0 +1,200 @@ +0.5,5.0 +1.5,5.0 +2.5,5.0 +3.5,5.0 +4.5,5.0 +5.5,5.0 +6.5,5.0 +7.5,5.0 +8.5,5.0 +9.5,5.0 +10.5,5.0 +11.5,5.0 +12.5,5.0 +13.5,5.0 +14.5,5.0 +15.5,5.0 +16.5,5.0 +17.5,5.0 +18.5,5.0 +19.5,5.0 +20.5,5.0 +21.5,5.0 +22.5,5.0 +23.5,5.0 +24.5,5.0 +25.5,5.0 +26.5,5.0 +27.5,5.0 +28.5,5.0 +29.5,5.0 +30.5,5.0 +31.5,5.0 +32.5,5.0 +33.5,5.0 +34.5,5.0 +35.5,5.0 +36.5,5.0 +37.5,5.0 +38.5,5.0 +39.5,5.0 +40.5,5.0 +41.5,5.0 +42.5,5.0 +43.5,5.0 +44.5,5.0 +45.5,5.0 +46.5,5.0 +47.5,5.0 +48.5,5.0 +49.5,5.0 +50.5,5.0 +51.5,5.0 +52.5,5.0 +53.5,5.0 +54.5,5.0 +55.5,5.0 +56.5,5.0 +57.5,5.0 +58.5,5.0 +59.5,5.0 +60.5,5.0 +61.5,5.0 +62.5,5.0 +63.5,5.0 +64.5,5.0 +65.5,5.0 +66.5,5.0 +67.5,5.0 +68.5,5.0 +69.5,5.0 +70.5,5.0 +71.5,5.0 +72.5,5.0 +73.5,5.0 +74.5,5.0 +75.5,5.0 +76.5,5.0 +77.5,5.0 +78.5,5.0 +79.5,5.0 +80.5,5.0 +81.5,5.0 +82.5,5.0 +83.5,5.0 +84.5,5.0 +85.5,5.0 +86.5,5.0 +87.5,5.0 +88.5,5.0 +89.5,5.0 +90.5,5.0 +91.5,5.0 +92.5,5.0 +93.5,5.0 +94.5,5.0 +95.5,5.0 +96.5,5.0 +97.5,5.0 +98.5,5.0 +99.5,5.0 +100.5,5.0 +101.5,5.0 +102.5,5.0 +103.5,5.0 +104.5,5.0 +105.5,5.0 +106.5,5.0 +107.5,5.0 +108.5,5.0 +109.5,5.0 +110.5,5.0 +111.5,5.0 +112.5,5.0 +113.5,5.0 +114.5,5.0 +115.5,5.0 +116.5,5.0 +117.5,5.0 +118.5,5.0 +119.5,5.0 +120.5,5.0 +121.5,5.0 +122.5,5.0 +123.5,5.0 +124.5,5.0 +125.5,5.0 +126.5,5.0 +127.5,5.0 +128.5,5.0 +129.5,5.0 +130.5,5.0 +131.5,5.0 +132.5,5.0 +133.5,5.0 +134.5,5.0 +135.5,5.0 +136.5,5.0 +137.5,5.0 +138.5,5.0 +139.5,5.0 +140.5,5.0 +141.5,5.0 +142.5,5.0 +143.5,5.0 +144.5,5.0 +145.5,5.0 +146.5,5.0 +147.5,5.0 +148.5,5.0 +149.5,5.0 +150.5,5.0 +151.5,5.0 +152.5,5.0 +153.5,5.0 +154.5,5.0 +155.5,5.0 +156.5,5.0 +157.5,5.0 +158.5,5.0 +159.5,5.0 +160.5,5.0 +161.5,5.0 +162.5,5.0 +163.5,5.0 +164.5,5.0 +165.5,5.0 +166.5,5.0 +167.5,5.0 +168.5,5.0 +169.5,5.0 +170.5,5.0 +171.5,5.0 +172.5,5.0 +173.5,5.0 +174.5,5.0 +175.5,5.0 +176.5,5.0 +177.5,5.0 +178.5,5.0 +179.5,5.0 +180.5,5.0 +181.5,5.0 +182.5,5.0 +183.5,5.0 +184.5,5.0 +185.5,5.0 +186.5,5.0 +187.5,5.0 +188.5,5.0 +189.5,5.0 +190.5,5.0 +191.5,5.0 +192.5,5.0 +193.5,5.0 +194.5,5.0 +195.5,5.0 +196.5,5.0 +197.5,5.0 +198.5,5.0 +199.5,5.0 diff --git a/examples/failureLoadPeak/monitoring_data_full_example.csv b/examples/failureLoadPeak/monitoring_data_full_example.csv new file mode 100644 index 0000000..d6113d3 --- /dev/null +++ b/examples/failureLoadPeak/monitoring_data_full_example.csv @@ -0,0 +1,201 @@ +time_original,gateway.INTERNAL_DEP_ArrivalCount,example_service_InstanceCount,AllResponseTimes +0,2,2,0.02 +1,1,2,0.03 +2,2,2,0.04 +3,1,2,0.02 +4,2,2,0.03 +5,1,2,0.02 +6,1,2,0.02 +7,2,2,0.02 +8,1,2,0.04 +9,2,2,0.02 +10,1,2,0.03 +11,2,2,0.03 +12,2,2,0.02 +13,3,2,0.02 +14,2,2,0.03 +15,1,2,0.03 +16,2,2,0.03 +17,1,2,0.01 +18,1,2,0.02 +19,1,2,0.02 +20,2,2,0.01 +21,1,2,0.02 +22,2,1,0.10 +23,1,1,0.90 +24,3,1,0.81 +25,4,1,0.50 +26,3,1,0.55 +27,4,1,0.48 +28,4,1,0.46 +29,4,1,0.47 +30,3,1,0.46 +31,2,2,0.39 +32,3,2,0.50 +33,4,2,0.47 +34,4,2,0.41 +35,4,2,0.35 +36,3,2,0.29 +37,2,2,0.20 +38,4,2,0.48 +39,4,2,0.42 +40,3,2,0.37 +41,4,2,0.58 +42,3,2,0.51 +43,4,2,0.55 +44,5,2,0.70 +45,3,2,0.87 +46,5,2,0.91 +47,4,2,0.93 +48,5,2,0.91 +49,3,2,0.88 +50,4,2,0.70 +51,5,2,0.71 +52,8,2,0.97 +53,6,2,0.95 +54,7,2,0.90 +55,6,2,0.89 +56,6,2,0.89 +57,4,2,0.91 +58,1,2,0.52 +59,1,2,0.26 +60,1,2,0.09 +61,1,2,0.03 +62,1,2,0.02 +63,1,2,0.03 +64,1,2,0.02 +65,2,2,0.05 +66,1,2,0.01 +67,1,2,0.03 +68,2,2,0.02 +69,1,2,0.05 +70,1,2,0.01 +71,2,1,0.35 +72,1,1,0.22 +73,4,1,0.81 +74,5,1,0.89 +75,4,1,0.92 +76,5,1,0.97 +77,5,1,0.98 +78,6,1,0.96 +79,7,1,0.97 +80,8,2,0.95 +81,6,2,0.89 +82,7,2,0.82 +83,6,2,0.79 +84,7,2,0.81 +85,7,2,0.82 +86,6,2,0.87 +87,5,2,0.75 +88,6,2,0.77 +89,7,2,0.76 +90,8,2,0.98 +91,6,2,0.88 +92,7,2,0.84 +93,7,2,0.82 +94,8,2,0.60 +95,8,2,0.82 +96,7,2,0.86 +97,8,2,0.82 +98,9,2,0.89 +99,6,2,0.90 +100,7,2,0.77 +101,8,2,0.86 +102,6,2,0.94 +103,7,2,0.68 +104,6,2,0.57 +105,6,2,0.59 +106,4,2,0.70 +107,2,2,0.54 +108,1,2,0.43 +109,2,2,0.24 +110,1,2,0.13 +111,2,2,0.04 +112,2,2,0.06 +113,3,2,0.07 +114,2,2,0.02 +115,1,2,0.01 +116,2,2,0.02 +117,1,2,0.03 +118,1,2,0.04 +119,1,2,0.03 +120,2,2,0.05 +121,1,2,0.01 +122,1,2,0.02 +123,2,2,0.04 +124,1,2,0.06 +125,1,2,0.07 +126,2,2,0.02 +127,1,2,0.01 +128,1,2,0.03 +129,2,2,0.02 +130,1,2,0.01 +131,1,2,0.05 +132,2,2,0.04 +133,1,2,0.03 +134,1,2,0.01 +135,2,2,0.04 +136,1,2,0.06 +137,1,2,0.09 +138,2,2,0.01 +139,1,2,0.05 +140,1,2,0.01 +141,2,2,0.02 +142,1,2,0.03 +143,1,2,0.04 +144,2,2,0.05 +145,1,2,0.03 +146,1,2,0.06 +147,2,2,0.07 +148,1,2,0.02 +149,1,2,0.03 +150,2,2,0.04 +151,1,2,0.05 +152,1,2,0.06 +153,2,2,0.01 +154,1,2,0.02 +155,1,2,0.06 +156,2,2,0.05 +157,1,2,0.06 +158,1,2,0.06 +159,2,2,0.04 +160,1,2,0.02 +161,1,2,0.04 +162,2,2,0.04 +163,1,2,0.03 +164,1,2,0.02 +165,2,2,0.02 +166,1,2,0.03 +167,1,2,0.01 +168,2,2,0.05 +169,1,2,0.03 +170,1,2,0.01 +171,2,2,0.03 +172,1,2,0.04 +173,1,2,0.03 +174,2,2,0.02 +175,1,2,0.01 +176,1,2,0.03 +177,2,2,0.02 +178,1,2,0.03 +179,1,2,0.02 +180,2,2,0.02 +181,1,2,0.01 +182,1,2,0.02 +183,2,2,0.03 +184,1,2,0.02 +185,1,2,0.30 +186,2,2,0.02 +187,1,2,0.03 +188,1,2,0.04 +189,2,2,0.05 +190,1,2,0.06 +191,1,2,0.03 +192,2,2,0.01 +193,1,2,0.02 +194,1,2,0.03 +195,2,2,0.01 +196,1,2,0.02 +197,1,2,0.03 +198,2,2,0.02 +199,1,2,0.03 \ No newline at end of file diff --git a/examples/failureLoadPeak/specification.md b/examples/failureLoadPeak/specification.md new file mode 100644 index 0000000..4bb09b4 --- /dev/null +++ b/examples/failureLoadPeak/specification.md @@ -0,0 +1,111 @@ +# Example: Instance Failure + Load Peak + +## Description + +Immediately after an instance failure caused by a software bug, the number of wage clerks using the system rises +exponentially. This happens during the payslip period at regular service hours. +The system is expected to perform within a guaranteed tolerance, meaning wage clerks always get correct answers within +1s (99% of all cases). +Our hypothesis is that the autoscaler, a key component of our system, plays a crucial role in mitigating the effects of +the stimulus. By dynamically adjusting the system's resources, it helps maintain the system's performance even during +peak usage, potentially mitigating the impact of the software bug. + +## Environment + +This example scenario requires the following files and parameters to be used in the environment. + +| Field | File | +|--------------------|-----------------------------------| +| Architecture | architecture_tltea_scenario1.json | +| Experiment | experiment_basic.json | +| Load | load_const20ArrivalRates.csv | +| Monitoring Data | monitoring_data_full_example.csv | +| Search Window Size | 60 | + +## Stimuli + +### Patterns + +**1. Pattern** + +Use the Existence Pattern with the Globally scope. Select the command *killExampleServiceInstance*. Select a time bound +between 20 and 20 time units. The result should look as follows: + +> Globally, {killExampleServiceInstance} [holds] eventually between 20 and 20 time units. + +**2. Pattern** + +Use the Response Pattern with the Globally scope. Select the listener *InjectionOfFailure* and the command +*LoadPeakIncrease*. Select a time bound between 0 and 2 time units. The result should look as follows: + +> Globally, if {InjectionOfFailure} [has occurred] then in response {LoadPeakIncrease} [eventually holds] between 0 and +> 2 time units. + +**3. Pattern** + +Use the Response Pattern with the Globally scope. Select the listener *InjectionOfFailure* and the command +*LoadPeakHold*. Select a time bound between 22 and 22 time units. The result should look as follows: + +> Globally, if {InjectionOfFailure} [has occurred] then in response {LoadPeakHold} [eventually holds] between 22 and 22 +> time units. + +**4. Pattern** + +Use the Response Pattern with the Globally scope. Select the listener *InjectionOfFailure* and the command +*LoadPeakDrop*. Select a time bound between 32 and 32 time units. The result should look as follows: + +> Globally, if {InjectionOfFailure} [has occurred] then in response {LoadPeakDrop} [eventually holds] between 32 and 32 +> time units. + +### Commands + +**killExampleService** + +Create a kill command named *killExampleService* with the following content: +> kill[example-service,1]) & (event[injection-of-failure] + +**LoadPeakIncrease** + +Create a kill command named *LoadPeakIncrease* with the following content: +> load[0,20][x5:exponential:gateway.INTERNAL_DEP] + +**LoadPeakHold** + +Create a kill command named *LoadPeakHold* with the following content: +> load[0,10][x5:constant:gateway.INTERNAL_DEP] + +**LoadPeakDrop** + +Create a kill command named *LoadPeakDrop* with the following content: +> load[0,5][x5:linear-inverse:gateway.INTERNAL_DEP] + +### Listeners + +**InjectionOfFailure** + +Create an event listener named *InjectionOfFailure* with the following content: +> event[injection-of-failure] + +## Responses + +### Patterns + +**RT Check** + +Use the Universality Pattern with the Globally scope. Select the event *ResponseTimeOK*. The result should look as +follows: + +> Globally, it is always the case that {ResponseTimeOK} [holds]. + +### Events + +**ResponseTimeOK** + +Create an event named *ResponseTimeOK* with the following settings: + +| Field | File | +|--------------------|------------------| +| Predicate Name | ResponseTimeOK | +| Predicate Logic | smallerEqual | +| Measurement Source | AllResponseTimes | +| Comparison Value: | 1 | From 413bec39153e7446ceb4aed72d380f00a8a56baa Mon Sep 17 00:00:00 2001 From: franksn90 Date: Thu, 20 Jun 2024 12:03:24 +0200 Subject: [PATCH 2/8] Fix colors for search executions are shown for simulation executions --- components/Scenario.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Scenario.vue b/components/Scenario.vue index 56ace8e..d070523 100644 --- a/components/Scenario.vue +++ b/components/Scenario.vue @@ -450,7 +450,7 @@ export default {
+ :class="{ 'green-border' : this.result.simulationResultsScenarioSuccesses[resultIndex], 'red-border' : !this.result.simulationResultsScenarioSuccesses[resultIndex] }">
From 9e686af4ca4f8876e38403c97e40a24bbf8d8c10 Mon Sep 17 00:00:00 2001 From: franksn90 Date: Thu, 20 Jun 2024 13:43:57 +0200 Subject: [PATCH 3/8] Fix not enough space to display results in one row --- components/Scenario.vue | 4 ++-- components/Scenarios.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/Scenario.vue b/components/Scenario.vue index d070523..60d1902 100644 --- a/components/Scenario.vue +++ b/components/Scenario.vue @@ -395,10 +395,10 @@ export default {