Harbor for Beginners, Part 11: Replication and Proxy Cache

Harbor for Beginners · Part 11 of 12 Replication and Proxy Cache By now you have pushed images, scanned them, locked them down, and cleaned them up, all inside your own project. This part looks outward. Harbor does not have to live on its own island. It can talk to other registries in two different…

Harbor for Beginners · Part 11 of 12

Replication and Proxy Cache

By now you have pushed images, scanned them, locked them down, and cleaned them up, all inside your own project. This part looks outward. Harbor does not have to live on its own island. It can talk to other registries in two different ways, and they solve two different problems. We will go through both, then poke at the real proxy cache that already exists in the lab.

Heads up before we start, the same as Part 7 and Part 10. Setting these up is a system-admin job. It needs the Administration menu, which your account does not have. So this part is mostly look, not touch. The good news is the lab already has a working proxy cache, so you can see a real one instead of just reading about it.

The two ways Harbor connects to other registries

Replication and proxy cache sound similar because both move images between registries. The difference is who starts the copy and when.

 ReplicationProxy cache
What it doesCopies images between two registries, in bulk.Mirrors one upstream registry, on demand.
When it copiesOn a schedule, or when you click run.The first time someone pulls an image.
Good forMirroring a whole project to another site, backups, multi-region copies.Caching public images locally so you pull from the internet once, not every time.
Set up bySystem admin (Administration, then Registries and Replications).System admin creates the project. You just pull through it.

What a proxy cache does

A proxy cache is a special kind of project. It does not hold images you push. Instead it sits in front of an upstream registry and keeps a local copy of whatever gets pulled through it. The first pull goes out to the upstream and is a little slow. Harbor keeps that copy, so every pull after that is served from inside the lab and is fast.

Your pull crane / docker Harbor proxy cache nvidia-cache keeps a local copy Upstream public registry 1. you ask 4. image back, fast next time 2. first time only 3. fetch and cache After the first pull, steps 2 and 3 are skipped. Harbor serves the cached copy.

Why bother? Two reasons. You save bandwidth, because a popular image is downloaded from the internet once and then shared from inside the lab. And you keep working even if the upstream is slow or briefly unreachable, because the copy is already local.

What replication does

Replication is the bulk option. An admin points Harbor at another registry, writes a rule for which repositories to copy, and picks when it runs. Then Harbor copies images across in batches, either on a timer or when someone kicks it off by hand. It is the tool you reach for when you want a whole project mirrored to a second site, or a backup somewhere else.

Harbor (this site) your projects Other registry another site or backup Replication rule which repos + schedule Copies images across in batches, on a timer or on demand.

One way to picture it if you come from vSphere: replication is a lot like a Content Library subscription that syncs on a schedule, while a proxy cache is more like a pull-through mirror that only fetches what someone actually asks for.

Find the proxy cache in the project list

You do not need admin rights to spot a proxy cache. The project list tells you which is which.

  1. Open the Projects page.
  2. Look at the Type column. Almost every row says Project.
  3. Find the one that says Proxy Cache. In this lab it is the project named nvidia-cache.
Harbor projects list with the Type column, showing nvidia-cache as a Proxy Cache
The Type column is the giveaway. Most projects are plain Projects. The nvidia-cache row is a Proxy Cache.

That one word in the Type column is the whole difference. A normal project stores what you push. A proxy cache stores what gets pulled through it from somewhere else.

Look inside the proxy cache

Click nvidia-cache to open it. Under the name you will see the label Proxy Cache, so there is no doubt about what kind of project this is. Open the Repositories tab.

Inside the nvidia-cache proxy cache project, the Repositories tab listing cached model images and their pull counts
Inside the proxy cache. Every repository here landed because someone pulled it through, and Harbor kept the copy.

Read it like this. Each row is an image that someone pulled at least once. The Pulls column shows how many times it has been requested, and the Last Modified Time shows when the cache last refreshed it. Nobody pushed any of these by hand. They are here purely because a pull came through and Harbor saved a copy on the way back.

Pulling an image through the cache

The trick to using a proxy cache is the name you pull. You address the image through the cache project, and Harbor handles the rest. The shape is the same host/project/image:tag pattern from Part 3, with the cache project sitting in the project slot.

./crane pull registry.lab.internal/nvidia-cache/<upstream-image>:<tag> out.tar --insecure

The first time you run that, Harbor checks its cache, does not find the image, fetches it from the upstream registry, hands it to you, and keeps a copy. Pull the same image again and it comes straight from the cache, no trip to the internet. If you watch the Repositories tab, the image appears there after that first pull, and its Pulls count ticks up each time.

The host is shown here as registry.lab.internal on purpose. Use your real lab Harbor host in its place, and pick an image path the cache is actually set up to mirror.

Why this part is mostly look, not touch

Creating a proxy cache and setting up replication both happen in the Administration area, under Registries and Replications. That menu only shows up for system admins. On the shared lab you are a project admin in your own sandbox, not a system admin, so you will not see it. That is normal and nothing is wrong with your account.

It is still worth knowing the two moving parts, because that is what an admin actually configures. First a registry endpoint, which is just Harbor’s saved address and login for the other registry. Then a rule that uses it, either a replication rule with a filter and a schedule, or a proxy cache project pointed at that endpoint. Endpoint first, rule second. That order is the whole mental model.

What you can take away

You do not need admin rights to understand this, and now you do. You can tell a proxy cache from a normal project at a glance, you know that its contents got there by being pulled and not pushed, and you know that replication is the bulk, scheduled cousin for mirroring whole projects. If you ever do get system-admin access, you already know the two pieces to look for.


Harbor for Beginners, Part 11 of 12. Product names belong to their owners. The host and any credentials shown are stand-ins, and the lab project names in the screenshots have been blanked out.

About The Author


Discover more from Journal of Intelligent Infrastructure – By Dr Pranay Jha

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked *

Architect’s Toolkit

About the Author

Dr. Pranay Jha is a Cloud and AI Consultant with 18+ years of experience in hybrid cloud, virtualization, and enterprise infrastructure transformation. He specializes in VMware technologies, multi-cloud strategy, and Generative AI solutions. He holds a PhD in Computer Applications with research focused on Cloud and AI, has published multiple research papers, and has been a VMware vExpert since 2016 and a VMUG Community Leader.

Discover more from Journal of Intelligent Infrastructure - By Dr Pranay Jha

Subscribe now to keep reading and get access to the full archive.

Continue reading