fix(function): isolated-vm worker pool to prevent single-worker bottleneck + execution user id resolution #3155
fix(function): isolated-vm worker pool to prevent single-worker bottleneck + execution user id resolution #3155waleedlatif1 merged 10 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@cursor review |
Greptile OverviewGreptile Summary
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant API as /api/function/execute
participant IVM as isolated-vm pool
participant Redis as Redis (optional)
participant W as Worker Process
Client->>API: POST execute(code, auth)
API->>IVM: run({ownerKey, ownerWeight, code})
opt Redis configured
IVM->>Redis: eval acquireLease(ownerKey, ttl)
Redis-->>IVM: granted/denied
alt denied
IVM-->>API: 429/limit error
API-->>Client: error
end
end
IVM->>IVM: enqueue or pick least-loaded worker
IVM->>W: send execution request
W-->>IVM: result/error
opt Redis configured
IVM->>Redis: eval releaseLease(ownerKey)
end
IVM-->>API: output
API-->>Client: output
|
|
@cursor review |
|
@cursor review |
1 similar comment
|
@cursor review |
|
@greptile |
|
@cursor review |
Additional Comments (1)
|
|
@cursor review |
|
@cursor review |
|
@cursor review |
|
@greptile |
…eneck + execution user id resolution (simstudioai#3155) * fix(executor): isolated-vm worker pool to prevent single-worker bottleneck * chore(helm): add isolated-vm worker pool env vars to values.yaml * fix(userid): resolution for fair scheduling * add fallback back * add to helm charts * remove constant fallbacks * fix * address bugbot comments * fix fallbacks * one more bugbot comment --------- Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Summary
Type of Change
Testing
Tested manually. Added test.
Checklist