Skip to content

feat: automatic region placement for Ignite workloads #78

Description

@t0gun

Context

Ignite is stateless serverless compute. Users should not need to think about where it runs — they care that it is fast, not which region it landed in.

Behavior

  • If region is omitted from the deploy request, the platform selects the best region automatically
  • If region is specified, respect it (compliance, latency pinning)

Automatic placement strategy

When no region is specified, select based on (in priority order):

  1. Closest to request origin — resolve the client's IP to a geographic region, auction there first
  2. Available capacity — if the nearest region has no capacity, fall back to the next closest region with available nodes
  3. Lowest auction response time — among tied candidates, the fastest bid wins (already how auctions work)

API

POST /v1/ignite
{
  "image": "registry.example.com/app:latest",
  "region": "ca-central"  // optional — omit for auto-placement
}

Error responses

  • Region specified but invalid: 400 Bad Request{"error": "unknown region: ca-east"}
  • Region valid (or auto) but no capacity: 503 Service Unavailable{"error": "no capacity available"}

Implementation notes

  • Geo-IP resolution at the control plane (MaxMind GeoLite2 or Cloudflare headers if fronted by CF)
  • Define a region priority list per geo bucket (e.g., Canadian IP → ca-central first, us-east fallback)
  • Auction broadcast targets the selected region; on timeout, try next region in fallback list
  • For now with a single region, auto-placement just defaults to the only available region

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestnot urgentThis label is slammed to issues that doesnt need urgent attentionscaledAll issues pertaining to scale daemon should be labeled with this

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions