Skip to main content

pod-http-delay

Adds latency to outbound HTTP traffic from the pod on a specified port.

Target kind: Pod
Implementation: Daemon (ExecHTTPChaos with action: delay)
Rollback: Yes — sends CancelChaos to remove HTTP intercept rules

Parameters

NameTypeRequiredDefaultDescription
portstringYesPort to intercept (e.g. "8080")
delaystringYesDelay to add (e.g. "500ms", "2s")

Example

apiVersion: chaos.chaosplane.io/v1alpha1
kind: ChaosExperiment
metadata:
name: pod-http-delay-example
namespace: default
spec:
target:
kind: Pod
namespace: default
labelSelector:
matchLabels:
app: api-gateway
action:
type: pod-http-delay
parameters:
port: "8080"
delay: "2000ms"
duration: 60s
rollback:
enabled: true

Rollback behavior

Sends CancelChaos RPC to the daemon, which removes the HTTP proxy rules.

Implementation notes

The daemon sets up a transparent HTTP proxy in the pod's network namespace that adds the specified delay before forwarding each request. Both port and delay are required and validated before execution. Use this to test timeout handling, circuit breaker thresholds, and retry logic.