# Test on a slow network

> Simulate 3G, high latency and packet loss for one host with Network Conditions, watch the effect in the timeline, and turn it off afterwards.

Source: https://docs.subcloak.com/cloak-proxy/guides/test-on-a-slow-network/

Your app feels fine on your office Wi-Fi, but you need to know how it behaves on a train. This guide slows one host (or everything) down to 3G, high latency, or intermittent packet loss with the **Network Conditions** tool, confirms the effect in the traffic list and timeline, and turns it off cleanly.

## What you need

| | |
|---|---|
| Cloak Proxy capturing the app you want to test | See [macOS traffic](https://docs.subcloak.com/cloak-proxy/capture/macos-traffic/) or [Debug a mobile app](https://docs.subcloak.com/cloak-proxy/guides/debug-a-mobile-app/) |
| HTTPS decrypted for the host, if you want per-host throttling to match it | See [SSL Proxying](https://docs.subcloak.com/cloak-proxy/capture/ssl-proxying/) — throttling matches by URL, which needs the request decrypted |

> **Note:**
> Network Conditions throttles traffic that goes **through Cloak Proxy**. It shapes the proxy's own transfer timing; it does not change the device's radio or the operating system's networking.

## Add a condition for one host

1. Capture a request to the host, right-click it, and choose **Tools → Network Conditions…**. The rule is created matching that host (wildcard, subpaths included) and the tool is turned on.

   You can also open **Tools → Network Conditions** (`<kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>T</kbd>`) and add a rule by hand.

   *[Screenshot: The Network Conditions tool with a rule matching api.example.com and a 3G profile set to 300 ms latency, 780 kbps down, 330 kbps up. A Network Conditions rule using the 3G preset.]*

2. Pick a preset from the **Profile** menu, or set the numbers by hand. Changing a value relabels the profile **Custom**.

   | Preset | Latency | Download | Upload | Packet loss |
   |---|---|---|---|---|
   | **100% Loss** | 0 ms | 0 | 0 | 100% |
   | **Very Bad Network** | 500 ms | 1000 kbps | 1000 kbps | 10% |
   | **Edge** | 400 ms | 240 kbps | 200 kbps | 0% |
   | **3G** | 300 ms | 780 kbps | 330 kbps | 0% |
   | **DSL** | 50 ms | 2000 kbps | 256 kbps | 0% |
   | **LTE** | 50 ms | 50000 kbps | 10000 kbps | 0% |
   | **Wi-Fi** | 2 ms | 40000 kbps | 33000 kbps | 0% |

   Set **Download** or **Upload** to `0` for unlimited. **Packet loss** is the percentage of matching requests that fail as if the network dropped them.

> **Tip:**
> Requests are delayed by half the latency on the way out and half on the way back, plus transfer time at the given speeds. So a 300 ms latency adds about 300 ms round trip, and a 1 MB body at 780 kbps adds roughly 10 seconds of download.

## Slow everything down

To throttle all traffic rather than one host, set the rule's matcher to `*`:

1. In the rule's matcher, set the URL to `*` and leave **Include subpaths** on.

2. Choose a profile. Every request through the proxy is now shaped.

## See the effect

1. Use the app and watch the **Duration** column in the traffic list climb. Throttled requests are tagged **Network Conditions**.

2. With **Packet loss** above 0, some requests fail outright — they show as failed in the list, which is how the app would see a dropped connection.

3. Open **Insights** (`<kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>I</kbd>`) and the **Timeline** tab to see every request on one time axis, so you can spot the requests that now dominate the load time.

4. The **Performance** tab flags **Slow** responses, which helps you find what suffers most under the condition.

   *[Screenshot: The Insights Performance tab listing slow, error, burst, uncacheable, uncompressed and duplicate findings. Performance findings. Slow requests rise to the top under a throttle.]*

## Clean up

1. Turn off **Network Conditions** with the switch in the Tools window, or untick it in the **Tools** menu, so traffic runs at full speed again.

2. Leave the rule in place to reuse it later, or select it and press the minus button to delete it.

> **Caution:**
> It's easy to forget a throttle is on and chase a "slow server" that is really the 3G preset. The **N tools on** button in the bottom bar counts it while it's on: hover it to see **Network Conditions** listed, or click it to switch the tool off.

## Related

  - [Network Conditions](https://docs.subcloak.com/cloak-proxy/tools/network-conditions/): Latency, speed, packet loss and the built-in presets.
  - [Timeline](https://docs.subcloak.com/cloak-proxy/insights/timeline/): Every request on one time axis, with zoom.
  - [Performance](https://docs.subcloak.com/cloak-proxy/insights/performance/): Slow, large, duplicate and N+1 findings.
  - [Rules and matching](https://docs.subcloak.com/cloak-proxy/tools/rules-and-matching/): Match one host, a path, or everything with wildcards.
