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

Implement Prohibited Caches for Federation Prefixes #1769

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Saartank
Copy link
Collaborator

This PR implements a step towards enabling users to configure a list of caches where data should not propagate for a given federation prefix.

Changes Introduced:

  1. Modify Registry Database:

    • Added a new column, prohibited_caches, in the namespace table to store prohibited caches for federation prefixes. This column stores a list of prohibited cache hostnames.
  2. Adjust Registry Endpoints:

    • Created a new endpoint: GET /api/v1.0/registry/namespaces/prohibitedCaches that returns a map of federation prefixes to their corresponding list of prohibited cache hostnames.
    • Modified existing registry and registry_ui namespace endpoints to include prohibited caches data in their responses.
  3. Add Goroutine in Director:

    • Added a new goroutine in the director that periodically makes requests to the registry endpoint and maintains the director’s knowledge of prohibited caches in memory.
    • Added a new configuration parameter, Director.ProhibitedCachesRefreshInterval, to control the time interval at which this goroutine sends requests to the registry endpoint.
  4. Update Matchmaking Logic:

    • Updated the director matchmaking logic to respect the configured prohibited caches.

@Saartank Saartank marked this pull request as draft November 25, 2024 14:58
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.

Enforce federation prefix to not-allowed caches mapping in matchmaking logic
1 participant