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

feat: add DNS interceptor #3490

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

feat: add DNS interceptor #3490

wants to merge 12 commits into from

Conversation

metcoder95
Copy link
Member

@metcoder95 metcoder95 commented Aug 21, 2024

Closes #3350

WIP

  • TTL handling
  • Limit max items cached
  • Housekeeping: Improve default distribution handling
  • Housekeeping: Tests

@metcoder95
Copy link
Member Author

It is on a super early state, but should be ok to review @ronag

Please ignore my mess on the distribution and other boilerplate code, I'll improve that later

ronag

This comment was marked as outdated.

@ronag
Copy link
Member

ronag commented Aug 21, 2024

I'm super busy this month. Will do my best to provide feedback. But for now I mostly have time for high level feedback. LGTM so far.

@metcoder95
Copy link
Member Author

We can improve the caching with a self made LRU if we want, but I'd rather explore that in further PRs

return this.pick(
origin,
hostnameRecords,
affinity ?? this.lastIpFamily === 4 ? 6 : 4
Copy link
Member Author

Choose a reason for hiding this comment

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

fix: respect dualStack

lib/interceptor/dns.js Outdated Show resolved Hide resolved
lib/interceptor/dns.js Outdated Show resolved Hide resolved
@metcoder95 metcoder95 marked this pull request as ready for review September 11, 2024 10:34
@metcoder95
Copy link
Member Author

I'll be fixing the tests down the path; hopefully the Windows one are easier to fix

@mcollina
Copy link
Member

CI does not seem happy

@metcoder95
Copy link
Member Author

I'm intrigued about the Ubuntu ones, but the Window's ones seem odd. I'll check them throughout the week

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.

dns round-robin interceptor + cache
4 participants