feat: add load testing scenarios for disaster recovery - #331
Open
elijah4196 wants to merge 2 commits into
Open
Conversation
|
@elijah4196 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Load Testing Scenarios for Disaster Recovery
Summary
Adds k6 chaos engineering load tests that simulate provider outages, database failures, and network partitions to validate ProxyPay's recovery behaviour. Includes detailed recovery procedures and acceptance criteria validation.
Files Added
tests/load/disaster-recovery/chaos-scenarios.jstests/load/disaster-recovery/RECOVERY_PROCEDURES.mdtests/load/disaster-recovery/results/.gitkeepChaos Scenarios
1. Provider Outage (
-e SCENARIO=provider_outage)Simulates MTN/Orange/Airtel mobile money APIs being unavailable.
202not5002. Database Failure (
-e SCENARIO=db_failure)Simulates PostgreSQL primary becoming unreachable (pool exhaustion / failover).
503withRetry-After3. Network Partition (
-e SCENARIO=network_partition)Simulates 30% packet loss / split-brain between services.
500error responses4. Full DR (
-e SCENARIO=full_dr)Runs all three failure types concurrently across VUs — most realistic scenario.
5. Recovery Validation (
-e SCENARIO=recovery_validation)Post-incident verification — pure recovery check, no failure injection.
Custom Metrics
chaos_error_raterecovery_time_msdata_loss_eventsretry_success_totalchaos_request_duration_msAcceptance Criteria Met
recovery_time_msthreshold enforced in k6 optionsdata_loss_eventscounter threshold set to 0RECOVERY_PROCEDURES.mdcovers all 3 failure types + Toxiproxy integrationRunning the Tests
Results are written to
tests/load/disaster-recovery/results/dr-summary.json.closes #270