How to Limit Residential Proxy Bandwidth in Playwright & Crawlee

Stop residential proxy overages using byteBudgetMb hard caps, automatic datacenter fallback, RAM static caching, and ultra_lite resource filtering.

1. Enforce a hard megabyte cap (byteBudgetMb)

Metered residential proxies charge per gigabyte, and an unguarded Playwright script loading product galleries or third-party ad frames can burn hundreds of megabytes in minutes. src/residentialPool.js measures actual wire bytes multiplied by overheadFactor and writes rolling usage to data/residential-usage.json.

"proxy": {
  "enabled": true,
  "tier": "residential",
  "residential": {
    "enabled": true,
    "byteBudgetMb": 1000,
    "country": "us",
    "overheadFactor": 1.15
  },
  "fallbackServers": [
    "http://<user>:<pass>@<datacenter-host>:<port>"
  ]
}

Once usedMb >= byteBudgetMb, subsequent sessions automatically route through fallbackServers (static datacenter) or stop cleanly.

2. Choose lite or ultra_lite resource mode

ModeNetwork PolicyAnalytics (GA4/GTM)Best For
fullLoads all images, fonts, video, and CSSActiveVisual QA & full-page screenshots
liteRAM cache for JS/CSS + blocks heavy media & third-party trackersActiveBalanced QA with 60–80% less traffic
ultra_liteHTML, core JS & CSS only + RAM static asset cacheActiveHigh-volume runs on strict GB caps

3. Verify failover rules offline before spending 1 MB

Run the built-in zero-spend verification suite after editing your proxy configuration:

node tests/verify-proxy-resolution.js
node tests/verify-residential.js

Pair bandwidth-controlled QA runs with CitedCart or CitedCart Tools to verify storefront markup at minimal transfer cost.

Frequently asked questions

Does ultra_lite mode break Google Analytics 4 hit verification?

No. Both lite and ultra_lite keep core HTML, first-party JS, and GA4/GTM beacons active while blocking heavy media, fonts, and unrelated trackers.

What happens when residential bandwidth hits byteBudgetMb?

Traffic Engine switches remaining visits to proxy.fallbackServers if configured, or stops cleanly with zero overage.