Distributed locking over HTTP

One live lease for shared work.

OctoStore is a small coordination service for systems that need a single owner at a time. Acquire a named lock, attach metadata, renew the lease while work is active, and let expiry handle abandoned work.

No scheduler, no workflow DSL, no client runtime. Just leases, ownership, and JSON.

# Try to own a unit of work for 60 seconds
curl -X POST https://api.octostore.io/locks/deploy-main/acquire \
  -H "Authorization: Bearer ***" \
  -H "Content-Type: application/json" \
  -d '{
    "ttl_seconds": 60,
    "metadata": "host=runner-7 build=1842"
  }'

# acquired: proceed; held: back off and inspect owner
{ "status": "acquired", "lease_id": "...", "expires_at": "..." }

A lock service with sharp edges removed.

The primitive is intentionally boring: a single-segment lock name maps to one active lease. That is enough to serialize deploys, protect cron jobs, coordinate queue consumers, and make ownership visible.

Lease-based ownership

Locks expire automatically if a holder stops renewing. Crashed workers do not leave permanent tombstones.

Inspectable metadata

Store the runner, job URL, host, trace ID, or reason with the lock so operators can see what is happening.

HTTP from anywhere

Use curl, fetch, requests, Go, Rust, shell scripts, or whatever already runs in your environment.

The operating loop.

Acquire

POST a lock name with a TTL and optional metadata.

Work

If the status is acquired, you own the lease.

Renew

Heartbeat before expiry to keep long-running work alive.

Release

Return the lock when the protected section is complete.

Running hosted agents?

OctoStore works well when many hosted workers can see the same backlog and only one should claim a task. Use a stable lock name per task, attach run metadata, and let the lease expire if the worker disappears.

Use OctoStore for agents

Good fits

Deploy serialization, singleton cron, expensive cache rebuilds, issue/PR claim checks, migration guards, human-visible task ownership, and any short critical section where a lease is simpler than a full coordinator.