All field notesBook a 30-min call

Take Local Development Off the Shared Cluster

Moving a multi-API Go service off a shared cluster dev loop cut code reloads from about three minutes to two seconds.

Developers on a multi-API Go platform did their local development against a shared Kubernetes cluster. Every session built an image, pushed it to a registry, deployed it into a per-developer namespace over VPN, then migrated and seeded an empty database.

It mostly worked. It was also slow enough that people planned their day around it.

Measure the old loop first

Before changing anything, I timed the existing Skaffold workflow end to end against the stage cluster.

  • Starting the stack took about 4 minutes with no code changes, and about 6 when the image needed a rebuild and push.
  • A one-line Go change took about 3 minutes to show up, because each of three API pods rebuilt and restarted in turn.
  • About 2.5 minutes of every start went to migrating and reseeding a database that began empty every time.

Reliability was worse than speed. Across six timed attempts, the stack came up once. Failures included image pushes dropped by a local proxy, post-deploy hooks that only worked if your kube context defaulted to the right namespace, exec connections reset mid-migration, and a blank env template value that crashed seeding. When a hook failed, the tool tore everything down and you started over.

Move the loop to the laptop

The replacement runs on Docker Compose, entirely on the developer's machine. No cluster, no image push, no VPN.

  • All three APIs share one container, so a code change compiles once instead of three times.
  • docker compose up --watch syncs an edit and rebuilds in about two seconds.
  • The local database keeps its state between runs, so seeding happens once instead of every start.
  • Ports come from .env, so a second worktree can run beside the first.

Review caught an important edge case. Pointing the stack at a shared database through an environment variable would also have auto-migrated that database. Configuring an external database now skips migration and seeding entirely.

The result

Measured on an M-series Mac:

BeforeAfterSpeedup
Start225s11–14s~18×
Start after a code change~360s11–14s~29×
Reload after a Go edit~172s~2s~80×
Second worktreenot possible13s warmnew

I reported speedups as multipliers on purpose. "94% time saved" and "99% time saved" look almost identical. "18× faster" and "80× faster" don't.

Why it matters beyond speed

A fast, isolated stack per checkout changes how a team works. Developers can test a branch without stopping their main work. Reviewers can run a pull request in seconds instead of minutes. Coding agents, which work best in parallel worktrees, get an environment they can start, test, and tear down on their own.

The cluster still matters for staging and production. It just doesn't belong in the edit, compile, test loop.