[GH-ISSUE #3120] Consider better trait separation for hickory-server InMemoryAuthority and cousins #1137

Open
opened 2026-03-16 01:42:42 +03:00 by kerem · 1 comment
Owner

Originally created by @alexrudy on GitHub (Jul 14, 2025).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/3120

I went to build a DNS server out of hickory components, and found myself implementing my own Authority to provide DNS Authorities backed by a different storage engine (in my case, putting all of my DNS records in a common SQLite DB, rather than storing zone files on disk). Unfortunately, this requires a lot of work, much of it copying implementation from the existing InMemoryAuthority and SqliteAuthority.

It would be great to have the flexibility to provide other storage engines (e.g. ones where an authority might change via some external method during the running of the server). I took a stab at doing this with a trait, and wanted to know if that is a direction y'all have considered for hickory-server.

Originally created by @alexrudy on GitHub (Jul 14, 2025). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/3120 I went to build a DNS server out of hickory components, and found myself implementing my own [Authority](https://docs.rs/hickory-server/latest/hickory_server/authority/trait.Authority.html) to provide DNS Authorities backed by a different storage engine (in my case, putting all of my DNS records in a common SQLite DB, rather than storing zone files on disk). Unfortunately, this requires a lot of work, much of it copying implementation from the existing [InMemoryAuthority](https://docs.rs/hickory-server/latest/hickory_server/store/in_memory/struct.InMemoryAuthority.html) and [SqliteAuthority](https://docs.rs/hickory-server/latest/hickory_server/store/sqlite/struct.SqliteAuthority.html). It would be great to have the flexibility to provide other storage engines (e.g. ones where an authority might change via some external method during the running of the server). I took a stab at doing this with a trait, and wanted to know if that is a direction y'all have considered for hickory-server.
Author
Owner

@djc commented on GitHub (Jul 15, 2025):

In general, I'm a fan of increasing modularity provided this come not at a (substantial) cost in complexity. It's hard to be more definitive without seeing more of the direction you have in mind.

<!-- gh-comment-id:3072865983 --> @djc commented on GitHub (Jul 15, 2025): In general, I'm a fan of increasing modularity provided this come not at a (substantial) cost in complexity. It's hard to be more definitive without seeing more of the direction you have in mind.
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#1137
No description provided.