Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

runner = Semian::Experiments::CircuitBreakerExperimentRunner.new(
experiment_name: "One of Many Services Degradation Experiment",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

several tests were sharing the resource name, which I think leads to conflicting results when running them in parallel.

I fixed them here, but we should probably just have the experiment helper automatically set the resource name

resource_name: "protected_service",
resource_name: "protected_service_one_of_many_services_degradation",
degradation_phases: [Semian::Experiments::DegradationPhase.new(healthy: true)] * 1 +
[Semian::Experiments::DegradationPhase.new(latency: 4.95)] * 10 + # Most requests to the target service will timeout
[Semian::Experiments::DegradationPhase.new(healthy: true)] * 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

runner = Semian::Experiments::CircuitBreakerExperimentRunner.new(
experiment_name: "One of Many Services Degradation Experiment",
resource_name: "protected_service_adaptive",
resource_name: "protected_service_one_of_many_services_degradation_adaptive",
degradation_phases: [Semian::Experiments::DegradationPhase.new(healthy: true)] * 1 +
[Semian::Experiments::DegradationPhase.new(latency: 4.95)] * 10 + # Most requests to the target service will timeout
[Semian::Experiments::DegradationPhase.new(healthy: true)] * 3,
Expand Down
2 changes: 1 addition & 1 deletion experiments/experiments/experiment_slow_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

runner = Semian::Experiments::CircuitBreakerExperimentRunner.new(
experiment_name: "Slow Query Experiment",
resource_name: "protected_service",
resource_name: "protected_service_slow_query",
degradation_phases: [Semian::Experiments::DegradationPhase.new(healthy: true)] * 1 +
[Semian::Experiments::DegradationPhase.new(specific_endpoint_latency: 9.5)] * 10 + # This should lead the service to get overwhelmed and start rejecting requests
[Semian::Experiments::DegradationPhase.new(healthy: true)] * 3,
Expand Down
2 changes: 1 addition & 1 deletion experiments/experiments/experiment_slow_query_adaptive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

runner = Semian::Experiments::CircuitBreakerExperimentRunner.new(
experiment_name: "Slow Query Experiment (Adaptive)",
resource_name: "protected_service",
resource_name: "protected_service_slow_query_adaptive",
degradation_phases: [Semian::Experiments::DegradationPhase.new(healthy: true)] * 1 +
[Semian::Experiments::DegradationPhase.new(specific_endpoint_latency: 9.5)] * 10 + # This should lead the service to get overwhelmed and start rejecting requests
[Semian::Experiments::DegradationPhase.new(healthy: true)] * 3,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiments/results/duration_graphs/duration-oscillating_errors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiments/results/duration_graphs/duration-slow_query.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiments/results/duration_graphs/duration-sustained_load.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiments/results/main_graphs/gradual_increase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiments/results/main_graphs/gradual_increase_adaptive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiments/results/main_graphs/oscillating_errors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiments/results/main_graphs/oscillating_errors_adaptive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiments/results/main_graphs/slow_query.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiments/results/main_graphs/slow_query_adaptive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiments/results/main_graphs/sudden_error_spike_100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiments/results/main_graphs/sudden_error_spike_20.png
Binary file modified experiments/results/main_graphs/sudden_error_spikes.png
Binary file modified experiments/results/main_graphs/sudden_error_spikes_adaptive.png
Binary file modified experiments/results/main_graphs/sustained_load.png
Binary file modified experiments/results/main_graphs/sustained_load_adaptive.png
Binary file modified experiments/results/throughput_graphs/throughput-slow_query.png
2 changes: 1 addition & 1 deletion lib/semian.rb
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def create_adaptive_circuit_breaker(name, **options)
AdaptiveCircuitBreaker.new(
name: name,
kp: 0.75, # Standard proportional gain
ki: 0.01, # Moderate integral gain
ki: 0.1, # Moderate integral gain
kd: 0.5, # Small derivative gain (as per design doc)
window_size: 10, # 10-second window for rate calculation and update interval
initial_history_duration: 900, # 15 minutes of initial history for p90 calculation
Expand Down
Loading