
Kwame Asante
Senior Backend Engineer
Kwame architects high-throughput streaming and real-time systems at Kavod. Former Netflix engineer with deep CDN expertise.
The Challenge of African Video Streaming
When we set out to build BantuStream, we knew we couldn't just copy the playbook from Netflix or YouTube. Those platforms are optimized for markets where the average user has a stable 50+ Mbps connection. In our target markets, the reality is starkly different:
- Average mobile bandwidth in Sub-Saharan Africa: 7.2 Mbps (and that's the average — the median is closer to 3 Mbps)
- Network reliability: frequent drops, high jitter, and congestion during evening peak hours
- Data costs: in many African countries, 1 GB of mobile data costs 3–5% of average monthly income
- Device fragmentation: a significant share of our users watch on Android devices with 2 GB of RAM and ageing chipsets
Building a streaming platform that delivers a great experience under these constraints required us to rethink almost every layer of the stack.
CDN Architecture
Why We Built Our Own
We initially evaluated major CDN providers (Cloudflare, Akamai, AWS CloudFront). While they all have points of presence (PoPs) in Africa, coverage is concentrated in a handful of cities — typically Johannesburg, Nairobi, Lagos, and Cairo. Users in Accra, Dar es Salaam, Kinshasa, or Dakar were being served from PoPs hundreds or even thousands of kilometres away, adding 80–200 ms of latency to every segment request.
We decided to build a hybrid CDN that combines third-party edge capacity in well-served cities with our own micro-PoPs deployed in underserved regions.
Micro-PoPs
A BantuStream micro-PoP is a compact, rack-mountable appliance containing:
- 2 × NVMe SSDs (4 TB each) for content cache
- ARM-based compute (Ampere Altra) running our custom edge software
- Dual 10 GbE uplinks to local ISPs
We co-locate these in local data centres and internet exchange points (IXPs). Each micro-PoP costs roughly $8,000 to deploy — a fraction of what it would cost to build a full PoP — and can serve 2,000 concurrent viewers.
As of March 2026, we operate 23 micro-PoPs across 14 African countries, in addition to leveraging Cloudflare's existing PoPs for overflow.
Content Routing
When a viewer requests a video, our global load balancer determines the optimal edge node using a scoring function that considers:
- Geographic proximity (GeoIP + latency probes)
- Current load on each candidate edge
- Cache hit probability — we predict whether the requested content is likely cached at each edge using a Bloom filter index that each edge reports every 30 seconds
- Network path quality — real-time RTT and loss measurements between the viewer's ISP and each edge
function selectEdge(viewerIp: string, contentId: string): EdgeNode {
const candidates = getEligibleEdges(viewerIp);
return candidates.reduce((best, edge) => {
const score =
0.35 * normalizeLatency(edge.latencyMs) +
0.25 * normalizeLoad(edge.currentLoad) +
0.25 * (edge.bloomFilter.mightContain(contentId) ? 1.0 : 0.0) +
0.15 * normalizePathQuality(edge.pathQuality);
return score > best.score ? { node: edge, score } : best;
}, { node: candidates[0], score: -Infinity }).node;
}If a cache miss occurs at the selected edge, the edge pulls the content from the nearest mid-tier cache (we have three: Johannesburg, Nairobi, Lagos) rather than going all the way to origin. This two-tier caching hierarchy keeps origin load manageable even during viral content spikes.
Adaptive Bitrate Streaming
Encoding Ladder
We encode every piece of content into seven quality tiers using H.265/HEVC (with H.264 fallback for older devices):
| Tier | Resolution | Bitrate | Target Use Case | |---|---|---|---| | 1 | 240p | 200 kbps | Feature phones, 2G fallback | | 2 | 360p | 450 kbps | Low-end smartphones on 3G | | 3 | 480p | 800 kbps | Mid-range phones on 3G/4G | | 4 | 720p | 1.5 Mbps | Smartphones on stable 4G | | 5 | 720p | 2.5 Mbps | Tablets and laptops | | 6 | 1080p | 4.5 Mbps | Good fixed broadband | | 7 | 1080p HDR | 7.0 Mbps | Premium tier, fiber users |
We use per-title encoding via a custom FFmpeg pipeline that analyzes the complexity of each video and adjusts the bitrate ladder accordingly. A low-motion interview might only need 150 kbps at 240p, while a fast-paced football match needs the full 200 kbps.
Client-Side ABR Algorithm
The standard ABR algorithms (BOLA, MPC, Pensieve) were designed for relatively stable broadband connections. In our testing across African mobile networks, they produced excessive quality oscillations — jumping between 240p and 720p multiple times per minute, which is a terrible viewing experience.
We developed BantuABR, a custom algorithm that prioritizes stability over optimality. The key design decisions:
- Longer buffer target: We target a 30-second buffer (vs. the typical 10–15 seconds) to absorb network variability
- Asymmetric switching: Upgrading quality requires sustained bandwidth evidence over 10 seconds; downgrading happens within 3 seconds. This prevents flicker during brief network spikes
- Data budget awareness: The player accepts an optional "data budget" from the user (e.g., "I want to watch for 1 hour and I have 500 MB left on my plan"). The ABR algorithm then caps quality to stay within that budget
class BantuABR {
private bufferTarget = 30; // seconds
private upgradeWindow = 10; // seconds of sustained bandwidth
private downgradeThreshold = 3; // seconds
selectQuality(bandwidth: number, bufferLevel: number, dataBudget?: DataBudget): QualityTier {
const maxTierByBudget = dataBudget
? this.maxTierForBudget(dataBudget)
: QualityTier.MAX;
const maxTierByBandwidth = this.findMaxSustainedTier(bandwidth);
if (bufferLevel < this.downgradeThreshold) {
return Math.max(QualityTier.MIN, this.currentTier - 1);
}
if (bufferLevel > this.bufferTarget && this.sustainedAbove(this.currentTier + 1, this.upgradeWindow)) {
return Math.min(this.currentTier + 1, maxTierByBudget, maxTierByBandwidth);
}
return this.currentTier;
}
}In A/B tests, BantuABR reduced quality switches by 63% compared to the default dash.js ABR, while maintaining an average bitrate within 8% of the theoretical optimum.
Low-Bandwidth Optimization
Beyond ABR, we employ several techniques to reduce data consumption:
Preloading Intelligence
Our recommendation engine predicts what a user is likely to watch next and preloads the first 15 seconds of those videos at the lowest quality tier during idle periods. When the user does select one of those titles, playback starts instantly — and the ABR algorithm upgrades quality as bandwidth allows.
Audio-Only Mode
For music videos, podcasts, and talk-show content, BantuStream offers an audio-only mode that strips the video track entirely. This reduces bandwidth consumption by 85–90% and is surprisingly popular — 22% of our evening sessions use audio-only mode, often by users listening to content while their screen is off.
Efficient Segment Size
We use 2-second CMAF segments (vs. the more common 6-second HLS segments). Shorter segments mean the ABR algorithm can react faster to bandwidth changes, reducing wasted bytes from partially-downloaded segments that arrive after a quality switch.
Edge Caching Strategy
Not all content is equal from a caching perspective. We divide our catalog into three caching tiers:
- Hot tier (top 500 titles by recent views): cached at all 23 micro-PoPs. Pre-pushed to edges before peak hours
- Warm tier (top 5,000 titles): cached at the three mid-tier caches and the 10 largest micro-PoPs
- Cold tier (everything else): served from origin on demand, cached at mid-tier on first request
We use a weighted LFU (Least Frequently Used) eviction policy with a time-decay factor, so yesterday's viral clip doesn't permanently displace steadily popular catalog titles.
Results
Since launching in September 2025, BantuStream has grown to 1.8 million monthly active users across 18 African countries. Key performance metrics:
- Average startup time: 1.4 seconds (down from 4.2 seconds before micro-PoPs)
- Rebuffer rate: 0.8% of viewing time (industry benchmark for emerging markets: 2.5%)
- Average data consumption per hour: 420 MB (vs. 1.2 GB for comparable quality on YouTube in the same markets)
- Content catalog: 12,000 titles, with 60% African-produced content
Explore BantuStream at bantustream.com.
Try BantuStream today
Discover how BantuStream can help you build better, faster. Get started for free and see the difference.
Get Started


