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

Refactoring DnsCache and how to resolve Service Instance #108

Merged
merged 3 commits into from
Apr 26, 2023

Conversation

keepsimple1
Copy link
Owner

@keepsimple1 keepsimple1 commented Apr 23, 2023

Simplify the logic of resolving an instance: always resolve from the cache. For any incoming updates, we update the cache first, then try to resolve according to the cache.

We're still not doing all the things for the cache updates as mentioned in RFCs, but I think with the changes, the future enhancements will be easier.

  • Got rid of instances_found and the related state. As they are essentially another kind of cache but it is error-prone to keep them up-to-date and consistent with DnsCache.
  • All instances info are generated on-demand now, from the one and only cache.

Simplify the logic of resolving an instance: always resolve from the cache.
For any incoming updates, we update the cache first, then try to resolve.
@keepsimple1 keepsimple1 merged commit 3fe9b56 into main Apr 26, 2023
@keepsimple1 keepsimple1 deleted the simple-cache-2 branch April 26, 2023 01:04
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.

1 participant