Rust Systems Architecture & Concurrency
Engine Architecture & Features
Explore the engineering behind AeroLoad: dynamic HTTP Range segmentation, automatic work-stealing, lossless FFmpeg muxing, and hardened local IPC.
PARALLEL TCP ACCELERATION
Dynamic HTTP Range Request Segmentation
When adding a download, AeroLoad queries the remote server with an initial HEAD or speculative range probe. If the server advertises Accept-Ranges: bytes and returns HTTP 206, the file is dynamically partitioned into 1 to 32 worker tasks streaming across independent TCP connections.
Maximizes socket utilization across high-speed gigabit and fiber broadband.
Streams bytes directly into separate .part files on disk to prevent unbounded memory spikes.
Automatically falls back to single-stream downloading if the server rejects byte ranges.
Technical Specifications
Concurrency Limit
1 – 32 worker sockets per task
Buffer Architecture
Zero-copy streaming direct-to-disk
Range Header
Range: bytes={start}-{end}
src-tauri/src/engine/downloader.rs
// Spawn multi-connection HTTP range worker pool
let chunk_size = total_bytes / worker_count;
for i in 0..worker_count {
let start = i * chunk_size;
let end = if i == worker_count - 1 { total_bytes - 1 } else { start + chunk_size - 1 };
let part_path = temp_dir.join(format!("{}_part_{}.part", download_id, i));
tokio::spawn(run_range_worker(client.clone(), url.clone(), start, end, part_path));
}Compiled with Rust Tokio & Tauri v2Zero Unsafe Blocks