mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-24 18:55:55 +03:00
[GH-ISSUE #1659] using sqlite for primary storage of DNS data? #729
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#729
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @davepacheco on GitHub (Mar 8, 2022).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1659
I'm looking to use trust-dns to build a pretty basic DNS server that's programmatically configurable (i.e., has a separate HTTP API for configuring the contents of the zone). I want the data to be persistent in sqlite. It's not clear to me whether I can use the built in sqlite storage provider to store all of the zone's information, or if it's only used for dynamic updates, or for journaling when using a file-based backend? If I can use the sqlite provider as the only storage for all of the DNS records, how does one do that? Thanks!
@bluejekyll commented on GitHub (Mar 10, 2022):
So we have some example configs for this, and basically the
trust-dnsbinary needs this features:sqliteanddnssec-ring.With that enabled you can follow this example:
github.com/bluejekyll/trust-dns@dc5c414ec0/tests/test-data/named_test_configs/dnssec_with_update.toml (L46)and you'll need a key for updating the records:
github.com/bluejekyll/trust-dns@dc5c414ec0/tests/test-data/named_test_configs/dnssec_with_update.toml (L61-L66)This test setup should help in understanding all the moving parts:
github.com/bluejekyll/trust-dns@dc5c414ec0/tests/integration-tests/tests/client_future_tests.rs (L299-L309)and the client setup:
github.com/bluejekyll/trust-dns@dc5c414ec0/tests/integration-tests/tests/client_future_tests.rs (L325-L328)Currently
sig0auth is what is best supported. We definitely need better documentation around all of this, one of these days I'll get to that.@bluejekyll commented on GitHub (Mar 10, 2022):
I reread your question, and realize I didn't answer it properly.
Sqlite is currently only used for a journal in trust-dns. This has some limitations, especially in regards to zone size. What happens is we load all the zone into memory from the journal and serve from there. So for large zones this would be a problem. In general though, the sqlite backend is currently the only supported dynamic update backend, and it only works by the journaling method I described. We can of course create new backends. They are basically Authority implementations, and there is an extensive set of battery tests in the project to verify that the authorities are functioning properly.