Skip to content
← Trylle Journal
dockerocicloudflarer2serverlessbenchmarks

We Built a $0-Egress Serverless Docker Registry That Beats Docker Hub Across Europe

How Trylle Container Yard (docker.direct) cuts registry bills 98.4% at $0.03/GB with $0 egress, serves 64 GB layers, and beats Docker Hub across Europe.

Max18 min read

Container registries shouldn’t feel like a toll booth.

Yet the moment your team grows past a handful of microservices — once CI runners spin up across clouds, developers pull images from Europe and the US, or your AI team starts shipping multi-gigabyte model weights — every registry hits you with the same three headaches:

  1. Surprise egress bills. Pulling 20 TB/month of container layers to external CI runners or bare-metal clusters costs roughly $1,850/month on AWS ECR and $2,010/month on Google Artifact Registry. Almost all of that invoice is just paying to move your own bytes over the wire.
  2. Hard rate-limit cliffs. Launch a 100-VM deploy or CI burst against Docker Hub and you’ll slam straight into HTTP 429 within two seconds — even on paid authenticated tokens.
  3. Tiny layer ceilings. Try pushing a 15 GB VM snapshot or LLM weight layer to Docker Hub or GHCR and it fails outright at their 10 GB single-layer wall.

We built Trylle Container Yard (docker.direct) to erase all three. It is a full enterprise OCI registry — projects, RBAC, bot accounts, keyless OIDC publishing, quotas, and per-repository public toggles inside private orgs — running completely serverless and scale-to-zero on Cloudflare Workers, Durable Objects, Cloudflare Containers, Cloudflare R2, and PlanetScale PostgreSQL.

After pushing and pulling over 23.8 TB of live benchmark traffic across New York, Virginia, and Frankfurt, here are the numbers that matter:

  • 98.4% lower monthly registry bills: At our advertised $0.03/GB/mo storage rate and $0.00/GB egress, storing 1 TB and pulling 20 TB/month across clouds costs $30/month instead of $1,850–$2,010/month — and Trylle plans include 50 GiB to 1 TiB of storage free before overage even starts.
  • Faster than Docker Hub across Europe on both pull and push: 1.81× faster pulls (763 vs 422 MB/s), +14.1% faster multi-layer pushes (169 vs 148 MB/s), and 2.69× smoother tail latency — plus +8.7% faster pulls in New York (1,030 vs 947 MB/s).
  • Zero rate-limit cliff at 101 parallel VMs: 100% pull success at 44.5–50.5 Gbps, while Docker Hub failed 82%–84% of pulls within 1.25 seconds.
  • 64 GB single layers tested live: 6.4× larger than Docker Hub and GHCR’s 10 GB ceiling, with 100.00% bit-for-bit SHA-256 verification across 2,978 / 2,978 layers and zero errors.

Business wins: $30/month vs. $2,000/month — with limits out of your way

If your containers never leave a single hyperscaler VPC, registry egress stays invisible. The second you run bare-metal GPUs, multi-cloud Kubernetes, developer laptops, or ephemeral cloud sandboxes, bandwidth fees dominate your invoice.

Because docker.direct streams every push and every pull directly against Cloudflare R2 — with zero layer bytes ever passing through a container — we price Container Yard simply and transparently: $0.03/GB/mo for storage and $0.00/GB for egress, no matter where your runners live.

Linear-scale single-layer size ceiling and monthly cloud registry bill comparison showing docker.direct at 64 GB verified / 80 GiB max and $0.03/GB/mo storage with $0 egress saving 98.2% to 98.7% vs AWS ECR and Google Artifact Registry
Left: single-layer ceilings across major registries. Right: linear-scale monthly bill for external/multi-cloud pulls (20:1 pull-to-storage ratio) at our advertised $0.03/GB/mo storage rate — saving 98.2% to 98.7% at every scale.

Here is what the monthly invoice looks like for a team storing 1 TB of container images and pulling 20 TB/month from external CI, laptops, and multi-region compute:

Registry Storage (1 TB) Egress (20 TB) Monthly Total Savings
Trylle (docker.direct) $30 ($0.03/GB) $0 $30 / mo Baseline
AWS ECR $100 ~$1,750 ~$1,850 / mo 98.4% less
Google Artifact Registry $100 ~$1,910 ~$2,010 / mo 98.5% less

In practice, most Trylle teams pay even less: every Trylle account includes built-in storage (50 GiB on Free, 200 GiB on Pro, and 1 TiB on Max/Enterprise), and only storage above your plan’s included allowance is metered minutely at $0.03/GB/mo.

We didn’t take the zero-egress math on faith — we audited Cloudflare’s own GraphQL billing telemetry directly. On a single 4.03 TB stress day (1.25 TB pushed + 2.78 TB pulled), our containers transmitted just 0.146 GB of metadata (0.0036% of total traffic, costing $0.0036) with 0 Worker errors and $0.00 in R2 bandwidth. That architectural discipline is why we never have to charge you for pulls.

Limits built for modern images

Modern container images aren’t 40 MB Go binaries anymore — they’re AI model weights, browser-automation sandboxes, and full VM snapshots.

Capability docker.direct Docker Hub GHCR AWS ECR
Max single layer 80 GiB (64 GB tested) 10 GB 10 GB 200 GB
Authed pull limit Unlimited 1,500 / min Unspecified Soft quotas
External egress $0.00 / GB Included* $0 currently ~$0.09 / GB
Storage price $0.03 / GB-mo Tiered $0 currently $0.10 / GB-mo

Low bills and generous ceilings only pay off if your builds and deploys actually feel fast. So next, we benchmarked docker.direct head-to-head against Docker Hub under real multi-terabyte load.


Engineering wins: beating Docker Hub across Europe and 101-VM fleet bursts

We built a Go streaming OCI harness that generates unique, uncompressible layers on the fly (zero deduplication, zero disk bottleneck), pushes 128 × 1 GB images over 16 parallel streams, pulls every layer back, and verifies the SHA-256 digest of every byte across New York, Ashburn (US-VA), and Frankfurt.

Head-to-head benchmark showing docker.direct beating Docker Hub on NYC pulls (+8.7%), Europe pulls (1.81x), Europe pushes (+14.1%), and Europe tail latency (2.69x smoother) while matching 128-layer manifest commits
Head-to-head on 128 × 1 GB images (16-way parallel). docker.direct sweeps Europe on both push and pull, wins NYC pulls, and cuts EU tail latency by 2.69×.
Benchmark (128 × 1 GB) docker.direct Docker Hub Delta
NYC Pull 1,030 MB/s (8.2 Gbps) 947 MB/s +8.7% faster
Europe Pull (FRA) 763 MB/s (6.1 Gbps) 422 MB/s 1.81× faster
Europe Push (FRA) 169 MB/s (peak 176) 148 MB/s +14.1% faster
Europe 64 MiB p95 tail 8.0 s 21.6 s 2.69× smoother
128-layer Manifest Commit 2.5 – 2.9 s 1.8 – 2.1 s On-par (down 21×)

What happens when 101 VMs pull at the exact same second?

Every engineering org eventually hits the Monday-morning fleet deploy — dozens of nodes booting the exact same image at once. We spun up 101 parallel cloud VMs (50 in NYC, 51 in Frankfurt) and ran a 60-second sustained pull storm against a 256 MB, 10-layer image.

101-VM fleet pull burn showing docker.direct sustaining 100% pull reliability at 44.46 Gbps with zero rate limits while Docker Hub failed 82% to 84% of pulls with over 13,000 HTTP 429 errors
101 parallel VMs pulling simultaneously: docker.direct held 100.0% reliability at 44.5 Gbps while Docker Hub walled out 82%–84% of requests in under 1.3 seconds.
101-VM Fleet Burst (60s) Success Rate Pulls OK HTTP 429s EU p95 Pull
docker.direct (186 conc) 100.0% 1,712 0 7.3 s
Docker Hub (188 conc, reuse) 18.0% 1,969 13,607 18.7 s
Docker Hub (194 conc, fresh) 15.9% 1,927 12,934 22.0 s

Docker Hub’s fleet-wide 1,500 requests / 60 seconds cap tripped at t = 0.74 seconds on fresh logins and t = 1.25 seconds even with token reuse, failing over 82% of pulls. docker.direct enforces no rate limit on authenticated pulls (and 5,000/min/IP for anonymous edge bursts), cruising at 44.5 Gbps (peaking at 50.5 Gbps and 73.3 Gbps in 5-second windows) with zero errors.

The v3.2.10 upload leap: +63% to +91% faster everywhere

Our earliest edge upload path was rock-solid, but multi-layer pushes still lagged behind what the network could carry. In v3.2.10, replacing pure-JS hashing and single-stream writes with an 8 KiB Zig-compiled WASM SHA-256 engine, a 4 × 8 MiB parallel Worker pipeline, 64-way server-side R2 copies, and bulk SQL manifest commits lifted push throughput +63% to +91% across every region — pushing Frankfurt past Docker Hub.

Push throughput leap of +63% to +91% across NYC, US-VA, and FRA in v3.2.10 alongside the 4-way edge SHA-256 architecture bake-off showing why 8 KiB Zig-WASM beat Pure-JS, DO-resident BoringSSL, and isolate BoringSSL plus Go r2verify
Left: v3.2.10 pushed multi-layer uploads +63% to +91% faster in every region, overtaking Docker Hub in Europe. Right: the live 4-way edge SHA-256 bake-off on US-VA.

Getting a full enterprise registry to run scale-to-zero, sustain 50 Gbps bursts, and beat Docker Hub across Europe didn’t happen by dropping Harbor into a container and calling it a day. It meant taking Harbor apart piece by piece, rewiring how Cloudflare’s primitives collaborate, and hunting down a few memorable distributed-systems bugs.


Technical details: bisecting Harbor and engineering the edge data plane

Bisecting Harbor: from an always-on cluster to one container that sleeps

Upstream Harbor gives you the battle-tested enterprise surface teams actually want — projects, RBAC, robot accounts, OIDC, quotas, and CNCF distribution v3 — but it assumes a sprawling, always-on cluster with local pod networking and managed Redis burning compute 24/7 even when nobody is pushing.

We went through Harbor’s core runtime piece by piece, stripped away optional always-on sidecars we don’t use, and rebuilt what remained around Cloudflare’s serverless primitives:

Upstream Harbor Piece Trylle Container Yard Replacement Why
nginx Cloudflare Worker (index.ts) Global Anycast TLS, <1 ms RS256 token checks, slot failover, and Direct R2 uploads.
harbor-portal Workers Static Assets (env.ASSETS) Serves the portal UI and API docs straight from Cloudflare’s CDN — zero container compute.
harbor-core + registry + registryctl 1 unified Cloudflare Container (pool of 8) All three Go processes run inside one standard-4 container over 127.0.0.1 (zero inter-pod RTT) and scale to zero after 10 idle minutes.
redis SQLite Durable Objects + Workers KV Strong consistency for sessions, OIDC PKCE, and upload offsets; async edge cache for metadata.
harbor-db (PostgreSQL) PlanetScale PostgreSQL (PgBouncer :6432) Serverless transaction pooling (simple_protocol=true), capped at 16 connections per slot.
Background GC Cloudflare Cron Trigger (0 4 * * *) Wakes a GC slot once daily to sweep unreferenced blobs in PlanetScale and R2.

The trickiest replacement was Redis. Harbor uses it for three unrelated jobs: login/OIDC sessions, short-lived upload state, and a read-heavy repository metadata cache. Rather than running a managed Redis cluster or forking Harbor’s storage layer, we used Cloudflare Containers’ interceptOutboundHttp hook to give Harbor two virtual hostnames:

await container.interceptOutboundHttp("harbor.state", this.ctx.exports.HarborStateGateway);
await container.interceptOutboundHttp("harbor.cache", this.ctx.exports.HarborCacheGateway);
export _REDIS_URL_CORE="cfdo://harbor.state/session"
export _REDIS_URL_HARBOR="cfdo://harbor.state/state"
export _REDIS_URL_CACHE_LAYER="cfkv://harbor.cache/layer"

Anything requiring strong consistency (sessions, OIDC state, rate limits) lands in the SQLite-backed HarborState Durable Object. Read-heavy metadata goes to Workers KV, with writes flushed inside ctx.waitUntil(...) after invalidating the container’s local L1 cache so manifest pushes never stall 400–600 ms waiting on global KV propagation. Harbor never even knows Redis is gone.

Four clean layers — and how every Cloudflare component truly connects

At a high level, Trylle Container Yard separates cleanly into four serverless layers governed by one rule: image bytes never touch a container.

Four-layer serverless architecture of Trylle Container Yard: Layer 1 Global Edge (Cloudflare Workers), Layer 2 Edge State (Durable Objects and KV), Layer 3 Control Plane (scale-to-zero Cloudflare Containers), and Layer 4 Storage and DB (Cloudflare R2 and PlanetScale PostgreSQL)
The four layers of Trylle Container Yard. Bulk image bytes stay on the green direct-to-R2 lane at $0/TB; control containers only handle tiny API calls and scale to zero when idle.

Under the hood, here is how every Cloudflare primitive actually wires together and shares the live workload — from the Worker’s 4-lane R2 pipeline and Zig-WASM hash blocks, to regional SQLite upload checkpoints, interceptOutboundHttp, the 8-slot scale-to-zero container pool, and server-side R2 multipart assembly:

Animated topology diagram showing live work across Cloudflare Workers (4x8 MiB pipeline and Zig-WASM SHA-256), per-UUID Upload DO, HarborState DO, Workers KV via interceptOutboundHttp, 8-slot scale-to-zero Cloudflare Containers, Edge Cache API, Static Assets, Cron Trigger, Cloudflare R2 multipart assembly and server-side copy, Trylle OIDC, and PlanetScale PostgreSQL
Live component topology inside Cloudflare. Watch the Worker pipeline and Zig-WASM blocks stream parts into R2 while Durable Objects checkpoint 180-byte state, container slots wake on demand for control and 64-way copy headers, and pulls stream straight from R2 back to your client.

Following a single docker push and docker pull end-to-end makes that separation even clearer:

Animated push and pull data flows through Trylle Container Yard: push runs Edge JWT init, 4x8 MiB pipelined R2 upload with 8 KiB Zig-WASM SHA-256, 64-way Go server-side copy, and bulk manifest commit; pull uses edge cache and HTTP 307 presigned direct R2 streams
End-to-end push and pull flow in v3.2.10. Every gigabyte moves directly between your machine and Cloudflare R2 — containers only pass tiny JSON and S3 XML headers.

When packets arrived out of order (and why we bypassed containers)

Our very first prototype worked on small images by hand — and then broke spectacularly the moment we threw multi-gigabyte stress tests at it. Two subtle bugs forced us to move the entire blob upload data plane out of containers and straight into the Cloudflare Worker.

1. Out-of-order bytes inside port.fetch(). In v3.0, upload PATCH chunks went Worker → Container → R2. Under multi-gigabyte load, 10–15% of layers failed at commit with 400 DIGEST_INVALID — even though every PATCH returned 202 and the total byte count matched to the exact byte.

We pushed a deterministic 1 GiB pattern, pulled the staged object back from R2, and diffed it byte-for-byte:

Diagram of the corrupted stream: a 32 KiB block followed by an 8 KiB block was received as the 8 KiB block followed by the 32 KiB block, with zero bytes lost or added and a +32,768 offset shift causing 400 DIGEST_INVALID
Every corrupted upload had the exact same forensic signature: got_offset - want_offset = +32768 across one 40 KiB window inside a 1 GiB stream.

Zero bytes were lost and zero bytes were added. Inside one 40 KiB window, an 8 KiB block had been delivered ahead of the 32 KiB block that preceded it. Both distribution‘s internal SHA-256 state and the staged object in R2 agreed bit-for-bit on the swapped bytes, proving the reordering happened inside Cloudflare Containers’ port.fetch() TCP proxy before the stream ever reached the registry process.

2. The hidden $25/TB container egress trap. Around the same time, auditing Cloudflare’s GraphQL analytics after migrating 506 GB revealed 341.39 GB logged under containersUsageAdaptiveGroups.txBytes. R2 charges $0 for egress, but Cloudflare Containers bills $0.025/GB ($25/TB) above the 1 TB monthly allowance — so every gigabyte distribution wrote to R2 from inside a container was silently accruing container egress.

The fix: Layer bytes never cross port.fetch() anymore. The Cloudflare Worker handles POST, PATCH, PUT, GET, and DELETE on /v2/<repo>/blobs/uploads/<uuid> directly:

  • POST init at the edge: Verifies the RS256 push JWT locally with node:crypto, mints the upload UUID, and opens an R2 multipart upload on _uploads/<uuid>/r2data with zero container hop (3.4×–4.0× faster init).
  • PATCH pipelining & tail stitching: Rejects any out-of-sequence Content-Range with 416, then slices the incoming body into 8 MiB parts with 4 in flight (capping Worker memory at 32 MiB per request). Because R2 rejects multipart uploads whose non-final parts vary in size (error 10048), any sub-8 MiB remainder spills cleanly into a tiny r2tail side object and is prepended to the next chunk.
  • Zero-byte container commits: Blobs <= 128 MiB copy inside R2 via one Worker CopyObject. Larger layers send ~30 KiB of S3 metadata headers to POST /api/internal/blobs/r2copy inside the container, where 64 Go goroutines issue parallel UploadPartCopy calls in 256 MiB ranges — committing a 1 GB layer in 3.85 s and a 64 GB layer in 51–71 s, safely under Cloudflare’s 100-second edge timeout and with $0.00 data-plane egress.

Why an 8 KiB Zig-WASM hasher beat native BoringSSL

Moving uploads into the Worker solved corruption and egress, but created one last puzzle: a 1 GB layer arrives as sixteen separate 64 MiB PATCH requests that Cloudflare’s Anycast edge can route to different Worker isolates.

Cloudflare Workers expose native C++ BoringSSL with hardware SHA-NI (~1,637 MB/s), but neither WebCrypto nor node:crypto can export a mid-stream SHA256_CTX state between HTTP requests. So we ran a live 4-way production bake-off on US-VA:

Edge SHA-256 Design Push (128 × 1 GB) Bottleneck
Pure-JS resumable SHA-256 (1 × 64M) 130 MB/s 591 ms blocking V8 CPU per chunk
Native BoringSSL inside Upload DO 132 MB/s Worker → DO 64 MiB RPC pipe stalled at 3.55 s median (64.6 s max)
Skip on PATCH, R2 read-back on PUT 199 MB/s Re-reading every GB from R2 added 5.6–18.3 s to commit
8 KiB Zig-WASM + 4 × 8 MiB pipe 222–292 MB/s Winner — overlaps inside R2 writes, zero read-back

We compiled a tight, unrolled C SHA-256 block compressor with Zig (-O3 --target=wasm32-freestanding) into an 8.1 KiB .wasm module. Even though WASM hashes at ~178 MB/s per stream (9× slower than BoringSSL in isolation), a single HTTP upload stream is network-bound well below that — so hashing runs completely overlapped while 4 × 8 MiB parts are in flight to R2. Between PATCH requests, the entire hash state serializes to 180 bytes of JSON in a regional per-UUID r2upload:<uuid> SQLite Durable Object, surviving Anycast isolate hops with zero R2 read-back on commit (while single-shot uploads still take the native BoringSSL fast-path automatically).

Paired with bulk SQL + 32-way parallel blob descriptor pre-warming on PUT /manifests (slashing 128-layer manifest commits from 53 seconds to 2.5 seconds — 18×–21× faster), v3.2.10 locked in both speed and 100.00% bit-for-bit integrity.

Fast bytes and zero egress solve the storage layer — but a container registry is still painful if it lives on an island with its own user directory, static passwords, and stale permissions. That is where Trylle itself ties everything together.


Why Trylle matters — and how Trylle OIDC eliminates registry secret sprawl

Most teams bolt a third-party registry onto their git host and CI runner, then spend years babysitting service accounts, manually mirroring org teams, and rotating leaked long-lived Docker passwords.

Trylle Container Yard is wired natively into Trylle’s unified identity and OIDC provider (https://oidc.trylle.com):

  • Short-lived 15-minute OIDC JWTs — zero static secrets in CI: Trylle’s platform API (POST /v1/docker/token) mints 15-minute OKMS-signed ES256 OIDC JWTs for both human CLI logins and automated Trylle Bots (bot$<slug>) running inside Trylle Actions CI, automations, or Magic Sessions. Every bot token is automatically intersected with the exact repository IDs and read/write registry permissions scoped to that run. Nothing static sits in environment variables waiting to leak.
  • Automatic org RBAC with zero replica lag: Signing into docker.direct via Trylle SSO (PKCE S256 + ES256 JWKS) auto-onboards your Trylle handle (preferred_username) and maps your live organization claims (org:<slug>:owner, org:<slug>:member) directly to registry project roles. Authorization reads execute against the primary PostgreSQL pool, so revoking a team member or changing a bot’s scope takes effect immediately.
  • Per-repository public toggles inside private orgs: Upstream Harbor forces an entire organization to be all-public or all-private. We added per-repository public-pull overrides right in the Trylle Dashboard — so you can keep internal services locked down while flipping individual base images or VM sandbox templates public for anonymous pulls without creating a second org.
  • One bill, one quota, zero egress math: Your registry namespace (docker.direct/<user-or-org>), included storage tier (50 GiB Free / 200 GiB Pro / 1 TiB Max), and $0.03/GB/mo metered overage live right alongside your repositories, CI runners, and cloud sandboxes in Trylle.

Because your identity, organizations, and storage quota are already wired in, onboarding takes under a minute.


How to onboard and use docker.direct

Trylle Container Yard is 100% wire-compatible with docker, buildx, containerd, kaniko, skopeo, and Kubernetes. Namespaces (docker.direct/<handle> and docker.direct/<org>) auto-provision on your first push.

1. Sign in via Trylle SSO (one-time auto-onboard)

Open https://docker.direct and click Login via Trylle. That runs PKCE OIDC against https://oidc.trylle.com, provisions your personal handle and organization memberships automatically, and links your dashboard settings at trylle.com/settings (or your org’s settings page).

2. Authenticate and push with try CLI or docker login

If you already use the Trylle CLI (npm i -g @trylle/trylle-cli), authenticate your machine and log Docker straight into docker.direct with a short-lived Trylle OIDC token:

# Authenticate the Trylle CLI (once per machine)
try auth login

# Mint a short-lived OIDC registry credential for docker.direct
try docker login --registry docker.direct

# Tag and push — namespaces auto-provision on first push
docker tag my-app:latest docker.direct/<your-org>/my-app:latest
docker push docker.direct/<your-org>/my-app:latest

Prefer plain docker login without the Trylle CLI? Copy your CLI Secret from User Profile on https://docker.direct and sign in directly:

docker login docker.direct -u <your-trylle-handle>
# Paste your CLI Secret as the password

docker tag alpine:3.20 docker.direct/<your-org>/alpine:3.20
docker push docker.direct/<your-org>/alpine:3.20
docker pull docker.direct/<your-org>/alpine:3.20

3. Automate CI/CD with scoped bot accounts

For external CI systems (GitHub Actions, Buildkite, self-hosted runners, or Kubernetes imagePullSecrets), create a repo-scoped bot account (bot$<org>+<name>) and pipe its secret over stdin:

echo "$TRYLLE_BOT_SECRET" | docker login docker.direct \
  -u 'bot$<your-org>+ci' --password-stdin

docker buildx build \
  --platform linux/amd64,linux/arm64 \
  -t docker.direct/<your-org>/api:sha-$(git rev-parse --short HEAD) \
  --push .

Inside Trylle Actions CI and Magic Sessions, you don’t even need a bot secret — Trylle mints a run-scoped 15-minute ES256 registry token automatically so your workflows can docker push and docker pull with zero stored credentials.


docker.direct is live in production today on v3.2.10 — powering Trylle’s own CI runners, cloud coding sandboxes, and boxd VM templates with $0.00/GB egress, $0.03/GB/mo storage, 64 GB layers, and zero rate-limit cliffs.

Next on our roadmap: wiring the official opencontainers/distribution-spec conformance suite directly into CI for every release and submitting our formal certification PR to opencontainers/oci-conformance. If you benchmark your own workloads against docker.direct, we’d love to compare notes.