Allow tasks to declare allowed execution regions

Today a run's region comes from the trigger call or the project default. This would let a task declare the region(s) it is allowed to run in:

export const myTask = task({ 
id: "my-task", 
region: "eu-central-1", // pin to one 
// or 
region: ["eu-central-1", "us-east-1"], // allow several 
run: async (payload) => { ... }, });

Two use cases:


Resilience. If one region is unavailable or at capacity, a run could still be picked up in another listed region, instead of waiting on a single region.


Checkpointing across CPU architectures. A checkpointed run cannot be restored on a different CPU architecture, so tasks that rely on checkpointing need to be pinned to a single architecture. Where the fleet is split by architecture, pinning a task to one architecture also limits it to that portion of the fleet. Being able to list more than one would let tasks without that constraint use the full fleet, while checkpoint-sensitive tasks stay pinned to one.

Share update with 0 linked conversations as well

Upvoters
Status

In Review

Board

πŸ’‘ Feature Request

Date

About 2 hours ago

Author

Iss Haddad

Subscribe to post

Get notified by email when there are changes.