Skip to content

[Question] How can I centralise the blob info cache across multiple workers to enable ECR layer mounting? #2930

Description

@heliobmartins

Hi folks,

I'm looking for advice on how to better leverage caching for the BlobMounting feature, specifically with AWS ECR, and would appreciate any insights.

Context

We replicate artifacts (OCI images) to AWS ECR using the podman/skopeo SDK. To benefit from the new ECR cross-repository layer sharing feature, we need BlobInfoCacheDir configured — otherwise the blob info cache lives only in memory.

Why the in-memory cache hurts us

No blob mounting. For each copy operation, Skopeo can't tell whether it has seen an artifact before, so it can't mount existing layers — copy times don't improve.
No cost reduction. Every operation is a fresh copy rather than a mount, so we don't get the associated savings.

The core problem

We run multiple worker pods that all perform replication, and each pod has its own local BlobInfoCacheDir. As a result:

The cache is not shared. A layer already replicated by one pod isn't known to the others, so shared/previously-replicated layers get re-copied unnecessarily.

What I'm looking for

I'd like to centralise the blob info cache (currently the SQLite DB under BlobInfoCacheDir) so all pods can share it. Has anyone tackled this? I'm considering options like a shared store (Redis) or a proper database, but I'm keen to hear recommended best practices before committing to an approach.

Any advice is greatly appreciated

Thanks in advance for your help,

Helio

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions