Network Partitions & Packet Loss Simulation
Chaos & SRE Sprint β Day 2
Simulate a cross-region split-brain network partition isolating eu-west-1-primary and verify automated traffic failover to eu-central-1-standby.
In this lab playbook, you will simulate a complete regional network partition (action: partition) isolating eu-west-1-primary and verify that the API Gateway automatically shifts traffic toeu-central-1-standby without dropping active checkouts.
The official reference codebase for Day 2 is hosted in the repository. Clone the repository and navigate to day-2-network-partitions to run the working solution.
git clone https://github.com/letstrnsfrm-ai/chaos-engineering-roadmap.git
cd chaos-engineering-roadmap/day-2-network-partitionsConfigure Regional Network Partition Manifest
Inspect the NetworkChaos partition manifest targeting all pods labeled region: eu-west-1-primary.
apiVersion: chaos-mesh.org/v1alpha1
kind: NetworkChaos
metadata:
name: eu-west-1-region-partition
namespace: checkout-mesh
spec:
action: partition
mode: all
selector:
namespaces:
- checkout-mesh
labelSelectors:
region: eu-west-1-primary
direction: both
duration: "90s"Verify Cross-Region Split-Brain Failover
Execute the partition simulation and assert that requests automatically route from eu-west-1-primary to eu-central-1-standby.
npm run test:day2- Simulated bidirectional network partition isolating the primary cloud region.
- Verified automatic gateway failover from eu-west-1-primary to eu-central-1-standby.
- Measured failover latency overhead and confirmed zero dropped checkout transactions.
π§ Knowledge Check
What is the primary risk of a 'split-brain' scenario during a network partition between two active regions?