Code Monkey home page Code Monkey logo

Comments (8)

rbmj avatar rbmj commented on August 16, 2024

As an aside: I assume this is a configuration issue on my end, but I get "Address already in use" panics if I don't comment out the IPv6 listeners in named.rs

from trust-dns.

bluejekyll avatar bluejekyll commented on August 16, 2024

Thanks for the comments! Yes, you are correct that zone forwarding is currently not supported.

I should make a note of that in the configs/docs if it's not clear right now. Currently there is only support for the Server to act as an Authority. I don't think this would be hard to add, I haven't done it yet, because I think there is a bigger story around a full caching Resolver there, that should be spec'ed out. What I've been thinking of for Resolvers/Forwarders is to implement a general purpose caching layer, which would use the Client for all resolution. One of the reasons I haven't worked on a Resolver yet, is that I think there are a lot of nitty-gritty details in the RFCs to get resolution correct.

As to the question of where to add this, I think it would be a separate Catalog, that if the main Authority catalog does not contain the zone, then the Forwarding catalog would be used to perform a lookup and cache the result. It's not a small amount of work by any means ;) But if you want to take a crack at it, that would be awesome.

As to the IPv6 conflict, are you listening on both IPv4 and IPv6? There could definitely be a bug there, I think most of the integration tests are testing them in isolation right now. Also what OS are you on? And mind opening a separate bug for that?

from trust-dns.

rbmj avatar rbmj commented on August 16, 2024

I'll open an issue.

From the design perspective, it would seem to me that the simplest way would be to keep it at a zone based level - you can specify that a zone is a master zone, or a forwarding zone. Then, you could have zone be a trait and have authority and forwarder implement that zone trait. I come from a C++ background, so I have a tendency to want to force polymorphism on everything, but this seems like the simplest way (from my perspective) without having to make major structural changes to the code. Caching could be added on later as another implementation of the zone trait - which would just perform a lookup on a Box<Zone> and cache the result.

from trust-dns.

bluejekyll avatar bluejekyll commented on August 16, 2024

A Zone trait, which is basically the current Authority, would be nice. Are you thinking of the forwarding zone as acting as just a pass through? Meaning it wouldn't actually store any records? I was assuming a Forwarding zone would definitely want to cache results from the master, but I guess it doesn't have to in it's most basic form.

An FYI: I'm currently finishing up work on the futures-rs based client. I have one last addition/change to make there to resolve an issue, and then that will land. After that I'm planning on going back and reworking the Server around futures-rs as well. It shouldn't change a ton of anything being done in this area, but it will be nice because it will allow a forwarding Zone the ability to share a sync io event loop between the client and server, which isn't possible right now.

from trust-dns.

rbmj avatar rbmj commented on August 16, 2024

It was more to separate things out - easier (IMO) to just worry about caching and allow DNS lookup to happen by magic in one struct, and then only do DNS lookup in another without worrying about caching. To me, it simplifies design enough to be worth an extra pointer indirection, but it's personal preference. It also seems like it would be easier to test/prototype.

from trust-dns.

bluejekyll avatar bluejekyll commented on August 16, 2024

Sounds great :)

from trust-dns.

bluejekyll avatar bluejekyll commented on August 16, 2024

Depends on #110

from trust-dns.

bluejekyll avatar bluejekyll commented on August 16, 2024

With the Resolver done, some thought can be done on potentially integrating it into the Server, though it might be too high level an interface. It might be nice to use the internals of the Resolver like NameServerPool directly so that RecordSets are directly accessible.

from trust-dns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.