justusecurl
← All posts
4 min read Benchmarks

Why 128 MB Containers and Valid-Record Billing Change Web Data Economics

Live Apify Cloud benchmarks across Reddit, US Amazon, and US Walmart showing how eliminating browser container overhead and unvalidated charges cuts data bills by 50–65%.

Most developers shopping for marketplace or social data on Apify run into the same surprise on their first production invoice: the advertised per-record price is only half the story.

Default Actors often allocate 2 GB to 4 GB of RAM per run, tack on per-run start fees, and bill for every attempted target — including 404 product pages, retired listings, empty payloads, and duplicate sightings across paginated feeds.

When we designed the four justusecurl Wave 1 Actors, we set two hard constraints:

  1. Every Actor must run comfortably inside Apify's smallest 128 MB memory tier.
  2. Every record must pass schema validation and deduplication before Actor.pushData() is called — unavailable items, gated categories, and upstream retries always cost $0.00.

Live 128 MB Cloud Benchmarks

Before publishing, we benchmarked all four live Actors on Apify Cloud at 128 MB across realistic customer workloads (multi-page feeds, concurrent runs, and full PDP + seller enrichment):

Actor Workload Tested Valid Records Wall Time Peak RAM (128 MB limit)
justusecurl/amazon-products 2-page Best Sellers + 40 full US PDPs (conc=6) 40 / 40 (39 AI insights) 45.7s 41.9 MB
justusecurl/walmart-products 2 brands (Dyson, Ninja), 100 full PDPs + sellers 99 / 99 (1 retired skipped) 82.1s 49.6 MB
justusecurl/walmart-sellers 3 brands (Ninja, Shark, KitchenAid), 120 listings 28 unique 3P leads (28/28 email + phone) 92.9s 54.6 MB
justusecurl/reddit-scraper 4-page sort=new pagination (r/technology) 75 / 75 posts 8.4s 35.3 MB

Two engineering details stood out immediately in those runs:

1. Memory stays below 55 MB even on 100-item runs

Because each Actor is a thin container backed by our managed extraction API, peak memory stayed between 35 MB and 55 MB — leaving over half the 128 MB container free and keeping Apify compute unit costs to fractions of a penny per run.

2. Batching dataset writes eliminated 48+ seconds of idle time

Our first 100-item Walmart run finished upstream extraction in under a minute, yet took 130.6s total inside the Actor. The culprit wasn't extraction — it was pushing 99 records serially (await Actor.pushData(item, eventName) one HTTP round-trip at a time).

Switching to validated, deduplicated 25-record batch pushes cut the same 100-item run down to 82.1s (dropping push overhead from ~78s to ~3s) while keeping exact 1:1 Pay-Per-Event billing (99 valid items pushed, 99 events billed) and honoring partial eventChargeLimitReached stops cleanly.

Documenting Limits Upfront

Silent partial data is worse than an explicit boundary. Every Actor README and landing card lists exact scope limits before you spend a cent:

  • Amazon: Public signed-out US amazon.com pages only — includes Buy Box, variants, star histogram, and Amazon's AI customers_say review summary, while excluding login-gated paginated /product-reviews/.
  • Walmart: Browse categories, brand facets (exact Walmart capitalization, e.g., DEWALT), numeric seller storefronts, and item URLs — national online pricing, 1,000-item Walmart browse grid cap, and zero billing on Walmart's gated Toys subcategories.
  • Reddit: Public communities, search, user profiles, and nested comment trees in Pushshift / Arctic Shift JSON shape — nonexistent or age-gated subreddits return clean 404 skips without billing.

All four Actors are live on Apify Store with automatic 50%–52.5% volume discounts on Business and Enterprise Apify tiers.