Advanced Echo Server Logo

Advanced Echo Server

Go-powered testing, load simulation & chaos engineering

Request History & Replay

Advanced Echo Server maintains a configurable history of recent requests, allowing you to inspect, analyze, and replay past interactions.

How It Works

graph TD
  subgraph User Workflow
    A[GET /history] --> B[Find Request ID]
    B --> C[POST /replay]
  end

Configuration

Environment Variable Description Default Example
ECHO_HISTORY_SIZE Maximum number of requests to store in memory 100 1000

Viewing Request History

Retrieve stored requests using the history API endpoint:

# Get all stored requests
curl http://localhost:8080/history

# Response format:
[ {"id": "ab2a11b7d4cfc1c9", "timestamp": "2025-09-14T22:53:09.617551-07:00", ... } ]

Request Replay

Replay previous requests to test behavior changes or debug issues.

Replay by Request ID

curl -X POST http://localhost:8080/replay \
  -H "Content-Type: application/json" \
  -d '{"id": "ab2a11b7d4cfc1c9"}'

Replay with Modifications

curl -X POST http://localhost:8080/replay \
  -H "Content-Type: application/json" \
  -d '{
    "id": "ab2a11b7d4cfc1c9",
    "modify_headers": {
      "X-Test-Environment": "staging",
      "Authorization": "Bearer new-token"
    },
    "modify_body": "{\"name\": \"Jane Doe\"}",
    "target": "http://staging.example.com"
  }'

Best Practices

Performance Tips

  • • Set appropriate history size limits based on memory constraints
  • • Disable body storage for high-volume endpoints if not needed
  • • The history is in-memory and currently has no cleanup or filtering capabilities.

Security Considerations

  • • Be cautious with storing sensitive data in request bodies
  • • Consider disabling history for authentication endpoints using the X-Echo-History-Enabled: false header.
  • • The advanced-echo-server does not have built-in access controls.

Monitoring

  • • Monitor history storage usage and performance impact
  • • Track replay success rates and response differences
  • • Set up alerts for unusual request patterns
  • • Use metrics to optimize history configuration