Skip to content

Sample: network-chaos-simulation - Test slow/failing network conditions #25

@waldekmastykarz

Description

@waldekmastykarz

Summary

Create a sample that simulates slow/failing network conditions for resilience testing.

Plugins to use

  • LatencyPlugin - adds artificial delays to responses
  • GenericRandomErrorPlugin - returns random errors

What to build

  • Configure realistic network latency (200ms - 10s range)
  • Random 5xx errors, timeouts
  • Sample app showing proper UI handling:
    • Loading spinners
    • Timeout handling
    • Retry logic
    • Error messages

Configuration example

{
  "latencyPlugin": {
    "minMs": 200,
    "maxMs": 10000
  }
}

Combined with random errors:

{
  "genericRandomErrorPlugin": {
    "rate": 30,
    "errors": [
      { "statusCode": 500 },
      { "statusCode": 503 },
      { "statusCode": 504 }
    ]
  }
}

Why this is compelling

Test real-world network conditions locally. Build apps that work on slow connections and handle failures gracefully.

Reference docs

  • LatencyPlugin technical reference
  • GenericRandomErrorPlugin technical reference
  • Simulate slow API responses how-to guide

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions