> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/resilience-testing/chaos-engineering/faults/chaos-fault-categories/cloud-foundry/cloud-foundry.md).

# Chaos faults for Cloud Foundry

Catalog of Cloud Foundry chaos faults that disrupt apps, JVM runtimes, and the network between app instances and their dependencies.

### Introduction <a href="#introduction" id="introduction"></a>

Cloud Foundry chaos faults disrupt the running state of an app, the JVM inside an app instance, or the network that connects an app to its dependencies. Use them to validate platform self-healing (CF restarting crashed instances), application resilience (timeouts, retries, fallbacks), and downstream behavior (consumer error rates, alert fidelity) on TAS, PCF, or open-source Cloud Foundry deployments.

All Cloud Foundry faults run from a Linux chaos infrastructure (LCI) that authenticates to the Cloud Foundry API and, for JVM and network faults, to the BOSH director that manages the Diego cells.

Go to [Cloud Foundry chaos deployment](/resilience-testing/chaos-engineering/faults/chaos-fault-categories/cloud-foundry/cf-components-and-arch.md) to read the supported LCI deployment models, and [Cloud Foundry permissions](/resilience-testing/chaos-engineering/faults/chaos-fault-categories/cloud-foundry/permissions.md) to set up the required CF and BOSH credentials.

<table data-view="cards" data-search="true"><thead><tr><th></th><th></th><th><select multiple><option value="UX59v8Sv" label="cf" color="blue"></option><option value="ztSKzP2q" label="cloud-foundry" color="blue"></option><option value="cj0_smAF" label="app" color="blue"></option><option value="W-cpEz1m" label="stop" color="blue"></option><option value="hP3QbShi" label="container" color="blue"></option><option value="br04VL0W" label="kill" color="blue"></option><option value="iY-f-3Eq" label="route" color="blue"></option><option value="lqbSuxOs" label="jvm" color="blue"></option><option value="X42M0POo" label="cpu" color="blue"></option><option value="CLYUkBAk" label="memory" color="blue"></option><option value="YYJDSm2J" label="gc" color="blue"></option><option value="UQX0TL7n" label="exception" color="blue"></option><option value="BU7Y3epy" label="latency" color="blue"></option><option value="D33BIdER" label="return" color="blue"></option><option value="L4-P0uTt" label="network" color="blue"></option><option value="sgBDz-xg" label="loss" color="blue"></option><option value="MwWc5aQJ" label="corruption" color="blue"></option><option value="Hcw47TAP" label="duplication" color="blue"></option></select></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>CF app stop</strong></td><td>Stop a Cloud Foundry app for a configurable duration and then re-start it, so you can test how the platform and consumers react when the app goes offline.</td><td><span data-option="UX59v8Sv">cf, </span><span data-option="ztSKzP2q">cloud-foundry, </span><span data-option="cj0_smAF">app, </span><span data-option="W-cpEz1m">stop</span></td><td><a href="#cf-app-stop">#cf-app-stop</a></td></tr><tr><td><strong>CF app container kill</strong></td><td>Kill the container of one or more app instances and let Cloud Foundry reschedule them so you can validate platform self-healing and peer absorption.</td><td><span data-option="UX59v8Sv">cf, </span><span data-option="ztSKzP2q">cloud-foundry, </span><span data-option="cj0_smAF">app, </span><span data-option="hP3QbShi">container, </span><span data-option="br04VL0W">kill</span></td><td><a href="#cf-app-container-kill">#cf-app-container-kill</a></td></tr><tr><td><strong>CF app route unmap</strong></td><td>Temporarily unmap a route from a Cloud Foundry app so you can test how upstream gateways and consumers handle a route that returns 404 from the CF router.</td><td><span data-option="UX59v8Sv">cf, </span><span data-option="ztSKzP2q">cloud-foundry, </span><span data-option="cj0_smAF">app, </span><span data-option="iY-f-3Eq">route</span></td><td><a href="#cf-app-route-unmap">#cf-app-route-unmap</a></td></tr><tr><td><strong>CF app JVM CPU stress</strong></td><td>Drive sustained CPU usage inside the JVM of a Java app instance for a configurable duration so you can test the app under CPU saturation.</td><td><span data-option="UX59v8Sv">cf, </span><span data-option="ztSKzP2q">cloud-foundry, </span><span data-option="cj0_smAF">app, </span><span data-option="lqbSuxOs">jvm, </span><span data-option="X42M0POo">cpu</span></td><td><a href="#cf-app-jvm-cpu-stress">#cf-app-jvm-cpu-stress</a></td></tr><tr><td><strong>CF app JVM memory stress</strong></td><td>Drive heap or non-heap memory pressure inside the JVM of a Java app instance so you can test GC behavior and out-of-memory handling.</td><td><span data-option="UX59v8Sv">cf, </span><span data-option="ztSKzP2q">cloud-foundry, </span><span data-option="cj0_smAF">app, </span><span data-option="lqbSuxOs">jvm, </span><span data-option="CLYUkBAk">memory</span></td><td><a href="#cf-app-jvm-memory-stress">#cf-app-jvm-memory-stress</a></td></tr><tr><td><strong>CF app JVM trigger GC</strong></td><td>Force a full garbage-collection cycle inside the JVM of a Java app instance so you can measure pause time and tail-latency impact.</td><td><span data-option="UX59v8Sv">cf, </span><span data-option="ztSKzP2q">cloud-foundry, </span><span data-option="cj0_smAF">app, </span><span data-option="lqbSuxOs">jvm, </span><span data-option="YYJDSm2J">gc</span></td><td><a href="#cf-app-jvm-trigger-gc">#cf-app-jvm-trigger-gc</a></td></tr><tr><td><strong>CF app JVM method exception</strong></td><td>Force a specific JVM method to throw a configurable exception so you can validate error-handling paths in callers.</td><td><span data-option="UX59v8Sv">cf, </span><span data-option="ztSKzP2q">cloud-foundry, </span><span data-option="cj0_smAF">app, </span><span data-option="lqbSuxOs">jvm, </span><span data-option="UQX0TL7n">exception</span></td><td><a href="#cf-app-jvm-method-exception">#cf-app-jvm-method-exception</a></td></tr><tr><td><strong>CF app JVM method latency</strong></td><td>Add artificial latency to every invocation of a specific JVM method so you can simulate a slow downstream call at the method boundary.</td><td><span data-option="UX59v8Sv">cf, </span><span data-option="ztSKzP2q">cloud-foundry, </span><span data-option="cj0_smAF">app, </span><span data-option="lqbSuxOs">jvm, </span><span data-option="BU7Y3epy">latency</span></td><td><a href="#cf-app-jvm-method-latency">#cf-app-jvm-method-latency</a></td></tr><tr><td><strong>CF app JVM modify return</strong></td><td>Override the return value of a specific JVM method so you can test defensive checks and fallbacks against unexpected values.</td><td><span data-option="UX59v8Sv">cf, </span><span data-option="ztSKzP2q">cloud-foundry, </span><span data-option="cj0_smAF">app, </span><span data-option="lqbSuxOs">jvm, </span><span data-option="D33BIdER">return</span></td><td><a href="#cf-app-jvm-modify-return">#cf-app-jvm-modify-return</a></td></tr><tr><td><strong>CF app network latency</strong></td><td>Add latency on the egress traffic of an app instance so you can simulate a slow downstream dependency at the network layer.</td><td><span data-option="UX59v8Sv">cf, </span><span data-option="ztSKzP2q">cloud-foundry, </span><span data-option="cj0_smAF">app, </span><span data-option="L4-P0uTt">network, </span><span data-option="BU7Y3epy">latency</span></td><td><a href="#cf-app-network-latency">#cf-app-network-latency</a></td></tr><tr><td><strong>CF app network loss</strong></td><td>Drop a configurable percentage of egress packets from an app instance so you can test retransmissions, retries, and circuit-breaker behavior.</td><td><span data-option="UX59v8Sv">cf, </span><span data-option="ztSKzP2q">cloud-foundry, </span><span data-option="cj0_smAF">app, </span><span data-option="L4-P0uTt">network, </span><span data-option="sgBDz-xg">loss</span></td><td><a href="#cf-app-network-loss">#cf-app-network-loss</a></td></tr><tr><td><strong>CF app network corruption</strong></td><td>Corrupt a configurable percentage of egress packets from an app instance so you can validate TCP retransmissions and protocol parsers.</td><td><span data-option="UX59v8Sv">cf, </span><span data-option="ztSKzP2q">cloud-foundry, </span><span data-option="cj0_smAF">app, </span><span data-option="L4-P0uTt">network, </span><span data-option="MwWc5aQJ">corruption</span></td><td><a href="#cf-app-network-corruption">#cf-app-network-corruption</a></td></tr><tr><td><strong>CF app network duplication</strong></td><td>Duplicate a configurable percentage of egress packets from an app instance so you can validate idempotency and deduplication logic.</td><td><span data-option="UX59v8Sv">cf, </span><span data-option="ztSKzP2q">cloud-foundry, </span><span data-option="cj0_smAF">app, </span><span data-option="L4-P0uTt">network, </span><span data-option="Hcw47TAP">duplication</span></td><td><a href="#cf-app-network-duplication">#cf-app-network-duplication</a></td></tr></tbody></table>

#### CF app stop <a href="#cf-app-stop" id="cf-app-stop"></a>

CF app stop stops a Cloud Foundry app for a configurable duration and then re-starts it. Use it to validate how the platform, routers, and downstream consumers behave when an app goes offline cleanly.

Use cases

* Validate consumer fallbacks and retries when the app returns 5xx from the CF router.
* Confirm CF restarts the app and reports it healthy after `duration` elapses.
* Tune alert thresholds around route-level health checks.

<a href="/resilience-testing/chaos-engineering/faults/chaos-fault-categories/cloud-foundry/cf-app-stop.md" class="button primary">View details</a>

#### CF app container kill <a href="#cf-app-container-kill" id="cf-app-container-kill"></a>

CF app container kill terminates the container of one or more app instances and lets Cloud Foundry reschedule them. Use it to validate platform self-healing and peer absorption.

Use cases

* Confirm peer instances absorb traffic while the killed instance is rescheduled.
* Validate Diego restarts the instance inside its expected window.
* Verify in-flight requests fail cleanly so callers retry.

<a href="/resilience-testing/chaos-engineering/faults/chaos-fault-categories/cloud-foundry/cf-app-container-kill.md" class="button primary">View details</a>

#### CF app route unmap <a href="#cf-app-route-unmap" id="cf-app-route-unmap"></a>

CF app route unmap detaches a specific route from an app for a configurable duration, then re-maps it. The app keeps running; only its inbound route is disrupted.

Use cases

* Validate gateway and consumer behavior when a route returns 404 from the CF router.
* Confirm secondary routes mapped to the same app continue serving.
* Practice runbooks for accidental route removal.

<a href="/resilience-testing/chaos-engineering/faults/chaos-fault-categories/cloud-foundry/cf-app-route-unmap.md" class="button primary">View details</a>

#### CF app JVM CPU stress <a href="#cf-app-jvm-cpu-stress" id="cf-app-jvm-cpu-stress"></a>

CF app JVM CPU stress drives high CPU usage inside the JVM of a Java app instance for a configurable duration. Use it to test the app and autoscaler under sustained CPU pressure.

Use cases

* Measure latency under CPU saturation.
* Validate autoscaling rules trigger and pull traffic away from the stressed instance.
* Surface thread-pool and concurrency bugs.

<a href="/resilience-testing/chaos-engineering/faults/chaos-fault-categories/cloud-foundry/cf-app-jvm-cpu-stress.md" class="button primary">View details</a>

#### CF app JVM memory stress <a href="#cf-app-jvm-memory-stress" id="cf-app-jvm-memory-stress"></a>

CF app JVM memory stress drives sustained heap or non-heap memory pressure inside the JVM of a Java app instance. Use it to test GC behavior and `OutOfMemoryError` handling.

Use cases

* Surface long GC pauses under heap pressure.
* Detect runaway metaspace consumption with non-heap pressure.
* Validate memory-based autoscaling.

<a href="/resilience-testing/chaos-engineering/faults/chaos-fault-categories/cloud-foundry/cf-app-jvm-memory-stress.md" class="button primary">View details</a>

#### CF app JVM trigger GC <a href="#cf-app-jvm-trigger-gc" id="cf-app-jvm-trigger-gc"></a>

CF app JVM trigger GC forces a full garbage-collection cycle inside the JVM of a Java app instance. Use it to measure stop-the-world pause times and validate that health checks tolerate them.

Use cases

* Quantify worst-case GC pause time.
* Confirm liveness/readiness probes do not falsely fail during a full GC.
* Measure the tail-latency cost of a GC under production-shaped traffic.

<a href="/resilience-testing/chaos-engineering/faults/chaos-fault-categories/cloud-foundry/cf-app-jvm-trigger-gc.md" class="button primary">View details</a>

#### CF app JVM method exception <a href="#cf-app-jvm-method-exception" id="cf-app-jvm-method-exception"></a>

CF app JVM method exception forces a specific JVM method to throw a configurable exception. Use it to validate error-handling paths, retry budgets, and circuit-breaker behavior.

Use cases

* Confirm catch blocks map the exception to the right user-visible response.
* Validate retry and circuit-breaker thresholds.
* Test observability tags for the configured exception class.

<a href="/resilience-testing/chaos-engineering/faults/chaos-fault-categories/cloud-foundry/cf-app-jvm-method-exception.md" class="button primary">View details</a>

#### CF app JVM method latency <a href="#cf-app-jvm-method-latency" id="cf-app-jvm-method-latency"></a>

CF app JVM method latency adds artificial delay to every invocation of a specific JVM method. Use it to simulate a slow downstream call at the method boundary.

Use cases

* Tune timeouts to trip before the user-visible SLO is breached.
* Quantify the latency contribution of a single slow method.
* Validate caller retry budgets do not amplify the slowdown.

<a href="/resilience-testing/chaos-engineering/faults/chaos-fault-categories/cloud-foundry/cf-app-jvm-method-latency.md" class="button primary">View details</a>

#### CF app JVM modify return <a href="#cf-app-jvm-modify-return" id="cf-app-jvm-modify-return"></a>

CF app JVM modify return overrides the return value of a specific JVM method. Use it to test defensive checks and fallbacks against unexpected values like `null` or wrong-type returns.

Use cases

* Validate null-safety in callers of a non-null method.
* Force a feature flag off by overriding its accessor.
* Simulate a poisoned cache layer.

<a href="/resilience-testing/chaos-engineering/faults/chaos-fault-categories/cloud-foundry/cf-app-jvm-modify-return.md" class="button primary">View details</a>

#### CF app network latency <a href="#cf-app-network-latency" id="cf-app-network-latency"></a>

CF app network latency adds a configurable amount of latency (with optional jitter) on the egress traffic of an app instance. Use it to simulate a slow downstream dependency at the network layer.

Use cases

* Simulate a slow database or third-party API.
* Quantify how added round-trip time affects user-visible P99.
* Approximate cross-region latency to test caching decisions.

<a href="/resilience-testing/chaos-engineering/faults/chaos-fault-categories/cloud-foundry/cf-app-network-latency.md" class="button primary">View details</a>

#### CF app network loss <a href="#cf-app-network-loss" id="cf-app-network-loss"></a>

CF app network loss drops a configurable percentage of egress packets from an app instance. Use it to test retransmissions, timeouts, and circuit-breaker behavior under packet loss.

Use cases

* Validate the app's retry budget on a flaky downstream.
* Confirm circuit breakers open at the configured loss rate.
* Test alert tuning for elevated TCP retransmissions.

<a href="/resilience-testing/chaos-engineering/faults/chaos-fault-categories/cloud-foundry/cf-app-network-loss.md" class="button primary">View details</a>

#### CF app network corruption <a href="#cf-app-network-corruption" id="cf-app-network-corruption"></a>

CF app network corruption corrupts a configurable percentage of egress packets from an app instance. Corrupted packets are discarded by the receiver, triggering retransmissions.

Use cases

* Quantify retransmission overhead on end-to-end latency.
* Test protocol parsers reject malformed frames cleanly.
* Validate L4 monitoring detects elevated retransmission rates.

<a href="/resilience-testing/chaos-engineering/faults/chaos-fault-categories/cloud-foundry/cf-app-network-corruption.md" class="button primary">View details</a>

#### CF app network duplication <a href="#cf-app-network-duplication" id="cf-app-network-duplication"></a>

CF app network duplication duplicates a configurable percentage of egress packets from an app instance. Use it to validate idempotency assumptions and deduplication logic.

Use cases

* Confirm duplicate HTTP requests do not cause double writes.
* Validate deduplication keys on message-bus consumers.
* Test that UDP receivers tolerate duplicate datagrams.

<a href="/resilience-testing/chaos-engineering/faults/chaos-fault-categories/cloud-foundry/cf-app-network-duplication.md" class="button primary">View details</a>

{% @harness-feedback/feedback %}
