SLShakyLineGitHub
playbooks

Use cases

Practical fault-injection scenarios you can run locally, in staging, or inside CI.

API timeout and retry testing

Add latency and packet loss between a client and upstream API to confirm retry budgets, timeout messages, and fallback paths.

recipe
curl -X POST http://localhost:9090/profiles/default \
  -H "Content-Type: application/json" \
  -d '{"latency_ms":500,"drop_rate":0.03}'

Upload path degradation

Apply faults only from client to server to test file uploads, telemetry ingestion, or write-heavy APIs.

recipe
curl -X POST http://localhost:9090/profiles/upload \
  -H "Content-Type: application/json" \
  -d '{"c2s_throttle_kbps":128,"c2s_jitter_ms":80}'

Realtime connection stability

Introduce jitter and stalls while websocket-like TCP traffic stays connected for long periods.

recipe
curl -X POST http://localhost:9090/profiles/realtime \
  -H "Content-Type: application/json" \
  -d '{"c2s_jitter_ms":120,"s2c_jitter_ms":120,"c2s_stall_prob":0.02}'

CI regression scenario

Use a fixed seed and a named profile to make a failure mode reproducible across repeated test runs.

recipe
shakyline --listen 127.0.0.1:8080 \
  --upstream 127.0.0.1:9000 \
  --seed 4242