Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

kjkoster/run_with_packet_loss

Domain:

digital infrastructure

Record type:

software
Creator:
kjk
Host:
A script to simulate real-world East African traffic inside a Docker container. # Simulating Rwanda Network Conditions using Docker Travelling to Rwanda helps me understand the local network situation better, and I thought it would be nice to share that. I write this in Muhanga (Rwanda) as I do volunteer work here. The people in Rwanda are well aware of how networks work and the infrastructure is set up nicely. I see fibre, beam radio connection and literally on every street corner there is a tiny kiosk selling 4G data bundles. That said, it is hard to have an interruption-free video meeting. Running software here, such as the RAG chatbot I am working on, shows bugs that would never show up under stable network conditions. Tracing some of the networks shows a lot of packet loss in general, sometimes as high as 10% over half an hour, with wild fluctuations. It all gives the impression of an infrastructure that is is handling more traffic than it was designed for. Most wireless access points I see are of the suspiciously cheap kind, so that does not help. They have also been placed based on the wiring available, with no regard to walls or other obstructions that hinder radio signals. The image below shows a screenshot from an `mtr` trace that I ran from my hotel room this morning. The values shown were averaged over about 40 minutes. In that screenshot you can see the wireless network, the first hop from my machine to `171.17.2.1`, lose about 7% of the traffic in that timeframe. A further 3%-8% is lost in the hops after that, with some variations. This pattern seems pretty consistent. Interestingly, when things do work they are generally quite fast. There seems to be ample bandwidth _when_ things work. This suggests that perhaps packet routing and queueing is being overloaded, not so much the raw throughput. This raises the question: how can we simulate these network circumstances locally, where we have reliable and fast connections. When I run a full web application on my development machine, there is not even a network that can fail. …

Visit

github.com

Licenses

MIT