frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: We dropped Go for Rust in our real-time telephony AI media plane

3•bajpailabs•1d ago
In building Vivik, an execution-grade telephony AI engine, we faced a brutal constraint: the human conversational loop.

In psychoacoustics, a delay under 250 ms feels instantaneous. At 500 ms, users notice lag. Beyond 800 ms, conversations start feeling strained, and by 1.5 seconds, the illusion of real-time interaction collapses.

That creates an extremely tight latency budget for voice AI:

• Network RTT: 50–200 ms • LLM inference: 200–800 ms • TTS synthesis: 100–400 ms • ASR processing: 100–300 ms

To consistently stay under a sub-500 ms SLA, the orchestration and media layers themselves must add almost no overhead.

We initially built the entire system in Go. It worked well for concurrency and distributed orchestration, but under production-scale load, we hit an architectural wall: non-deterministic GC tail latency.

The Media Plane processes raw PCM audio in strict 20 ms frames. Even tiny scheduling delays create audible jitter, packet drift, and conversational instability.

Under a 25,000 RPS stress test:

• Go implementation → P99 latency: 1,550 ms • Rust (Tokio) implementation → P99 latency: 310 ms

The issue wasn’t average latency. It was the tail.

Even highly optimized GC pauses become catastrophic in real-time telephony. A tiny scheduler interruption under heavy throughput creates queue backpressure that cascades across live audio streams. In practice, a 1.5-second spike means the system goes silent mid-sentence.

We solved this by separating the architecture into two isolated worlds:

1. Control Plane (Go + NATS) Handles orchestration, routing, distributed state, and API coordination. Managed GC is acceptable here because it never touches live media streams.

2. Media Plane (Rust) Handles resampling, low-pass filtering, VAD, and packet-level audio processing with deterministic memory behavior.

Rust’s ownership model eliminates the need for a background garbage collector entirely. Allocation and deallocation are resolved at compile time, allowing the Media Plane to maintain a flat latency profile even under sustained throughput.

We also eliminated traditional synchronization primitives.

Mutexes in real-time audio systems introduce priority inversion risks that immediately surface as glitches or packet jitter. Instead, the engine relies on fully lock-free communication patterns:

• SPSC ring buffers for PCM transfer between socket and DSP threads • Michael-Scott queues using atomic CAS operations for multi-producer coordination

Rust’s SIMD support additionally allowed us to leverage AVX-512 and ARM NEON instructions to process multiple audio samples per instruction cycle, significantly increasing call density per CPU core.

The takeaway: managed runtimes are exceptional for distributed systems and asynchronous I/O. But once your workload crosses into hard real-time media constraints and human perceptual boundaries, averages stop mattering. Tail latency becomes the entire system.

By separating orchestration from deterministic signal processing, we reduced P99 latency from 1,550 ms to a stable 310 ms under load.

Our full engineering breakdowns, including the mathematical foundations behind our O(n) dual-gate VAD signal logic, are detailed in the Vivik whitepaper:

https://vivik.bajpailabs.com/whitepaper

Would love to hear how others are approaching real-time media constraints alongside LLM execution boundaries.

Brethof-mind – local long-term memory for Claude Code (SurrealDB, no API)

https://github.com/BrethofAI/brethof-mind
1•brethofai•52s ago•0 comments

Self-Hosting a Forgejo Runner for Codeberg Actions

https://hmmr.online/posts/codeberg-forgejo-runner/
1•ZanderHammer•1m ago•0 comments

I have no mouth, and I must scream [pdf]

https://galacticjourney.org/stories/I_Have_No_Mouth_and_I_Must_Scream_-_Harlan_Ellison.pdf
1•ig1201•1m ago•0 comments

You Are Optimizing for the Wrong Metric

https://lucaspauker.com/articles/optimizing-for-the-wrong-metric/
1•lucaspauker•1m ago•0 comments

I use Obsidian and Hermes: Actual use cases and setup

https://metedata.substack.com/p/013-my-hermes-and-obsidian-set-up
2•young_mete•1m ago•0 comments

Luddite Lab

https://labor.dair-institute.org/about
1•monkaiju•1m ago•0 comments

Plex's Lifetime Pass is (basically) dead

https://gardinerbryant.com/plexs-lifetime-pass-is-basically-dead-heres-how-to-switch-to-jellyfin/
1•thunderbong•3m ago•0 comments

Tiny Flies Survive, Even Thrive on Snow

https://nautil.us/these-tiny-flies-survive-even-thrive-on-snow-1281133
1•Brajeshwar•4m ago•0 comments

SchemaVault DB Version Control

https://github.com/EvanPaules/SchemaVault
1•ep13•4m ago•1 comments

Supply chain attacks don't wait for CVEs

https://www.mendral.com/blog/supply-chain-attacks-dont-wait-for-cves
1•shad42•5m ago•0 comments

Eleven years later, my Lenovo G50 is still going strong

https://www.dedoimedo.com/computers/lenovo-g50-eleven-years.html
1•speckx•5m ago•0 comments

Kubernetes in Anger

https://samof76.space/kubernetes-in-anger.html
1•birdculture•5m ago•0 comments

LLemdashes

https://wil.to/posts/llemdashes/
1•birdculture•10m ago•0 comments

USCIS bombshell forcing green card applicants to file outside the country [pdf]

https://www.uscis.gov/sites/default/files/document/memos/PM-602-0199-AdjustmentOfStatusAndDiscret...
2•bokchoi•10m ago•1 comments

Magic the Gathering format: Fun 40

https://fabiensanglard.net/mtg/fun//index.html
1•cyanbane•12m ago•0 comments

GoMotz – a lightweight, self-hosted network monitoring tool for Raspberry Pi

1•melson•13m ago•0 comments

25 years of fashion data: diversity rose, but the mean model body didn't change

https://www.pnas.org/doi/10.1073/pnas.2602380123
2•falconer2vi•14m ago•0 comments

What Is Media over QUIC Streaming and How Is It Different from Other Protocols?

https://www.red5.net/blog/what-is-moq-media-over-quic/
2•mondainx•15m ago•0 comments

MathML 4.0

https://www.w3.org/TR/mathml4/
1•tosh•15m ago•0 comments

Ibis

https://ibis-project.org/
1•tosh•16m ago•0 comments

The $58,000 TV bill: When DirecTV sued O.J. Simpson for piracy

https://arstechnica.com/tech-policy/2026/05/the-58000-tv-bill-when-directv-sued-o-j-simpson-for-p...
2•Brajeshwar•19m ago•0 comments

OpenClaw as the Universal Operating System for Agents

https://bit.kevinslin.com/p/openclaw-as-the-universal-operating
1•kevinslin•20m ago•0 comments

Why Japanese companies do so many different things

https://davidoks.blog/p/why-japanese-companies-do-so-many
32•d0ks•20m ago•4 comments

Don't put aria-label on generic elements like divs

https://www.matuzo.at/blog/2026/aria-label-generic-elements
1•cyanbane•21m ago•0 comments

"I'm Mad as Hell" scene from Network (1976) [video]

https://www.youtube.com/watch?v=_RujOFCHsxo
1•rglover•21m ago•0 comments

Making my tokens Drought Proof

https://blog.bix.computer/blog/routing-around-token-drought/
1•two-sandwich•22m ago•1 comments

Genetic analysis of circulating metabolic traits in 619,372 individuals

https://www.nature.com/articles/s41586-026-10532-5
1•bookofjoe•22m ago•0 comments

My own vxsort re-implemented with "modern" C++

https://github.com/damageboy/vxsort-cpp
1•tosh•22m ago•0 comments

Mp4 Conv New Innovation

https://tulix.com/mp4conv/
1•TheSolution1•24m ago•0 comments

Aldus Manutius

https://en.wikipedia.org/wiki/Aldus_Manutius
1•simonebrunozzi•24m ago•0 comments