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

WIP: draft for hash selector #68

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

monperrus
Copy link
Contributor

See #66

@monperrus
Copy link
Contributor Author

@m13253
Copy link
Owner

m13253 commented Feb 5, 2020

I think we can use the hash/fnv package of the Go standard library. It provides the Fowler–Noll–Vo hash function, which is a fast algorithm for hash table use.

I think the Selector.Get function can add a parameter to pass the requested domain name to the selector, so we can calculate the hash based on the requested domain name.

@Sherlock-Holo
Copy link
Contributor

I think Get method can add a parameter that record the DNS request message, like who query, when, query for what. so that the selector has enough info to evaluate which upstream should be return. if selector doesn't care this info, just ignore it

@monperrus
Copy link
Contributor Author

monperrus commented Feb 6, 2020 via email

@gdm85 gdm85 marked this pull request as draft September 3, 2022 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants