QANEN logoQANEN
PhilosophyApproachVisionAboutProductsBlogContact
Contact
  1. Home/
  2. Blog/
  3. Adaptive concurrency: tuning a download engine that behaves itself
Performance

Adaptive concurrency: tuning a download engine that behaves itself

How many parallel connections should a downloader open? The honest answer is 'it depends', which is why the interesting engineering is in how the number changes over time rather than what it is set to.

QANEN Engineering·October 2, 2026·7 min read

Why 'more threads' is the wrong instinct

The easiest way to make a download faster in a benchmark is to open every connection you can. The easiest way to make it slower in the real world is the same thing. Servers throttle aggressive clients, home connections saturate, and a hundred parallel requests fighting for the same pipe each get less than four well-behaved ones.

Concurrency is not a dial to turn up; it is a value to track, because the right number changes every few seconds depending on the network, the server, and what else you are doing.

The 2 to 12 ladder

Our engine starts small — at four workers — and only climbs when the data says there is headroom. Workers step up through a fixed ladder (2, 4, 6, 8, 10, 12) based on two signals: measured throughput and the rate of fragment errors. If adding workers keeps adding bytes per second and errors stay low, the engine takes another rung. If throughput flattens or errors tick up, it stops climbing.

Hysteresis: stopping the oscillation

A naive controller that scales up above 1 MB/s and down below 1 MB/s will flip between the two every second — a classic control-systems failure. The fix is hysteresis: different thresholds for going up than for coming down, and a minimum dwell time before any change. The engine would rather be slightly conservative and stable than constantly chasing its own tail.

Reading the signal, not just the speed

Instantaneous speed is noisy. A single slow second does not mean the server is throttling you; a single fast second does not mean you have headroom. The engine keeps both an instant and a rolling average, and makes its decisions on the rolling figure, so a momentary blip never triggers a change in worker count.

Knowing when to back off

The ceiling is not just about speed. Fragment error rates — timeouts, reset connections, 503s — are the clearest sign that you are asking for more than the server wants to give. When errors rise, the ladder goes down regardless of throughput. Being gentle is not just polite; against most throttling schemes it is also faster.

performanceconcurrencycontrol systemsYDM

Keep reading

  • More from the QANEN blog → all articles
  • The software behind these ideas → our products
  • How we build → our approach
Contact

We're building with intention.

QANEN is a young company with a long-term view. If our philosophy resonates — whether as a future user, partner or collaborator — we'd be glad to hear from you.

hello@qanen.siteContact page
QANEN logoQANEN

Quality Engineering for Next-Gen Experiences and Networks. QANEN is a next-generation technology company practicing quality engineering and human-centered design to build useful, accessible, exceptionally well-engineered technology — for the long term.

Company

  • Home
  • Philosophy
  • Approach
  • Vision
  • About
  • Products
  • Blog

Products

  • All products
  • YDM
  • OptiSqueeze
  • Tools Kit

Blog

  • All articles
  • How resumable downloads actually work
  • Why we compress images entirely in your browser
  • Adaptive concurrency: tuning a download engine that behaves itself
  • Designing honest software: what a 'last verified' date teaches us about trust
  • Stream copy, not re-encode: why we never touch your video's pixels
  • What 'works offline' actually requires
  • Clipboard detection without the creepiness

Connect

  • Contact
  • Email

Legal

  • Privacy Policy
  • Terms of Use
© 2026 QANEN. All rights reserved.Useful. Accessible. Engineered properly.

We use cookies to run the site, understand how it is used and — with your consent — to serve personalised Google ads. See our Privacy Policy.