[PR #2576] [MERGED] Switch DnsLru from lru-cache to moka #3154

Closed
opened 2026-03-16 11:28:11 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/2576
Author: @divergentdave
Created: 11/15/2024
Status: Merged
Merged: 11/19/2024
Merged by: @djc

Base: mainHead: david/moka-record-cache


📝 Commits (1)

  • 127622e Switch DnsLru from lru-cache to moka

📊 Changes

4 files changed (+151 additions, -45 deletions)

View changed files

📝 Cargo.lock (+99 -1)
📝 Cargo.toml (+2 -1)
📝 crates/resolver/Cargo.toml (+1 -1)
📝 crates/resolver/src/dns_lru.rs (+49 -42)

📄 Description

This replaces lru-cache with moka in order to eliminate the coarse mutex lock on the record cache. Closes #2261.

I have not yet tested the performance impact of this, but I can try to put together a synthetic workload to do so. @telbizov could you try this out in your proxy?


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/2576 **Author:** [@divergentdave](https://github.com/divergentdave) **Created:** 11/15/2024 **Status:** ✅ Merged **Merged:** 11/19/2024 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `david/moka-record-cache` --- ### 📝 Commits (1) - [`127622e`](https://github.com/hickory-dns/hickory-dns/commit/127622e3eb9c1a18f22a89f122a6761339ecde78) Switch DnsLru from lru-cache to moka ### 📊 Changes **4 files changed** (+151 additions, -45 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+99 -1) 📝 `Cargo.toml` (+2 -1) 📝 `crates/resolver/Cargo.toml` (+1 -1) 📝 `crates/resolver/src/dns_lru.rs` (+49 -42) </details> ### 📄 Description This replaces `lru-cache` with `moka` in order to eliminate the coarse mutex lock on the record cache. Closes #2261. I have not yet tested the performance impact of this, but I can try to put together a synthetic workload to do so. @telbizov could you try this out in your proxy? --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:28:11 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#3154
No description provided.