Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qname router #353

Closed
wants to merge 41 commits into from
Closed

Qname router #353

wants to merge 41 commits into from

Conversation

Philip-NLnetLabs
Copy link
Member

@Philip-NLnetLabs Philip-NLnetLabs commented Jul 12, 2024

Proof of concept for query routing. The example query-routing shows how to route to different upstreams based on the qname. The client subnet option is copied from the request to upstream and in the reply back downstream again to show option processing.

This PR adds the following to unstable-server-transport:

  • The trait SingleService which is a simplified service trait for requests that should generate a single response.
  • The trait ComposeReply and an implementation of the trait (ReplyMessage) to assist in capturing EDNS(0) options that should be included in a response message.
  • Adapters to implement Service for SingleService and to implement SingleService for SendRequest.
  • Conversion of a Request to a RequestMessage.
  • A sample query router, called QnameRouter, that routes requests based on the QNAME field in the request.

@Philip-NLnetLabs Philip-NLnetLabs marked this pull request as ready for review September 5, 2024 14:33
@ximon18 ximon18 added needs-review enhancement New feature or request labels Oct 3, 2024
Copy link
Contributor

@bal-e bal-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a really cool feature! It took me some time to understand this part of the codebase, but looking at it now, everything seems to be quite straightforward. My primary concern is with the number of types that users need to interact with -- we should look for a way to simplify the interface.

src/net/server/single_service.rs Show resolved Hide resolved
src/net/server/qname_router.rs Show resolved Hide resolved
src/net/server/adapter.rs Outdated Show resolved Hide resolved
src/net/server/adapter.rs Outdated Show resolved Hide resolved
examples/query-routing.rs Outdated Show resolved Hide resolved
examples/query-routing.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@tertsdiepraam tertsdiepraam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small suggestions on top of Arya's.

examples/query-routing.rs Outdated Show resolved Hide resolved
src/net/server/mod.rs Outdated Show resolved Hide resolved
src/net/server/qname_router.rs Show resolved Hide resolved
src/net/server/single_service.rs Outdated Show resolved Hide resolved
Philip-NLnetLabs added a commit that referenced this pull request Oct 28, 2024
@Philip-NLnetLabs Philip-NLnetLabs deleted the qname-router branch October 28, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants