<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-we-moved-discord-voice-to-the-edge-xeeigwjrp" -->

---
title: How We Moved Discord Voice to the Edge | daily.dev
description: Discord migrated over 80% of its voice and video traffic from a hyperscaler-based provider onto Cloudflare's edge network spanning 300+ PoPs, aiming to reduce...
canonical: https://daily.dev/posts/how-we-moved-discord-voice-to-the-edge-xeeigwjrp
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How We Moved Discord Voice to the Edge | daily.dev
og:description: Discord migrated over 80% of its voice and video traffic from a hyperscaler-based provider onto Cloudflare's edge network spanning 300+ PoPs, aiming to reduce...
og:url: https://daily.dev/posts/how-we-moved-discord-voice-to-the-edge-xeeigwjrp
og:image: https://api.daily.dev/og/posts/XeEigwjRP.png
og:image:alt: How We Moved Discord Voice to the Edge
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How We Moved Discord Voice to the Edge

**[Lobsters](https://daily.dev/sources/lobsters)** · 15 min read · 1 upvotes · 0 comments

## Summary

Discord migrated over 80% of its voice and video traffic from a hyperscaler-based provider onto Cloudflare's edge network spanning 300+ PoPs, aiming to reduce latency in underserved regions. The rollout surfaced unexpected problems: mixed-region calls got worse when hosted on new local PoPs, an ISP peering bottleneck in Rotterdam caused severe latency spikes for Orange customers, NIC queue contention limited worker density, page-cache flush stalls froze VMs for up to 25 seconds, and a Rust SFU write-starvation bug combined with a softirq scheduling issue on shared Cloudflare VMs caused European ping spikes into 2026. Fixes included a discovery service backed by Valkey, a nine-millisecond flush budget in the Tokio event loop, CPU affinity pinning via taskset, and Cloudflare-side kernel and virtio-net fixes. Frankfurt now shows 34% lower ping and 42% less packet loss versus the prior vendor, with further rollout work planned for Reykjavik and Auckland.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://discord.com/blog/how-we-moved-discord-voice-to-the-edge>

## Questions this post answers

### Why did increasing worker density per host cause packet loss on Cloudflare's container platform?

Running four workers per host caused NIC queue contention because Cloudflare's container runtime did not yet expose multi-queue NICs, so all workers shared a single transmit queue, causing the kernel to drop UDP packets at the send-buffer layer during peak hours. Discord temporarily reduced density to two workers per host until Cloudflare shipped a UDP buffer fix, then scaled to eight workers as the global default by late September 2025.

_Anyone tuning worker-per-host density for UDP-heavy services can find infrastructure war stories like this one on daily.dev._

### What caused Tokio-based event loops to starve outgoing packet sends under high UDP receive load?

A select! event loop with a recv future and a flush timer can starve the flush timer because a non-empty receive buffer keeps the recv future always ready, so it gets polled repeatedly. Tokio's 128-poll yield budget doesn't help because during peak traffic those polls complete within microseconds, letting one thread burn 100% CPU on recv while outgoing sends stall for hundreds of milliseconds. A nine-millisecond budget forcing periodic recv disablement fixed the starvation.

_Developers debugging Tokio async runtime starvation bugs can track similar deep-dive writeups on daily.dev._

### Why did moving a local Cloudflare PoP closer to users sometimes make call quality worse?

Because one server hosts an entire call for its full duration, placing a call host in a newly local PoP like Reykjavik only helped users in that region; non-local participants on the same call saw ping jump 2.7x and packet loss climb 9%, since their packets now had to travel further to reach the host. This showed that host placement, not just PoP coverage, determines call quality for mixed-region calls.

_Teams designing call-routing or host-placement logic for real-time systems can find similar case studies on daily.dev._

## Similar posts on daily.dev

- [Agents Week: network performance update](https://daily.dev/posts/agents-week-network-performance-update-q23bdp8rb) · Cloudflare · 1 upvotes · 0 comments
- [How OpenAI Delivers Low-Latency Voice AI for 900M Users](https://daily.dev/posts/how-openai-delivers-low-latency-voice-ai-for-900m-users-dyatzvnes) · ByteByteGo · 18 upvotes · 2 comments
- [Cloudflare Optimizes Edge Stack for High-Core CPUs Instead of Large Cache](https://daily.dev/posts/cloudflare-optimizes-edge-stack-for-high-core-cpus-instead-of-large-cache-02sdrzwmn) · InfoQ · 0 upvotes · 0 comments

---

Tags: [#distributed-systems](https://daily.dev/tags/distributed-systems), [#cloudflare](https://daily.dev/tags/cloudflare), [#discord](https://daily.dev/tags/discord)

[View this post on daily.dev](https://daily.dev/posts/how-we-moved-discord-voice-to-the-edge-xeeigwjrp)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How We Moved Discord Voice to the Edge","url":"https://daily.dev/posts/how-we-moved-discord-voice-to-the-edge-xeeigwjrp","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-we-moved-discord-voice-to-the-edge-xeeigwjrp"},"datePublished":"2026-08-16T23:50:39.397Z","dateModified":"2026-09-13T19:20:01.000Z","description":"Discord migrated over 80% of its voice and video traffic from a hyperscaler-based provider onto Cloudflare's edge network spanning 300+ PoPs, aiming to reduce...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/34937d49f2b663f1a64b57efac1f6fe1?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/34937d49f2b663f1a64b57efac1f6fe1?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Lobsters","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Lobsters","logo":"https://media.daily.dev/image/upload/s--tl8v_Fku--/f_auto,t_logo/v1698841318/logos/lobste.jpg","url":"https://daily.dev/sources/lobsters"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-we-moved-discord-voice-to-the-edge-xeeigwjrp","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"distributed-systems,cloudflare,discord","timeRequired":"PT15M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Lobsters","item":"https://daily.dev/sources/lobsters"},{"@type":"ListItem","position":3,"name":"How We Moved Discord Voice to the Edge"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-we-moved-discord-voice-to-the-edge-xeeigwjrp#faq","mainEntity":[{"@type":"Question","name":"Why did increasing worker density per host cause packet loss on Cloudflare's container platform?","acceptedAnswer":{"@type":"Answer","text":"Running four workers per host caused NIC queue contention because Cloudflare's container runtime did not yet expose multi-queue NICs, so all workers shared a single transmit queue, causing the kernel to drop UDP packets at the send-buffer layer during peak hours. Discord temporarily reduced density to two workers per host until Cloudflare shipped a UDP buffer fix, then scaled to eight workers as the global default by late September 2025. Anyone tuning worker-per-host density for UDP-heavy services can find infrastructure war stories like this one on daily.dev."}},{"@type":"Question","name":"What caused Tokio-based event loops to starve outgoing packet sends under high UDP receive load?","acceptedAnswer":{"@type":"Answer","text":"A select! event loop with a recv future and a flush timer can starve the flush timer because a non-empty receive buffer keeps the recv future always ready, so it gets polled repeatedly. Tokio's 128-poll yield budget doesn't help because during peak traffic those polls complete within microseconds, letting one thread burn 100% CPU on recv while outgoing sends stall for hundreds of milliseconds. A nine-millisecond budget forcing periodic recv disablement fixed the starvation. Developers debugging Tokio async runtime starvation bugs can track similar deep-dive writeups on daily.dev."}},{"@type":"Question","name":"Why did moving a local Cloudflare PoP closer to users sometimes make call quality worse?","acceptedAnswer":{"@type":"Answer","text":"Because one server hosts an entire call for its full duration, placing a call host in a newly local PoP like Reykjavik only helped users in that region; non-local participants on the same call saw ping jump 2.7x and packet loss climb 9%, since their packets now had to travel further to reach the host. This showed that host placement, not just PoP coverage, determines call quality for mixed-region calls. Teams designing call-routing or host-placement logic for real-time systems can find similar case studies on daily.dev."}}]}
```

