Repository navigation
Description
I've noticed that the download speed varies significantly depending on file size:
Platform: Android
App Version: Latest version and also previous versions
Mode: Full Tunnel
• Large files (>10 MB): Download at a decent speed
• Small files (<10 MB): Download speed is capped around 50-80 KB/s
I tested this in Telegram as well:
• When downloading a big file, it starts by downloading a 512 KB chunk and then continues with a decent speed
• For smaller files, it starts with a 32 KB chunk and the speed is limited to 50-80 KB/s
However, if I simultaneously start downloading multiple small files, the speed multiplies for each file:
• 2 files (5 MB each): speed increases to 100-160 KB/s
• 4 files: speed increases to ~300 KB/s
Is there a way to fix this so that smaller files also download quickly?
I'm using full tunnel mode.
Extra note: Using the download speed boost option in unofficial Telegram clients improves the download speed for both small and large files. However, there's still a difference between the download speed of small and large files.
Logs attached:
• 1mb.txt — log for 1 MB worth of video from a 6 MB video in Telegram (download speed boost was on, speed ~50 KB/s)
• 13.9mb.txt — log for a 13.9 MB video in Telegram (download speed boost was on, speed ~300-600 KB/s)
One more note:
I believe this behavior may not be universal across all apps/websites. For example:
• Downloading 6 MB from Cloudflare's speedtest — speed was good
• Downloading from Instagram — the slow-down behavior can be observed. in fact, all videos with all sizes load slowly. but in the web version the behavior is different and needs further checks
edit: the web version of Instagram is fine. i guess the web version of telegram should be fine too.
Activity
dazzling-no-more commentedon May 12, 2026
What mode are you on? Can you share the logs?
letmeinbruh13 commentedon May 12, 2026
@dazzling-no-more I'm using full tunnel mode.
Extra note: Using the download speed boost option in unofficial Telegram clients improves the download speed for both small and large files. However, there's still a difference between the download speed of small and large files.
Logs attached:
• 1mb.txt — log for 1 MB worth of video from a 6 MB video in Telegram (download speed boost was on, speed ~50 KB/s)
• 13.9mb.txt — log for a 13.9 MB video in Telegram (download speed boost was on, speed ~300-600 KB/s)
One more note:
I believe this behavior may not be universal across all apps/websites. For example:
• Downloading 6 MB from Cloudflare's speedtest — speed was good
• Downloading from Instagram — the slow-down behavior can be observed. in fact, all videos with all sizes load slowly. but in the web version the behavior is different and needs further checks
edit: the web version of Instagram is fine. i guess the web version of telegram should be fine too.
therealaleph commentedon May 12, 2026
Reviewed via Anthropic Claude.
@letmeinbruh13 — "small files slow, large files fast" on Full mode is consistent with how the batch coalesce works:
This isn't a bug; it's the structural cost of doing each small file in one round-trip. The fix is request batching across multiple small files, which is what Code.gs's spreadsheet cache () addresses for repeat assets — once you've seen the same URL once, subsequent fetches come from the spreadsheet cache instantly. v1.9.23 (just shipped) also has the large-file streaming fix from #1085 that improves throughput for the >40 MiB range.
Tuning that helps small-file throughput today:
parallel_relay: 2(or higher, up to your script_id count): fan out small requests across multiple deployments for first-byte latency improvementcoalesce_max_ms: 2000: pack more concurrent small-file requests into one batchscript_identries from different Google accounts: round-robin reduces per-deployment quota pressureFor HTTP API calls (REST endpoints returning JSON, etc.) which are intrinsically small-file requests, 50-80 KB/s in Full mode is roughly what Apps Script's per-request RTT allows. Switching to apps_script mode (no tunnel-node middleman) usually helps for those — one less layer.
Closing — expected behavior. If you're seeing speeds much worse than 50-80 KB/s for small files (e.g. sub-10 KB/s) that's separate and worth a new issue with timing data.
letmeinbruh13 commentedon May 12, 2026
@therealaleph I understand the need for lower latency with smaller files, but some types of files fall into a gray area. For example, most Instagram and Telegram videos are well below 10 MB, and to watch a 30-second video, sometimes we have to wait 140 seconds for it to load completely. Isn't there a way to make certain file formats or specific services like Instagram/Telegram use the batch-request path you mentioned to make watching videos a smoother experience in full tunnel mode?
fix(tunnel): batch header read honors request_timeout_secs (#1088, #1108
chore(release): v1.9.24 — fix timeout cascade + Cloud Run docker build (