Skip to content

Conversation

@Saartank
Copy link
Contributor

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 linked an issue Nov 24, 2024 that may be closed by this pull request
@Saartank Saartank marked this pull request as draft November 25, 2024 14:58
@Saartank
Copy link
Contributor Author

There have been major design changes requested for this task, and it will now be completed as part of a different PR altogether.

@Saartank Saartank closed this Dec 23, 2024
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.

Restrict Caches to Serve Only Allowed Prefixes - "Cache Authz"

1 participant