Skip to content
ashlonk
Why Ashlonk Voice Security Blog Support
العربية Get Ashlonk
Blog

How a voice note survives a bad network

15 July 2026 · by Engineering · 6 min read

The demo network in every messaging app’s launch video is a fibre line in an office. Ours is a basement in Karrada with one bar of 3G that comes and goes with the generator. This is what we do about it.

On this page
  1. Start with the size
  2. Upload in pieces, not in one breath
  3. The queue that outlives the app
  4. What we do not do
  5. Measuring it

01Start with the size

A voice note is speech, and speech is forgiving. We encode with Opus at 12–16 kbps in voice mode, which lands at roughly 12 KB per ten seconds — a one-minute note is about the size of a small photo. On a struggling connection the encoder steps down to 8 kbps rather than failing. You hear a slightly thinner voice; you do not see a red exclamation mark.

02Upload in pieces, not in one breath

The recording is encrypted and split into chunks of about 20 KB as you speak. Each chunk uploads independently and resumes independently. When the network drops at chunk 7 of 9, we do not start again from chunk 1 when it returns — we send 8 and 9. On a network that flickers every few seconds, this is the difference between a note that sends and one that never does.

03The queue that outlives the app

Everything you send goes into a durable on-device queue first. The queue survives closing the app, rebooting the phone and Android’s battery optimiser. A background worker wakes on connectivity changes and drains the queue in order. The message stays "clock" until the server acknowledges it, then becomes one tick — and that transition is honest: one tick means our server has it, not that we hope it does.

04What we do not do

  • We do not time out and fail a message after N seconds. A queued message is queued until it sends or you delete it (or 30 days pass).
  • We do not silently downgrade encryption to save bytes. Ciphertext is the same size as plaintext plus a small constant; there is nothing to gain.
  • We do not retry aggressively. Backoff is exponential with jitter, so a thousand phones coming back online after a power cut do not knock over the tower a second time.

05Measuring it

We test on real Iraqi SIMs with throttling profiles recorded from actual sessions — not simulated "3G" presets. The number we watch is not average latency but the 95th-percentile time-to-one-tick for a ten-second voice note. When we launched internal testing it was 41 seconds on the worst profile. It is now under 9. The goal is that you never think about it.

ashlonkأشلونك؟ Made in Baghdad, for everywhere.
العربية
© 2026 ashlonk · +964
Explore Voice notes Groups Calls Security Get the app
Company About Blog Marketing & Press Transparency report Security Hall of Fame
Help Support Community guidelines Delete your account Accessibility
Legal Privacy Policy Terms and Conditions Copyright