The Reconciler is a standalone service that handles periodic reconciliation operations for the Directory. It runs as a separate process and can be scaled independently from the main API server.
The reconciler uses a task-based architecture where different reconciliation tasks can be registered and run at their configured intervals. This allows for:
- Independent scaling: The reconciler can be scaled separately from the API server
- Separation of concerns: Long-running background operations don't impact API performance
- Extensibility: New reconciliation tasks can be added without modifying the core service
- Reliability: Tasks are idempotent and handle partial failures gracefully
The regsync task handles synchronization from non-Zot registries. It:
- Polls the database for pending sync operations that require regsync (non-Zot registries)
- Negotiates credentials with the remote Directory node
- Generates a regsync configuration file for the sync operation
- Executes the
regsync oncecommand and waits for completion - Updates the sync status to COMPLETED or FAILED based on the result
The indexer task monitors the local OCI registry and indexes records into the search database. It:
- Creates a snapshot of current registry tags (filtering to valid record CIDs)
- Compares with the previous snapshot to detect new tags
- For each new tag, pulls the record from the local store and validates it
- Adds the record to the search database to enable search and filtering
The name task re-verifies DNS/name ownership of named records and caches results. It:
- Queries the database for signed records with verifiable names that need verification (missing or expired)
- For each record, retrieves the record name and public keys attached to the record
- Verifies name ownership (e.g. via well-known JWKS at the record’s domain)
- Stores the verification result (verified or failed) in the database for efficient API filtering
The signature task verifies record signatures and caches results. It:
- Queries the database for signed records with no or expired verification (per TTL)
- For each record, collects signatures and public keys from the store
- Verifies each signature using shared verification logic (key-based or OIDC)
- Upserts verification results to the database