GibilGibil

Parallel Test Sharding

Split a test suite across multiple servers with fleet mode

Split a large test suite across multiple servers. Each shard runs independently. Results come back as structured JSON.

Fleet mode (--fleet) was built for exactly this.

Workflow

# Forge 8 servers in parallel, all with your repo
gibil create --name shard --fleet 8 --repo github.com/you/project --ttl 30 --json
{
  "fleet_id": "fleet-a1b2c3d4",
  "instances": [
    { "name": "shard-1-a3f", "ip": "65.21.x.x" },
    { "name": "shard-2-a3f", "ip": "65.21.x.y" }
  ]
}
# Run shards in parallel
gibil run shard-1-a3f "cd /root/project && pnpm test -- --shard=1/8" --json
gibil run shard-2-a3f "cd /root/project && pnpm test -- --shard=2/8" --json
gibil run shard-3-a3f "cd /root/project && pnpm test -- --shard=3/8" --json
# ... all 8 in parallel ...

# Aggregate results, burn the fleet
gibil destroy --all

Real numbers

A test suite that takes 40 minutes on one machine finishes in ~5 minutes across 8 shards, plus ~90 seconds for server boot.

Eight servers on Hetzner cost ~$0.04/hr total with BYOC. Fleet caps at 20 per command — for larger shards, run two fleet commands.

Why gibil

  • Clean state per shard — no shared state, no test pollution between shards
  • Parallel creation — all servers forge simultaneously, not sequentially
  • Structured output--json on every command for machine parsing
  • Cheap at scale — BYOC with Hetzner keeps costs minimal

Fleet mode also works for benchmarking multiple configurations, testing dependency upgrades in parallel, or any workflow where you need N isolated environments at once.

Next steps

On this page