{
  "id": 6196573,
  "title": "The Rusty Reality of OSS: Chasing Socket Leaks, Replacing DNS Libraries, and the Unseen Cost of Building in Public",
  "url": "https://urgent.news/2026/09/08/the-rusty-reality-of-oss-chasing-socket-leaks-replacing-dns-libraries",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-08T00:01:15.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/tamizuddin/the-rusty-reality-of-oss-chasing-socket-leaks-replacing-dns-libraries-and-the-unseen-cost-of-561l"
  },
  "original_language": "en",
  "account": "Building in public can be a noble endeavor, but it comes with unforeseen challenges. In this postmortem, the author shares their experience of chasing socket leaks, replacing DNS libraries, and the unseen costs of open-source software development.\n\nThe story begins with the author creating a DNS resolver in Rust because trust-dns felt heavy. Three months later, a user reported a file descriptor leak in their proxy. The author initially suspected a leak in their async runtime integration, spending days instrumenting their code and writing a fuzz harness to reproduce the issue. However, the problem lay elsewhere.\n\nThe author discovered that the getrandom dependency, used by ring and subsequently by trust-dns, was holding onto entropy pools incorrectly. Their own code replacement did not address the root cause of the issue, highlighting the importance of thorough dependency audits.\n\nThe author then delved into dependency management, removing unnecessary crates and replacing them with more efficient custom solutions. This reduced their binary size significantly and improved build times. However, the author faced challenges when adding IPv6 support, as the socket2 crate's API differed from their expectations, leading to further testing and bug fixes.\n\nThe postmortem also highlights the unseen cost of building in public. Every bug becomes a public failure, and every refactor invites scrutiny from strangers. Despite the benefits of community contributions, the author acknowledges the emotional toll of public criticism and the learning curve of balancing honesty with correctness.\n\nUltimately, the author reflects on the importance of transparency and the value of the community's feedback. They replaced their custom DNS resolver with trust-dns-resolver, a well-maintained library with proper timeout handling and caching. This decision, while acknowledging the limitations of their own solution, demonstrates the author's commitment to continuous improvement and learning from the collective wisdom of the open-source community.",
  "summary": "Originally published on tamiz.pro . Building in public sounds noble until you're three days into a socket leak that only manifests under 10k concurrent connections, your CI is red, and someone on Reddit asked if your crate is 'production-ready'. This isn't a tutorial. It's a postmortem of what actually happens when you ship Rust code that other humans depend on. The Socket Leak That Wasn't I…",
  "key_points": [
    "Author created a DNS resolver in Rust to replace trust-dns.",
    "File descriptor leak discovered in proxy, traced to getrandom dependency.",
    "Transitioned to trust-dns-resolver, acknowledging community feedback."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}